Implicit Runge-Kutta Methods
We are now in a position to generalize the Runge-Kutta family to implicit schemes. Recall the s s s -stage Runge-Kutta update:
y i + 1 = y i + h ∑ n = 1 s a n k n y_{i+1} = y_i + h \sum_{n=1}^{s} a_n k_n y i + 1 = y i + h n = 1 ∑ s a n k n where each stage slope k n k_n k n can now depend on all stage slopes k 1 , … , k s k_1, \dots, k_s k 1 , … , k s :
k n = f ( t i + p n h , y i + h ∑ m = 1 s q n m k m ) k_n = f\!\left(t_i + p_n h,\; y_i + h \sum_{m=1}^{s} q_{nm} k_m\right) k n = f ( t i + p n h , y i + h m = 1 ∑ s q nm k m ) The general Butcher tableau is therefore a full s × s s \times s s × s matrix:
p 1 q 11 q 12 … q 1 s p 2 q 21 q 22 … q 2 s ⋮ ⋮ ⋮ ⋱ ⋮ p s q s 1 q s 2 … q s s a 1 a 2 … a s \begin{array}{c|cccc}
p_1 & q_{11} & q_{12} & \dots & q_{1s} \\
p_2 & q_{21} & q_{22} & \dots & q_{2s} \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
p_s & q_{s1} & q_{s2} & \dots & q_{ss} \\
\hline
& a_1 & a_2 & \dots & a_s
\end{array} p 1 p 2 ⋮ p s q 11 q 21 ⋮ q s 1 a 1 q 12 q 22 ⋮ q s 2 a 2 … … ⋱ … … q 1 s q 2 s ⋮ q ss a s In explicit RK methods (q n m = 0 q_{nm} = 0 q nm = 0 for m ≥ n m \ge n m ≥ n ), the stages k n k_n k n are evaluated sequentially. In implicit RK methods, the coupled system of s s s nonlinear equations for k 1 , … , k s k_1, \dots, k_s k 1 , … , k s must be solved simultaneously at every time step, trading higher computational cost for exceptional stability and accuracy.
Implicit Euler Method ¶ The Implicit Euler (Backward Euler) method is the 1-stage, first-order implicit Runge-Kutta scheme:
y i + 1 = y i + h f ( t i + 1 , y i + 1 ) y_{i+1} = y_i + h f(t_{i+1}, y_{i+1}) y i + 1 = y i + h f ( t i + 1 , y i + 1 ) Its Butcher tableau has a single non-zero diagonal entry q 11 = 1 q_{11} = 1 q 11 = 1 :
1 1 1 \begin{array}{c|c}
1 & 1 \\
\hline
& 1
\end{array} 1 1 1 Second-Order Implicit Runge-Kutta Methods ¶ Implicit Midpoint Method ¶ The 1-stage Implicit Midpoint method achieves second-order accuracy (O ( h 2 ) \mathcal{O}(h^2) O ( h 2 ) ) by evaluating the slope at the implicit midpoint:
y i + 1 = y i + h k 1 , k 1 = f ( t i + 1 2 h , y i + 1 2 h k 1 ) y_{i+1} = y_i + h k_1, \qquad k_1 = f\!\left(t_i + \frac{1}{2}h,\; y_i + \frac{1}{2}h k_1\right) y i + 1 = y i + h k 1 , k 1 = f ( t i + 2 1 h , y i + 2 1 h k 1 ) Equivalently, y i + 1 / 2 = y i + h 2 f ( t i + 1 2 h , y i + 1 / 2 ) y_{i+1/2} = y_i + \frac{h}{2} f(t_i + \frac{1}{2}h, y_{i+1/2}) y i + 1/2 = y i + 2 h f ( t i + 2 1 h , y i + 1/2 ) , with Butcher tableau:
1 2 1 2 1 \begin{array}{c|c}
\frac{1}{2} & \frac{1}{2} \\
\hline
& 1
\end{array} 2 1 2 1 1 Implicit Trapezoid (Crank-Nicolson) Method ¶ The Implicit Trapezoid method (widely known as the Crank-Nicolson scheme in PDE time-stepping) averages the explicit slope at t i t_i t i and the implicit slope at t i + 1 t_{i+1} t i + 1 :
y i + 1 = y i + h 2 ( f ( t i , y i ) + f ( t i + 1 , y i + 1 ) ) y_{i+1} = y_i + \frac{h}{2} \left( f(t_i, y_i) + f(t_{i+1}, y_{i+1}) \right) y i + 1 = y i + 2 h ( f ( t i , y i ) + f ( t i + 1 , y i + 1 ) ) 0 0 0 1 1 2 1 2 1 2 1 2 \begin{array}{c|cc}
0 & 0 & 0 \\
1 & \frac{1}{2} & \frac{1}{2} \\
\hline
& \frac{1}{2} & \frac{1}{2}
\end{array} 0 1 0 2 1 2 1 0 2 1 2 1 Gauss-Legendre Order 4 (2 Stages) ¶ By placing stage nodes at the roots of shifted Legendre polynomials (just like Gaussian quadrature!), an s s s -stage implicit Gauss-Legendre method achieves the maximum possible order 2 s 2s 2 s . For s = 2 s = 2 s = 2 stages, we obtain a fourth-order (O ( h 4 ) \mathcal{O}(h^4) O ( h 4 ) ), unconditionally A-stable scheme with Butcher tableau:
1 2 − 3 6 1 4 1 4 − 3 6 1 2 + 3 6 1 4 + 3 6 1 4 1 2 1 2 \begin{array}{c|cc}
\frac{1}{2} - \frac{\sqrt{3}}{6} & \frac{1}{4} & \frac{1}{4} - \frac{\sqrt{3}}{6} \\
\frac{1}{2} + \frac{\sqrt{3}}{6} & \frac{1}{4} + \frac{\sqrt{3}}{6} & \frac{1}{4} \\
\hline
& \frac{1}{2} & \frac{1}{2}
\end{array} 2 1 − 6 3 2 1 + 6 3 4 1 4 1 + 6 3 2 1 4 1 − 6 3 4 1 2 1 At each step, k 1 k_1 k 1 and k 2 k_2 k 2 are found by solving the coupled system:
k 1 = f ( t i + ( 1 2 − 3 6 ) h , y i + h ( 1 4 k 1 + ( 1 4 − 3 6 ) k 2 ) ) k 2 = f ( t i + ( 1 2 + 3 6 ) h , y i + h ( ( 1 4 + 3 6 ) k 1 + 1 4 k 2 ) ) \begin{aligned}
k_1 &= f\!\left(t_i + \left(\frac{1}{2} - \frac{\sqrt{3}}{6}\right)h,\; y_i + h\left(\frac{1}{4}k_1 + \left(\frac{1}{4} - \frac{\sqrt{3}}{6}\right)k_2\right)\right) \\
k_2 &= f\!\left(t_i + \left(\frac{1}{2} + \frac{\sqrt{3}}{6}\right)h,\; y_i + h\left(\left(\frac{1}{4} + \frac{\sqrt{3}}{6}\right)k_1 + \frac{1}{4}k_2\right)\right)
\end{aligned} k 1 k 2 = f ( t i + ( 2 1 − 6 3 ) h , y i + h ( 4 1 k 1 + ( 4 1 − 6 3 ) k 2 ) ) = f ( t i + ( 2 1 + 6 3 ) h , y i + h ( ( 4 1 + 6 3 ) k 1 + 4 1 k 2 ) ) followed by the symmetric update:
y i + 1 = y i + h 2 ( k 1 + k 2 ) y_{i+1} = y_i + \frac{h}{2}\left(k_1 + k_2\right) y i + 1 = y i + 2 h ( k 1 + k 2 ) Many additional families (such as Radau and Lobatto collocation methods, and diagonally implicit Runge-Kutta schemes) are catalogued in the list of Runge-Kutta methods .