Euler's method for a first order IVP y' = f(z,y), y(zo) = Yo is the following algorithm. From (c0, Yo) we define a sequence of approximations to the solution of the differential equation so that at the nth stage, we have
Cn = zn-1 + h
Yn = yn-1 + h * f(zn-1, yn-1)
In this exercise, we consider the IVP y' = et with y(0.5) = 2. This equation is first order with the exact solution y = In(e^z e^0.5 + e^2).
Use Euler's method with h = 0.5 to complete the following table:
In the first two rows, enter the values of Tn and yn, and in the third row, use the exact solution to find the errors en = |y(zn) - Yn|. A calculator or other scientific software would be handy to work on these types of problems.
Cn | 0.5
Yn |
en |