e-MATH



Celestial Mechanics on a Graphing Calculator



A simple example of the Runge-Kutta algorithm

An illustration of the Runge-Kutta algorithm applied to the differential equation y' = 2y with a step size of 1 and initial value y(0) = 1/4.

The predicted value is a linear combination, with coefficients 1/6, 2/6, 2/6, 1/6 of the values obtained by

  • following the (blue) slope 1/2 line at (0,1/4). This gives y = 3/4.
  • following the (green) line with the slope (1) picked up by the blue line at x = 1/2. This gives y = 5/4.
  • following the (orange) line with the slope (3/2) picked up by the green line at x = 1/2. This gives y = 7/4.
  • following the (black) line with the slope (7/2) picked up by the orange line at x = 1. This gives y = 15/4.
The total is (1/24)(3+10+14+15) = 1.75.

The same computational load would buy 4 iterations of Euler's method yielding 1.265.

The exact value is y(1) = (1/4)e2 = 1.85.



 
Comments: webmaster@ams.org
@ Copyright 2001, American Mathematical Society.