For the initial-value problem
\frac {dy}{dt}+y^{2} = t , y(0) = 1
that we have just considered, apply Euler’s method to estimate the value of y(1/2) using h = 0.1.
For the initial-value problem
\frac {dy}{dt}+y^{2} = t , y(0) = 1
that we have just considered, apply Euler’s method to estimate the value of y(1/2) using h = 0.1.
At the end of this section, the implementation of Euler’s method in a spreadsheet such as Excel will be discussed. Here, we simply report the results of such a computer implementation. If we use a step size of h = 0.1, we see that we will take five steps to move from t_{0} = 0 to t_{5} = 0.5, the point at which we seek to approximate y. Doing so yields the output shown in table 2.1.
Table 2.1:Euler’s method applied to the IVP y´= t −y^{2}, y(0) = 1, using h = 0.1
y_{n} | t_{n} |
1 | 0 |
0.9 | 0.1 |
0.829 | 0.2 |
0.7802759 | 0.3 |
0.749392852 | 0.4 |
0.733233887 | 0.5 |
With just five steps, we can see in the direction field in figure 2.8, together with a piecewise linear plot of the approximate solution, that we have an apparently good estimate in the above table for how the actual solution to this IVP behaves on this interval.