Runge-Kutta methods
RK2
- \(\displaystyle u^{k+1}=u^{k}+\frac{1}{2}\,(k_1+k_2)\)
- \(k_1=h\,\mathcal{F}(u^k,t^k)\)
- \(k_2=h\,\mathcal{F}(u^k+k_1,t^k+h)\)
Midpoint method
- \(k_1=h\,\mathcal{F}(u^k,t^k)\)
- \(k_2=h\,\mathcal{F}(u^k+k_1/2,t^k+h/2)\)
- \(u^{k+1}=u^k+h\,k_2\)
- RK2 and Midpoint are 2nd order accurate, still not stable for harmonic oscillator.
RK4 (Classical Runge-Kutta)
- \(k_1=h\,\mathcal{F}(u^k,t^k)\)
- \(\displaystyle k_2=h\,\mathcal{F}\left(u^k+\frac{k_1}{2},t^k+\frac{h}{2}\right)\)
- \(\displaystyle k_3=h\,\mathcal{F}\left(u^k+\frac{k_2}{2},t^k+\frac{h}{2}\right)\)
- \(k_4=h\,\mathcal{F}\left(u^k+k_3,t^k+h\right)\)
- \(\displaystyle u^{k+1}=u^k+\frac{1}{6}(k_1+2 k_2+2 k_3+k_4)\)
- 4th order, conditionally stable