Adaptive Runge-Kutta addresses the problem of functions that change rapidly at a point
Would like to use small size steps in the area of rapid change - normal size steps in area of normal change Two approaches behind adaptive step size look at difference between predictions with different step sizes but same order RK look at difference between predictions with different order RK
Step-halving or adpartive Runge-Kutta let y 1 be single-step prediction let y 2 be prediction using two half steps The correction is fifth order accurate
Example:
Integrate y’ from x=0 to 2 using h=2, and improve using adaptive RK Complete step results are Half step results are
The correction is The corrected value is Compare to true value y(2)=
Runge-Kutta-Fehlberg Uses two different RK predictions of different order Special choice of methods lets you use results from 4th order in 5th order RK - then combine them
Fourth order RK Fifth order RK
Formula for k’s
Example Use h=2, and the RKF method
The results are RK4= RK5= and Ea=RK5-RK4= = Now adjust stepsize
If Ea is too small, increase step size If Ea is too large, decrease step size
Stiffness stiff equation involves rapidly changing parts and slowly changing parts Solution is
Look at homogeneous part of equation In general Explicit Euler’s method
Look at what happens to y over long time - stability Ifthen y goes to infinity Sofor explicit method to work - small h
Need to use implicit methods, rather than explicit Implicit form of the Euler method Can solve to get
Implicit Euleris always stable - as i increases y goes to 0
Example: Explict solution: since a is 2000, let h=0.0001
Stability limit is h= Try h=0.0007
Try h=0.001
h=0.002
Implicit approach:
h=0.002