Question Video: Finding Approximate Solutions to Differential Equations Using Euler’s Method | Nagwa Question Video: Finding Approximate Solutions to Differential Equations Using Euler’s Method | Nagwa

Question Video: Finding Approximate Solutions to Differential Equations Using Euler’s Method Mathematics

Consider the initial value problem 𝑦′ =2𝑦 + 5π‘₯ βˆ’ 4, where 𝑦(0) = 2. Use Euler’s method with 6 steps to estimate the value of 𝑦(3) to two decimal places.

05:03

Video Transcript

Consider the initial value problem 𝑦 prime is equal to two 𝑦 plus five π‘₯ minus four, where 𝑦 of zero is equal to two. Use Euler’s method with six steps to estimate the value of 𝑦 evaluated at three to two decimal places.

We’re given an initial value problem, and we need to use Euler’s method with six steps to estimate the value of 𝑦 evaluated at three. We should give our answer to two decimal places. Let’s start by recalling Euler’s method. Euler’s method gives us a way of approximating outputs of our function 𝑦. In our case, since we want to use six steps, our approximation will be 𝑦 six. So to use this formula to find the value of 𝑦 six, we need to know how to find 𝑦 five, π‘₯ five, β„Ž, and 𝑓.

Let’s start with the function 𝑓. This is actually just the function in our initial value problem. In our case, since we want to solve the initial value problem, 𝑦 prime is equal to two 𝑦 plus five π‘₯ minus four, we’ll set our function 𝑓 of π‘₯, 𝑦 to be equal to two 𝑦 plus five π‘₯ minus four. So we’ve now found our function 𝑓. Remember, in our initial value problem, we’re also told that 𝑦 of zero is equal to two. In other words, when π‘₯ is equal to zero, we know 𝑦 is equal to two. So we’ll use this to give us our initial values. π‘₯ zero is equal to zero and 𝑦 zero is equal to two.

The last thing we need to explain is the value of β„Ž. Remember, we’re estimating the value of 𝑦 when π‘₯ is equal to three. In this case, we want our values of π‘₯ to start at zero and get closer and closer to three. We want this to happen in six equal-width steps. So our initial value of π‘₯, π‘₯ zero, is equal to zero. And our final value of π‘₯ is equal to three. And we want to split this into six sections of equal width. We call these steps. And the width of these steps is equal to β„Ž.

From this diagram, it’s now easy to calculate the value of β„Ž. β„Ž will be equal to the length of our line divided by the number of steps. In this case, that’s three minus zero divided by six. And we can calculate this. It’s equal to one-half or 0.5.

Remember, to find the value of π‘₯ sub 𝑖, we need to go up 𝑖 steps from π‘₯ zero. So to go from π‘₯ zero to π‘₯ one, we need to add our value of β„Ž. We know β„Ž is equal to 0.5. So we get π‘₯ one is equal to 0.5. We can then do the same to find the value of π‘₯ two. We need to add 0.5. So we get π‘₯ two is equal to one. We can then do the same to find π‘₯ three is 1.5, π‘₯ four is two, and π‘₯ five is 2.5.

We’re now ready to use Euler’s method. We know the value of β„Ž. We know our function 𝑓. We know all of our values of π‘₯. And we know the value of 𝑦 zero. This means we now have all the information to find 𝑦 one. It’s equal to 𝑦 zero plus β„Ž times two 𝑦 zero plus five π‘₯ zero minus four.

Substituting in 𝑦 zero is equal to two, π‘₯ zero is equal to zero, and β„Ž is equal to 0.5, we get 𝑦 one is equal to two plus 0.5 times two times two plus five multiplied by zero minus four. And we can then just calculate this expression; it’s equal to two. Now that we found the value of 𝑦 one, we can use this to find the value of 𝑦 two.

This time, we get 𝑦 two is equal to 𝑦 one plus β„Ž times two 𝑦 one plus five π‘₯ one minus four. This time, our value of 𝑦 one is two and our value of π‘₯ one is 0.5. So we get 𝑦 two is equal to two plus 0.5 times two multiplied by two plus five times 0.5 minus four. And if we evaluate this expression, we get 3.25.

Now that we found 𝑦 two, we can find an expression for 𝑦 three. Remember, we need to go all the way to 𝑦 six to find our approximation by using Euler’s method. This time, 𝑦 two is 3.25 and π‘₯ two is equal to one. So we get 𝑦 three is equal to 3.25 plus 0.5 multiplied by two times 3.25 plus five times one minus four. And we can then just calculate that this expression is equal to seven. We can then find 𝑦 four by using 𝑦 three is equal to seven and π‘₯ three is equal to 1.5. And we can then calculate this; it’s equal to 15.75.

Doing the same again with 𝑦 four equal to 15.75 and π‘₯ four equal to two, we get that 𝑦 five is equal to the following expression, which we can calculate is equal to 34.5. We just need to do this one more time, since Euler’s method tells us 𝑦 six will be our approximation of 𝑦 evaluated at three. This time, we have 𝑦 five is 34.5 and π‘₯ five is equal to 2.5. Using these values, we get that 𝑦 six is equal to 73.25, which is our final answer.

Therefore, given the initial value problem 𝑦 prime is equal to two 𝑦 plus five π‘₯ minus four where 𝑦 of zero is equal to two, we were able to use Euler’s method with six steps to show that 𝑦 of three is approximately equal to 73.25.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy