Next: Runge-Kutta Methods Up: Differential Equations - Evolution Previous: Heun's Method

# Taylor Series Method

The methods discussed above have depended on the use of the Taylor series truncated after first order, either directly or in the evaluation of the mean slope on an interval. It is often desirable to avoid this truncation, so that we are free to use higher order terms from the Taylor series. If we again consider the differential equation , with the initial condition y(x = x0) = y0, it is clear that we can develop the Taylor series for y(x) about the point x0. Since we need the higher order derivatives of y(x), and we have an explicit function for , it is straightforward to differentiate f(x,y) with respect to x, noting that y is also a function of x, to obtain those higher derivatives. The total derivative of a function g(x,y) of both x and y, with respect to x, as indicated by , is given by:

where the subscript on the partial derivatives indicates the variable to be held constant in each differentiation. The second term in this sum uses the chain'' rule to include the fact that g(x,y) depends on y, while y is itself a function of x. Thus it is straightforward, though frequently quite tedious, to compute all the derivatives required in the Taylor series to any desired order.

We can illustrate the Taylor method by considering the differential equation:

It is straightforward to show that:

and that higher derivatives repeat this pattern with y(i+1) = -y(i)/2. The derivatives beyond the first derivative can thus be written as:

On defining h = x - x0, the Taylor series about x = x0 becomes:

If we are given the initial condition that y(x0) = y0, the value of y at the end of the interval, where x = x0 + h, can be obtained to chosen order in h by direct substitution of x0, y0, and h into the series given here.

In fact, inspection shows that this series actually contains all the terms for the Taylor series for the function e-h/2 except for the first two terms, that is except for the expression 1 - h/2, so that after some simplification, we have:

It is interesting to note that we can now obtain the exact solution for y by noting first that the above expression is true for all h, x0, and y0, since all the terms of the Taylor series are included, so that we can choose x0 = 0, and replace h by x, with the result that:

where it is clear that y0 is the value of y when x = 0. This form of the solution illustrates the family of curves y(x) whose slopes are given by the direction field f(x,y) = (x - y)/2, for varying y-intercept y0. For example, consider the case of the curve which has y = 1 at x = 0. The solution for y(x) can then be written:

We can now use the above results to build an iteration scheme to evaluate the solution of the differential equation. Again consider an interval [xi,xi+1] of length h, where we know the value yi at the beginning of the interval, that is, at x = xi. The iterative step is then given by:

The initial condition that y(x0) = x0 is implemented by starting the iterative scheme with i = 0, using these x and y values.

While in this case, we were fortunate enough to be able to recognize that the exponential series form was present, it is usually the case that a straightforward application of the Taylor series to some appropriate order is all that is possible. Even in that case, the advantages of the Taylor series approach are clear. The truncation error can be controlled by evaluating the derivatives to appropriate order. This is always possible, but frequently grows cumbersome for the higher derivatives, since the successive derivatives for many functions become progressively more complicated. Nevertheless, the Taylor series method provides the standard against which other methods can be evaluated, and forms the theoretical basis for other methods.

Next: Runge-Kutta Methods Up: Differential Equations - Evolution Previous: Heun's Method
Charles Dyer
2002-04-24