Example 6. How good
did it get?
Solution 6.
Since all the graphs"look alike", we will need to "trust" that the analytic solution is known to be:
Observe that the error for 50 subintervals is very close to
of the error for 25 subintervals.
Since the version of the finite difference method we are using is
known to be of order
,
we expect this to happen.
When extrapolation is used in a method of order
,
a formula like
is used.
Extrapolation works !
(c) John H. Mathews 2004