So, using Taylor, we have that
Euler simply dropped the error term, to generate the succession of iterates
This is a difference equation associated with the given differential equation. Its solution, we hope, will be relatively close to the solution of the IVP. Hope aside, how bad can things get? What's the worst that can happen? The answer is in the following theorem:
Theorem 5.9 (error bound): Suppose f is continuous and satisfies a Lipschitz condition with constant L on
and that a constant M exists with
Let y(t) denote the unique solution to the IVP
and be the Euler approximations. Then, for each ,
Proof: Let . Then
. Therefore
since f satisfies a Lipschitz condition in y. Hence
This is related to a linear recurrence relation that will bound the error for :
if you've had MAT385, then you know that we can solve these (guess and check, induction):
has solution
Therefore,
or
This form shows that the error incurred by Euler's method is linear in h: for a given , is linear in h.
One problem with the error bound (2) is that we need to have a bound on y'', and we're looking for y! This is quite a contrast to the situation when we were dealing with a known y and trying to bound higher derivatives. The chain rule may come to our rescue:
Or it may not!;) The problem is that you will more than likely still have a term with y in it, which is unknown....
Sometimes physics can bound it for us: if we've derived our problem from physical conditions, e.g. F=ma, and we're looking for the function who's second derivative is a, then is a physical upper bound on the second derivative! In the pendulum problem, the greatest acceleration would occur in free fall, when all of the force of gravity is acting on the pendulum bob. Thus g is the bound on the second derivative in our problem.
One obvious strategy for improving our Euler approximations is to make h tremendously small. This may backfire, however, due to round-off error: if we examine the perturbed difference equation
we arrive at
Theorem 5.10: Let y(t) denote the unique solution to the IVP (1), and the solution of the perturbed difference equation above. Then
where for all i. The minimal error occurs when