Example 1
Given the IVP y(1)(t) = 1 - t y(t) with y(0) = 1, approximate y(1) with one step.
First, let t0 = 0, y0 = 1, and h = 1. Therefore our approximation is y1 = y0 + h(1 - t0 y0) = 1 + 1 (1 - 0⋅1) = 2. The actual value is 1.331309118 and therefore the absolute error is approximately 0.669.
Example 2
Given the same IVP shown in Example 1, approximate y(0.5).
First, let t0 = 0, y0 = 1, and h = 0.5. Therefore our approximation is y1 = y0 + h(1 - t0 y0) = 1 + 0.5 (1 - 0⋅1) = 1.5. The actual value is 1.342841185 and therefore the error is 0.157, or approximately 1/4 the error in Example 1.
Example 3
Repeat Examples 1 and 2 but with with the initial value y(0.5) = 2.5 and approximating y(1.5) and y(1.0).
First, let t0 = 0.5, y0 = 2.5, and h = 1. Therefore our approximation is y1 = y0 + h(1 - t0 y0) = 2.5 + 1 (1 - 0.5 ⋅ 2.5) = 2.25. The actual value is 1.502483616 and therefore the absolute error is approximately 0.748.
Next, let t0 = 0.5, y0 = 2.5, and h = 0.5. Therefore our approximation is y1 = y0 + h(1 - t0 y0) = 2.5 + 0.5 (1 - 0.5 ⋅ 2.5) = 2.375. The actual value is 2.126611964 and therefore the absolute error is approximately 0.248.
In this case, the error is not exactly 1/4, but if we shrink the interval by half again, approximating y(0.75):
t0 = 0.5, y0 = 2.5, and h = 0.25. Therefore our approximation is y1 = y0 + h(1 - t0 y0) = 2.5 + 0.25 (1 - 0.5 ⋅ 2.5) = 2.4375. The actual value is 2.368609584 and therefore the absolute error is approximately 0.0689, which is closer to 1/4 the error found when approximating y(1).
If we tabulate the errors for various values of h, as is shown in Table 1, we note that as h gets smaller, the error drops by almost exactly 1/4 each time we divide h by two.
Table 1. Errors when approximating y(t0 + h) for decreasing values of h.
h | Approximation of y(0.5 + h) | Error |
---|---|---|
1 | 2.25 | 0.748 |
0.5 | 2.375 | 0.248 |
0.25 | 2.4375 | 0.0689 |
0.125 | 2.46875 | 0.0179 |
0.0625 | 2.484375 | 0.00457 |
0.03125 | 2.4921875 | 0.00115 |
0.015626 | 2.49609375 | 0.000289 |
0.0078125 | 2.498046875 | 0.0000723 |
Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.