Implement Explicit Runge-Kutta Methods
JP-Ellis opened this issue · 0 comments
JP-Ellis commented
Explicit Runge-Kutta methods are perhaps the simplest to implement, at least naively.
Things to implement:
- Naive implementatino of the Runge-Kutta method
- 'First same as last' optimisation
Tableaus to implement
-
Explicit Methods
-
Forward Euler
$$\begin{array}{c|c} 0 & \\\hline & 1 \end{array}$$ -
Explicit Midpoint Method
$$\begin{array}{c|cc} 0 & \\\ \frac{1}{2} & \frac{1}{2} & \\\hline & 0 & 1 \end{array}$$ -
Heun's Method
$$\begin{array}{c|cc} 0 \\\ 1 & 1 \\\hline & \frac{1}{2} & \frac{1}{2} \end{array}$$ -
Ralston's Method
$$\begin{array}{c|cc} 0 \\\ \frac{2}{3} & \frac{2}{3} \\\hline & \frac{1}{4} & \frac{3}{4} \end{array}$$ -
Generic Second Order Method
$$\begin{array}{c|cc} 0 \\\ \alpha & \alpha \\\hline & 1 - \frac{1}{2 \alpha} & \frac{1}{2 \alpha} \end{array}$$ -
Kutta's Third-Order Method
$$\begin{array}{c|ccc} 0 \\\ \frac{1}{2} & \frac{1}{2} \\\ 1 & -1 & 2 \\\hline & \frac{1}{6} & \frac{2}{3} & \frac{1}{6} \end{array}$$ -
Generic Third-Order Method
$$\begin{array}{c|ccc} 0 \\\ \alpha & \alpha \\\ 1 & 1 + \frac{1 - \alpha}{\alpha(3 \alpha - 2)} & - \frac{1 - \alpha}{\alpha(3 \alpha - 2)} \\\hline & \frac{1}{2} - \frac{1}{6\alpha} & \frac{1}{6\alpha(1-\alpha)} & \frac{2 - 3\alpha}{6(1 - \alpha)} \end{array}$$ -
Heun's Third-Order Method
$$\begin{array}{c|ccc} 0 \\\ \frac{1}{3} & \frac{1}{3} \\\ \frac{2}{3} & 0 & \frac{2}{3} \\\hline & \frac{1}{4} & 0 & \frac{3}{4} \\\ \end{array}$$ -
Van der Houwen's Method
$$\begin{array}{c|ccc} 0 \\\ \frac{8}{15} & \frac{8}{15}\\\ \frac{2}{3} & \frac{1}{4} & \frac{5}{12} \\\hline & \frac{1}{4} & 0 & \frac{3}{4} \\\ \end{array}$$ -
Ralston's Third-order Method
$$\begin{array}{c|ccc} 0 \\\ \frac{1}{2} & \frac{1}{2} \\\ \frac{3}{4} & 0 & \frac{3}{4} \\\hline & \frac{2}{9} & \frac{1}{3} & \frac{4}{9} \\\ \end{array}$$ -
Third-order Strong Stability Preserving Runge-Kutta
$$\begin{array}{c|ccc} 0 \\\ 1 & 1 \\\ \frac{1}{2} & \frac{1}{4} & \frac{1}{4}\\\hline & \frac{1}{6} & \frac{1}{6} & \frac{2}{3} \\\ \end{array}$$ -
Class Fourth-Order Method
$$\begin{array}{c|cccc} 0 \\\ \frac{1}{2} & \frac{1}{2} \\\ \frac{1}{2} & 0 & \frac{1}{2} \\\ 1 & 0 & 0 & 1 \\\hline & \frac{1}{6} & \frac{1}{3} & \frac{1}{3} & \frac{1}{6}\\\ \end{array}$$ -
3/8-rule Fourth-Order Method
$$\begin{array}{c|cccc} 0 \\\ \frac{1}{3} & \frac{1}{3} \\\ \frac{2}{3} & -\frac{1}{3} & 1 \\\ 1 & 1 & -1 & 1 \\\hline & \frac{1}{8} & \frac{3}{8} & \frac{3}{8} & \frac{1}{8}\\\ \end{array}$$ -
Ralston's Fourth Order Method
$$\begin{array}{c|cccc} 0 \\\ .4 & .4\\\ .45573725 & .29697761 & .15875964\\\ 1 & .21810040 & -3.05096516 & 3.83286476 \\\hline & .17476028 & -.55148066 & 1.20553560 & .17118478 \\\ \end{array}$$
-
-
Explicit embedded methods
-
Heun-Euler
$$\begin{array}{c|cc} 0&\\\ 1& 1 \\\hline & \frac{1}{2}& \frac{1}{2}\\\ & 1 & 0 \end{array}$$ -
Fehlberg RK1(2)
$$\begin{array}{c|ccc} 0 & \\\ \frac{1}{2} & \frac{1}{2} & \\\ 1 & \frac{1}{256} & \frac{255}{256} \\\hline & \frac{1}{512} & \frac{255}{256} & \frac{1}{512} \\\ & \frac{1}{256} & \frac{255}{256} & 0 \end{array}$$ -
Bogacki-Shampine
$$\begin{array}{c|cccc} 0 \\\ \frac{1}{2} & \frac{1}{2} \\\ \frac{3}{2} & 0 & \frac{3}{4} \\\ 1 & \frac{2}{9} & \frac{1}{3} & \frac{4}{9} \\\hline & \frac{2}{9} & \frac{1}{3} & \frac{4}{9} & 0 \\\ & \frac{7}{24} & \frac{1}{4} & \frac{1}{3} & \frac{1}{8} \end{array}$$ -
Fehlberg 4(5)
$$\begin{array}{r|ccccc} 0 & & & & & \\\ 1 / 4 & 1 / 4 & & & \\\ 3 / 8 & 3 / 32 & 9 / 32 & & \\\ 12 / 13 & 1932 / 2197 & -7200 / 2197 & 7296 / 2197 & \\\ 1 & 439 / 216 & -8 & 3680 / 513 & -845 / 4104 & \\\ 1 / 2 & -8 / 27 & 2 & -3544 / 2565 & 1859 / 4104 & -11 / 40 \\\hline & 16 / 135 & 0 & 6656 / 12825 & 28561 / 56430 & -9 / 50 & 2 / 55 \\\ & 25 / 216 & 0 & 1408 / 2565 & 2197 / 4104 & -1 / 5 & 0 \end{array}$$ -
Cash-Karp
$$\begin{array}{c|cccccc} 0 \\\ \frac{1}{5} & \frac{1}{5} \\\ \frac{3}{10} & \frac{3}{40} & \frac{9}{40} \\\ \frac{3}{5} & \frac{3}{10} & -\frac{9}{10} & \frac{6}{5} \\\ 1 & -\frac{11}{54} & \frac{5}{2} & -\frac{70}{27} & \frac{35}{27} \\\ \frac{7}{8} & \frac{1631}{55296} & \frac{175}{512} & \frac{575}{13824} & \frac{44275}{110592} & \frac{253}{4096} \\\hline & \frac{37}{378} & 0 & \frac{250}{621} & \frac{125}{594} & 0 & \frac{512}{1771} \\\ & \frac{2825}{27648} & 0 & \frac{18575}{48384} & \frac{13525}{55296} & \frac{277}{14336} & \frac{1}{4} \end{array}$$ -
Dormand-Prince
$$\begin{array}{c|ccccccc} 0 \\\ \frac{1}{5} & \frac{1}{5} \\\ \frac{3}{10} & \frac{3}{40} & \frac{9}{40} \\\ \frac{4}{5} & \frac{44}{45} & -\frac{56}{15} & \frac{32}{9} \\\ \frac{8}{9} & \frac{19372}{6561} & -\frac{25360}{2187} & \frac{64448}{6561} & -\frac{212}{729} \\\ 1 & \frac{9017}{3168} & -\frac{355}{33} & \frac{46732}{5247} & \frac{49}{176} & -\frac{5103}{18656} \\\ 1 & \frac{35}{384} & 0 & \frac{500}{1113} & \frac{125}{192} & -\frac{2187}{6784} & \frac{11}{84} \\\hline & \frac{35}{384} & 0 & \frac{500}{1113} & \frac{125}{192} & -\frac{2187}{6784} & \frac{11}{84} & 0 \\\ & \frac{5179}{57600} & 0 & \frac{7571}{16695} & \frac{393}{640} & -\frac{92097}{339200} & \frac{187}{2100} & \frac{1}{40} \end{array}$$
-