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

Question Video: Finding Approximate Solutions to Differential Equation Using Euler’s Method Mathematics • Higher Education

Consider the initial value problem 𝑦′ = 𝑦 + 1, 𝑦(0) = 0. Use Euler’s method with 𝑛 = 5 steps on the interval [0, 1] to find 𝑦(1).

05:40

Video Transcript

Consider the initial value problem 𝑦 prime is equal to 𝑦 plus one where 𝑦 at π‘₯ is equal to zero is zero. Use Euler’s method with 𝑛 equal to five steps on the interval zero, one to find 𝑦 at π‘₯ is equal to one.

We’ve been given a first-order differential equation, 𝑦 prime is equal to 𝑦 plus one. In other words, the derivative of 𝑦 with respect to π‘₯ is equal to 𝑦 plus one. We have an initial value 𝑦 at π‘₯ is equal to zero is equal to zero so that our starting point π‘₯ zero, 𝑦 zero is the point zero, zero. We’re asked to find 𝑦 at π‘₯ is equal to one using Euler’s method.

Euler’s method is a way of numerically integrating the first-order differential equation. How this works is that from a given starting point over a range of π‘₯-values β€” in our case, the closed interval zero, one β€” we use Euler’s formula to calculate successive approximate 𝑦-values for the range of π‘₯-values. To do this, we split our π‘₯-interval into equal-size steps. In our case, we have 𝑛 equal to five steps. So, we need to split our interval zero, one into five steps.

And to find the step size β„Ž, we divide the interval width by the number of steps. Since our maximum π‘₯ is one and the minimum is zero, our interval width is one minus zero, which we divide by the number of steps, five, so that our step size is one over five, which is 0.2. In our interval then, if zero is π‘₯ zero with a step size of 0.2, π‘₯ one is equal to 0.2, π‘₯ two is equal to 0.4, π‘₯ three is 0.6, π‘₯ four is 0.8, and π‘₯ five is one.

Remember, we’re asked to find the value of 𝑦 when π‘₯ is equal to one. So, we’re looking for 𝑦 at π‘₯ is equal to π‘₯ five, which we’ll call 𝑦 five. In order to reach 𝑦 five, we need to calculate 𝑦 one, which is 𝑦 of π‘₯ one. We use that to calculate 𝑦 two, which is 𝑦 of π‘₯ two. We use that to calculate 𝑦 three, which is 𝑦 of π‘₯ three, and so on until we get to 𝑦 five, which is 𝑦 of π‘₯ five.

Looking at our formula, to calculate 𝑦 𝑛, we need 𝑦 𝑛 minus one, β„Ž, and a function 𝑓. We know that β„Ž is 0.2 and a function 𝑓 is actually our derivative. In our case, this is a function of 𝑦. So, we have 𝑓 of 𝑦 is equal to 𝑦 plus one. Since this function doesn’t depend on π‘₯, we can eliminate the π‘₯ term from our equation. So, we have 𝑦 𝑛 is equal to 𝑦 𝑛 minus one plus β„Ž times 𝑓 of 𝑦 𝑛 minus one. We now have everything we need to start calculating our values.

Our starting point is 𝑦 zero is equal to zero. We use this in our formula to calculate 𝑦 one. If 𝑛 is equal to one in our formula, then 𝑛 minus one is equal to zero. And we have 𝑦 one is equal to 𝑦 zero plus β„Ž times 𝑓 of 𝑦 zero. 𝑦 zero is equal to zero. β„Ž is equal to 0.2. And 𝑓 of 𝑦 zero is 𝑦 zero plus one. That’s equal to zero plus one, which is one, so that 𝑦 one is equal to zero plus 0.2 times one, which is 0.2.

Our next step is to calculate 𝑦 two using 𝑦 one. And in our formula, 𝑦 two is equal to 𝑦 one plus β„Ž times 𝑓 of 𝑦 one. That is 0.2 plus 0.2 times 𝑓 of 𝑦 one. And 𝑓 of 𝑦 one is 𝑦 one plus one, which is 0.2 plus one, which is 1.2. So that 𝑦 two is equal to 0.2 plus 0.2 times 1.2. And that’s equal to 0.44. 𝑦 two is, therefore, 0.44. We use this to calculate 𝑦 three. So, 𝑦 three is 𝑦 two plus β„Ž times 𝑓 of 𝑦 two. And that’s equal to 0.44 plus β„Ž, which is 0.2 times 𝑓 of 𝑦 two. 𝑓 of 𝑦 two is 𝑦 two plus one, which is 0.44 plus one. And that’s 1.44 so that 𝑦 three is equal to 0.44 plus 0.2 times 1.44. And that’s equal to 0.728.

And we use this to calculate 𝑦 four. And 𝑦 four is 𝑦 three plus β„Ž times 𝑓 of 𝑦 three. And that’s 0.728 plus 0.2 times 𝑓 of 𝑦 three. 𝑓 of 𝑦 three is 𝑦 three plus one, which is 0.728 plus one, which is 1.728. We, therefore, have 𝑦 four is equal to 0.728 plus 0.2 times 1.728. That’s equal to 1.0736 so that 𝑦 four is equal to 1.0736.

Finally, we can use 𝑦 four to calculate 𝑦 five, which is equal to 𝑦 four plus β„Ž times 𝑓 of 𝑦 four. And that’s equal to 1.0736 plus 0.2 times 𝑓 of 𝑦 four. 𝑓 of 𝑦 four is 𝑦 four plus one, which is 1.0736 plus one, which is equal to 2.0736. So that 𝑦 five is equal to 1.0736 plus 0.2 times 2.0736 which is equal to 1.48832. 𝑦 five is, therefore, 1.48832. And remember that 𝑦 five is 𝑦 of π‘₯ five, which is equal to 𝑦 of one. So 𝑦 of one is equal to 1.48832.

The graph shown is a computer-generated solution to a differential equation. We found the 𝑦-values for the five steps within our interval. And if we plot these points on our graph, we can see that our solution curve is not too far away from the computer-generated solution. The computer-generated solution would have had a much smaller step size and so would be closer to the true solution. This demonstrates that the smaller the step size, the more accurate the approximation.

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