1
$\begingroup$

Consider an ODE $\dot y = f(t, y)$. We will approximate the value of $y$ using the 4th-Order Runge-Kutta method. Let $\Delta$ be the step size, then in step $i+1$ we have $~y_{i+1} = y_i + deriv\cdot\Delta~$, where: \begin{eqnarray*} deriv &=& \frac{1}{6}(d_1 + 2d_2 +2d_3 + d_4) \\ d_1 &=& f(t_i, y_i) \\ d_2 &=& f(t_i + \frac{\Delta}{2}, y_i + d_1 \frac{\Delta}{2}) \\ d_3 &=& f(t_i + \frac{\Delta}{2}, y_i + d_2 \frac{\Delta}{2}) \\ d_4 &=& f(t_i + \Delta, y_i + d_3 \Delta) \end{eqnarray*} Why those particular weights were chosen: 2 for $d_2$ and $d_3$, and 1 for $d_1$ and $d_4$? Why not $deriv = \frac{1}{4}(d_1 + d_2 + d_3 + d_4)$? (or any other weights)

$\endgroup$
1
$\begingroup$

You can enter a known function that is the solution of a known differential equation, write down the Taylor series up to say 6 terms, and then substitute it into the Range-Kutta formula or any other formula.

Once you calculate it, you will find that with the Runge-Kutta formula, you add up lots of different constants which magically add up to zero. If you change the constants to what you proposed, most likely these constants add up to something that isn't zero, introducing huge errors into your solutions.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ If it helps, consider that if $\frac{\partial f}{\partial y} = 0$, then $d_2 = d_3$, and so RK4 is Simpson's rule. $\endgroup$ – Pseudonym Mar 29 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.