Skip to content

Commit cf856f4

Browse files
committed
Update 3_numerical.rst
1 parent 049c87c commit cf856f4

1 file changed

Lines changed: 27 additions & 17 deletions

File tree

source/3_numerical.rst

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,29 @@ The first-order explicit Euler scheme advances the position by sampling the velo
4545
4646
This method incurs a global error of order :math:`O(\Delta t)` and requires only one velocity evaluation per step.
4747

48-
**Second-Order Runge-Kutta (Heun's Method)**
48+
**Runge-Kutta Method**
49+
50+
In an explicit :math:`s`-stage Runge–Kutta method for the initial-value problem:
51+
52+
.. math::
53+
54+
y' = f(t,y), \quad y(t_n) = y_n
55+
56+
one advances the solution by a step :math:`h` as follows. First compute the intermediate slopes
57+
58+
.. math::
59+
60+
k_i = f\Bigl(t_n + c_i\,h,\;y_n + h \sum_{j=1}^{i-1} a_{ij}\,k_j\Bigr),
61+
\quad i = 1,2,\dots,s
62+
63+
and then form the new approximation by
64+
65+
.. math::
66+
67+
y_{n+1} = y_n + h \sum_{i=1}^s b_i\,k_i.
68+
69+
70+
*Second-Order Runge-Kutta (RK2, Heun's)*
4971

5072
Heun's method attains second-order accuracy by combining predictor and corrector slopes:
5173

@@ -58,7 +80,7 @@ Heun's method attains second-order accuracy by combining predictor and corrector
5880
5981
This scheme yields a global error of order :math:`O(\Delta t^2)` with two velocity evaluations per step.
6082

61-
**Classical Fourth-Order Runge-Kutta (RK4)**
83+
*Classical Fourth-Order Runge-Kutta (RK4)*
6284

6385
The classical RK4 method achieves fourth-order accuracy via four slope evaluations at intermediate points:
6486

@@ -72,22 +94,10 @@ The classical RK4 method achieves fourth-order accuracy via four slope evaluatio
7294
7395
This yields a global error of order :math:`O(\Delta t^4)` with four velocity evaluations per step.
7496

75-
**Sixth-Order Runge-Kutta (RK6)**
76-
77-
The seven-stage scheme uses non-uniform weights to attain global :math:`O(\Delta t^6)` accuracy. This method originates from [Butcher]_, as well as the coefficients (Butcher table) listed in the basically-tailest table of the reference.
97+
*Sixth-Order Runge-Kutta (RK6)*
7898

79-
80-
.. math::
81-
82-
k_1 = \mathbf{u}(\mathbf{x}_n,t_n),\\
83-
k_2 = \mathbf{u}\!\bigl(\mathbf{x}_n + \tfrac{\Delta t}{3}k_1,\;t_n + \tfrac{\Delta t}{3}\bigr),\\
84-
k_3 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(\tfrac{1}{6}k_1 + \tfrac{1}{6}k_2),\;t_n + \tfrac{\Delta t}{3}\bigr),\\
85-
k_4 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(\tfrac{1}{8}k_1 + \tfrac{3}{8}k_3),\;t_n + \tfrac{\Delta t}{2}\bigr),\\
86-
k_5 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(\tfrac{1}{2}k_1 - \tfrac{3}{2}k_3 + 2k_4),\;t_n + \tfrac{2\Delta t}{3}\bigr),\\
87-
k_6 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(-\tfrac{3}{2}k_1 + 2k_2 - \tfrac{1}{2}k_3 + k_4),\;t_n + \Delta t\bigr),\\
88-
\mathbf{x}_{n+1} = \mathbf{x}_n + \Delta t\bigl(\tfrac{1}{20}k_1 + \tfrac{1}{4}k_4 + \tfrac{1}{5}k_5 + \tfrac{1}{2}k_6\bigr).
89-
90-
This scheme incurs a global error of order with six velocity evaluations.
99+
The seven-stage scheme uses non-uniform weights to attain global :math:`O(\Delta t^6)` accuracy. This method originates from [Butcher]_.
100+
As for the coefficients for ``RK6`` are more complex to write into equations, the Butcher table is given as follows.
91101

92102
+-----------------------------+-------------------------------+----------------------------+---------------------------------+------------------------------+-----------------------------+--------------------------+-------------------------+
93103
| :math:`c_i` | :math:`a_{i1}` | :math:`a_{i2}` | :math:`a_{i3}` | :math:`a_{i4}` | :math:`a_{i5}` | :math:`a_{i6}` | :math:`a_{i7}` |

0 commit comments

Comments
 (0)