Lab 22 · Lecture 22 · ODEs II: Runge–Kutta and Predictor–Corrector Methods
Runge-Kutta and Predictor-Corrector Lab
Compare Euler, Heun and RK4 on your own equations, solve systems in the phase plane, and run Adams' predictor–corrector method.
Type y′ = f(x, y), the start, h and the end. Tick the methods to compare; the table lists the steps of the first one (RK4 by default).
Two equations x′ = f(x, y), y′ = g(x, y). Use the conserved quantity to judge the method.
RK4 and the spring
Try this
Adams–Bashforth–Moulton
Try this
Q1 Write the fourth-order Runge–Kutta formulas.
, , , , .
Q2 Why are Runge–Kutta methods preferred to the Taylor series method?
They reach the same order using only values of , so no derivatives of have to be derived and coded for each new equation.
Q3 State Milne's predictor and corrector formulas.
Predictor ; corrector (Simpson's rule).
Q4 Why are predictor–corrector methods not self-starting?
Their formulas use values at several previous points (); at the start only is known, so the first few values must come from a one-step method such as RK4.
Q5 What is a stiff differential equation?
One with components that decay at very different rates, so that explicit methods must use a step size set by the fastest (already negligible) component to stay stable, e.g. . Implicit methods remove this restriction.