First page Back Continue Last page Overview Graphics
Fourth-Order Runge-Kutta
Actually, there are many ways to evaluate f' at midpoints, which add higher order error terms with different coefficients. Can add these together in ways such that higher order error terms cancel.
- e.g. can build fourth-order Runge-Kutta (RK4):
- k1 = h f'(tn,yn)
- k2 = h f'(tn + h/2,yn + k1/2)
- k3 = h f'(tn + h/2,yn + k2/2)
- k4 = h f'(tn + h,yn + k3)
- Then yn+1 = yn + k1/6 + k2/3 + k3/3 + k4/6 + O(h5)
Notes: