MATH/APPM 4650
Class notes, March 16

Taylor methods

Today's notes will mostly be on the board.

Recall Euler's method says
w0 = y0,    wi+1 = wi + h f(ti, wi)
should be a good approximation to y(ti).

It comes from
y(t+h) ≈ y(t) + hy'(t) + ...
and the fact that we know y'(t) = f(t, y).

If we use more terms in this Taylor series, we should get a better approximation.

But what's y''(t)?

Just use the Chain rule:

For example, if y'(t) = t2 + y2, then


So instead of Euler's method which would give
wi+1 = wi + h (ti2 + wi2),
the second-order Taylor method would be
wi+1 = wi + h (ti2 + wi2) + h2/2 [2ti + 2wi (ti2 + wi2)].

The error in the second-order Taylor method is the next unused term in the Taylor series, which looks like
h3/6 y'''i)


This is the error at each step even if the previous step were correct.

The total error, for a given time t, will look like
Ch2 [exp(Lt) - 1]
without roundoff. Here C and L are some numbers depending on derivatives of f and the initial condition.

In general we may use a Taylor method of any order.
  1. Start with the general Taylor series formula.
  2. Replace y'(t) with f(t, y).
  3. Replace y''(t) with ft(t, y) + f(t, y) fy(t, y).
  4. Continue computing higher derivatives using the differential equation and the chain rule, as needed.
  5. Once you have a formula giving y(t+h) only in terms of t and y (not y' or any other derivative), replace t with ti, replace y(t) with wi, and replace y(t+h) with wi+1.
This is the Taylor method of order n.
The error at each step will be O(hn+1), and the overall error will be O(hn).




Definition: If wi+1 = H(ti, wi) is any method for approximating the solution of y'(t) = f(t, y(t)), then the local truncation error of the method is defined as follows:
  1. Assume wi = y(ti).
  2. By expanding y(ti + h) in a Taylor series in h, find the error in wi+1 - y(ti+h).
  3. The local truncation error is then [wi+1 - y(ti+h)]/h.
Dividing by h at the end is so that we know not just happens at one step, but rather what the accumulated error is over all n steps.

Usually we only care about the order of the error.
So Euler's method has local truncation error O(h) and the second-order Taylor method has local truncation error O(h2).