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:
We can illustrate the Taylor method by considering the differential
equation:
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:
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:
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.