Interactive Educational Modules in
Scientific Computing

Taylor Series Methods

This module illustrates Taylor series methods for numerically solving initial value problems for ordinary differential equations. A numerical method for an ordinary differential equation (ODE) generates an approximate solution step-by-step in discrete increments across the interval of integration, in effect producing a discrete sample of approximate values of the solution function. The Taylor series method of order n advances the solution at a particular step by calculating the Taylor polynomial of degree n that fits the current solution point and evaluating that polynomial some step size beyond the current point.

The user begins by selecting a differential equation from the menu provided. A solution value for the selected ODE at an initial time is marked with a blue dot, and the exact solution curve for the resulting initial value problem is drawn in black. Starting from this initial value, the user advances the solution using a Taylor series method at each step. Each step is presented as a three-stage process. Each stage is executed by clicking either Next or the currently highlighted stage:

  1. In Choose Parameters, the user defines the parameters for the next step by selecting a specific order Taylor series method from the menu and specifying a step size with the slider. The Taylor polynomial for the selected order is drawn in red, and the provisional solution point that would result from the selected step size is indicated by a red dot. When the desired parameters have been specified, clicking Choose Parameters or Next makes the choices take effect.
  2. The current step is concluded by clicking Take Step or Next, which erases the Taylor polynomial except for the portion within the current step, which changes color from red to green. In addition, the exact solution to the ODE passing through the new point is drawn in gray, and the approximate and true solution values at the new point are printed in the table below.
  3. Clicking Next Step or Next prepares for the next step by calculating it for the default parameters. The default order is the same as that of the previous step. The default step size also matches that of the previous step, unless it is constrained by the minimum or maximum allowed step size.

Successive steps may be continued until the the interval has been fully traversed.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 9.3.5, especially Example 9.11.

Developers: Evan VanderZee and Michael Heath