Higher Order Taylor Methods: Marcelo Julio Alvisio & Lisa Marie Danz May 16, 2007
Higher Order Taylor Methods: Marcelo Julio Alvisio & Lisa Marie Danz May 16, 2007
1 Introduction
1
2 Theory of the Higher Order Taylor Method
Definition 2.1 Consider the differential equation given by y � (t) = f (t, y), y(a) =
c. Then for b > a, the nth order Taylor approximation to y(b) with K steps is
given by yK , where {yi } is defined recursively as:
t0 = a
y0 = y(a) = c
ti+1 = ti + h
h2 ∂f hn ∂ n−1 f
yi+1 = yi + hf (ti , yi ) + (ti , yi ) + ... + (ti , yi )
2 ∂t n! ∂tn−1
with h = (b − a)/K.
It makes sense to formulate such a definition in view of the Taylor series expan
sion that is used when y(t) is known explicitly. All we have done is use f (t, y)
for y � (t), ft (t, y) for y �� (t), and so forth. The next task is to estimate the error
that this approximation introduces.
We know by Taylor’s Theorem that, for any solution that admits a Taylor
expansion at the point ti , we have
h2 �� hn (n) h(n+1) (n+1)
y(ti+1 ) = y(ti ) + hy � (ti ) + y (ti ) + ... + y (ti ) + y (σ)
2 n! (n + 1)!
where σ is between ti and ti+1
Using y � = f (t, y), this translates to
Therefore, the local error, that is to say, the error introduced at each step if the
values calculated previously were exact, is given by:
1 ∂ (n) f
Ei = (hn+1 ) (σ, y(σ))
(n + 1)! ∂tn
which means that
1 ∂ (n) f
Ei ≤ max (hn+1 ) (σ, y(σ))
σ∈[a,b] (n + 1)! ∂tn
2
We can say Ei = O(hn+1 ). Now, since the number of steps from a to b is
proportional to 1/h, we multiply the error per step by the number of steps to
find a total error
E = O(hn ).
3 In Practice: Examples
3
In figure 1, the graph on the left show the approximations of y(t) plotted against
t by using Euler’s method. Each line corresponds to one row of the table above,
that is, to different step sizes h = 1/2, 1/4, 1/8 and 1/16. The graphs on the
right show the error plotted against t, so the errors at t = 2 are those given in
the table. Here again, each line corresponds to a different step size h = 1/2,
1/4, 1/8 and 1/16, Obviously, the lines with error closer to zero correspond to
higher values of k.
Figure 1: Euler’s Method: numerical computation of the solution with step size
(on the left) and the corresponding error (on the right).
Similarly, we have produced the same graphs using Taylor’s method of Second
and Third order. They are show in figure 2 and 3 respectively.
Now we will consider more examples to compare the pattern of the error values.
We will not include the new graphs since their similarity with the graphs for
the first example makes them uninteresting.
Example 3.2 Here we consider the equation f (t, y) = 21y , with initial condition
√
y(0) = 2. Its explicit solution is y(t) = t + 4. If we generate the error as above,
we obtain the following table for t = 1.
k=1 k=2 k=3 k=4
order = 1 −.0066 −.0032 −.0016 −.0008
order = 2 .0003852 .0000917 .0000224 .0000055
order = 3 −.00002837 −.00000330 −.00000040 −.00000005
4
Figure 2: Second order Taylor’s Method: numerical computation of the solution
with step size (on the left) and the corresponding error (on the right).
5
This second example again meets our expectations as stated in Example 1. Upon
inspection, it is clear that first order errors are roughly halved with each increase
in k, second order entries are divided by 4, and third order entries are divided
by 8.
Example 3.4 Consider the differential equation y � (t) = f (t, y) = ty with initial
1 2
condition y(0) = 1. Thus the explicit solution is g(t) = e 2 t . This gives the
following data for t = 1.
k=1 k=2 k=3 k=4
order = 1 .3987 .2293 .1247 .0653
order = 2 .0667 .0225 .0065 .0018
order = 3 .0286 .0045 .0006 .0001
As we have seen in these examples, and as our theory would suggest, the Higher
Order Taylor Method is able to arrive at very accurate approximations with
relatively large step size.
However, we have used the information of the derivatives of f (t, y). Differenti
ation in general can be costly. In practice, there are cases where the differential
equation is a black box: f (t0 , y0 ) can be found by empirical methods given t0
and y0 , but the explicit equation f (t, y) is unknown. In such cases, the Higher
Order Taylor Method simply does not work.
There is a class of differential equations, known as “stiff equations,” to which
this method cannot be readily applied. The solutions of stiff equations are
characterized by decaying as t increases, while the derivatives do not. This can
cause wildly inaccurate approximations unless h is within a certain bound. It
is generally easier to use an alternate method rather than worry about keeping
6
h within its bound. Indeed, other methods have been developed specifically to
accomodate stiff equations.
We have also assumed that the solution has a Taylor expansion that converges
to the actual solution. Although this is the case for a wide variety of functions,
it is advisable to take this into consideration. Alternative ways of verifying the
approximation are advisable.
In summary, the Higher Order Taylor Method is not universally applicable.
When it does apply, it can be fairly accurate. In our examples, the error decays
with decreasing h just as the theory would predict. In fact, the rate of decay is
proportional to hn , where n is the order of approximation used.