Skip to main content

Section 1.6 Higher Order Methods: Taylor

Going back to the way we introduced the Euler method, recall that, when \(f(t,x)\) is smooth (\(C^\infty\)), we can expand the solution of the IVP
\begin{equation*} \dot x=f(t,x),\; x(t_0)=x_0 \end{equation*}
as a Taylor series
\begin{equation*} x(t+h) = x(t) + \dot x(t) h + \frac{\ddot x(t)}{2} h^2 + \dots + \frac{x^{(k)}(\tau)}{k!}h^k+ \frac{x^{(k+1)}(\tau)}{(k+1)!}h^{k+1}. \end{equation*}
As mentioned already, all derivatives of \(x(t)\) can be expressed in terms of \(f\) as follows:
\begin{equation*} \begin{aligned} \dot x(t) =& f(t,x(t));\cr \ddot x(t) =& f_t(t,x(t)) + \dot x(t) f_x(t,x(t)) = f_t(t,x(t)) + f(t,x(t))\,f_x(t,x(t));\cr \dddot x(t) =& f_{tt} + ff_{tx}+f_tf_x+ff_{x}^2+ff_tf_x+f^2f_{xx};\cr ...&\cr \end{aligned} \end{equation*}
where we omitted the functions arguments in the last row to keep the expression compact. Such a method has, as expected, local error of order \(k\text{.}\)

Notice that the Taylor series method of local order 2, namely with \(k=1\text{,}\) is the explicit Euler method.

Example. Let us solve our usual IVP
\begin{equation*} x' = -x\cos t,\;x(0)=1. \end{equation*}
with the Taylor series method of local order 3, namely \(k=2\text{.}\)

In this case, the algorithm reads
\begin{equation*} x_{n+1} = x_n - h x_n\cos t_n + h^2 x_n (\sin t_n + \cos^2 t_n) \end{equation*}
Global error. By running the code above with different values of \(h\text{,}\) one can verify easily that the global order of this method is 2.

Pros & Cons. Taylor methods allow to find at once methods with local error of arbitrarily large order. Nevertheless, these methods are not among the most popular. For instance, neither MATLAB's neither Python's own ODE solvers use Taylor methods and neither do that standard numerical libraries such as GSL and Numerical Recipes.

A possible reason of this is that, in case of large systems of ODEs, the expression of the higher derivatives of \(f(t,x)\) often becomes extremely long, which is a potential source of typos and of hard-to-control round-off errors.

Nevertheless, there is still interest in these methods - see in particular Taylor series based computations and MATLAB ODE solvers comparisons and Taylor Series Based Solution of Linear ODE Systems and MATLAB Solvers Comparison, by Sviatek et al..