Delta Banner

Mathematics & Science Learning Center
Computer Laboratory


Numerical Methods for Solving Differential Equations

The Runge-Kutta Method

Mathematica Implementation

(continued from last page...)

Recall from the first numerical methods lab that we had managed to create a program for finding numerical solutions of a first order differential equation using Euler's method. The program we created was as follows:


Block[{ xold=x0,


  Do[ xnew=xold+h;


Mathematica Icon Go ahead and switch to a new Mathematica notebook by clicking on the button at left. Remember that it will take a while to start up! Once it has launched, enter the old Euler program above, (by using Copy and Paste if you wish,) and then come back here again where we'll discuss modifying it.

Notice that I highlighted a couple of locations in the code in red. Let's move on and discuss why...

Compass If you're lost, impatient, want an overview of this laboratory assignment, or maybe even all three, you can click on the compass button on the left to go to the table of contents for this laboratory assignment.

ODE Laboratories: A Sabbatical Project by Christopher A. Barker

©2017 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA