How to interpret second order Runge-Kutta Method?

354 Views Asked by At

I am reading about the Runge-Kutta method in Numerical Recipes, they start with the Second-Order Runge-Kutta Method and give the following equations

$$[1] \;\;\; k_1 = h \; f^{'}(x_n,y_n)$$ $$[2] \; \; \; k_2 = h \; f^{'}(x_n + \frac{1}{2}h, y_n + \frac{1}{2}k_1)$$ $$[3] \; \; \; y_{n+1} = y_{n} + k_2 + O(h^3)$$

I understand the Euler method, what I am not 100% sure on is my understanding of equation [2]. So the idea is to take a half step, i.e. instead of a full step ($h$) we take a step of $\frac{h}{2}$.

Therefore, in equation [2],

$$x_n + \frac{1}{2}h$$

is intuitively the half step from where we are ($x_n$). My question comes in for

$$y_n + \frac{1}{2} \; k_1$$

$k_1$ is the derivative of the function at our current location ($x_n$), so this has units of $y$ over $x$, whatever those may be. So by dimensional analysis

$$h \; k_1$$

has units of $y$. This means that

$$ y_n + \frac{1}{2} \; k_1$$

is equivalent to the idea of

$$x_n + \frac{1}{2} \; h$$

in the sense that ($y_n + \frac{1}{2} \; k_1$) is the half step from our current position in $y$ ($y_n$). Is this a correct understanding?

1

There are 1 best solutions below

1
On BEST ANSWER

It is correct in that $(x_n+\frac h2,y_n+\frac {k_1}2)$ is a Euler step of length $\frac h2$ from $(x_n,y_n)$. The point of computing that is to find a more representative point to compute $f'$ for the step of length $h$ we will take from $(x_n,y_n)$. It seems natural to find $f'$ at an $x$ coordinate of $x_n+\frac h2$ because that is the center of the interval. We would like to find $f'$ at the correct $y$ coordinate corresponding to $x_n+\frac h2$ but we don't know the true solution. The best we can do is take a Euler step of length $\frac h2$. The justification for the method comes from the error term, which is $O(h^3)$. The method is exact for all polynomials up to $x^2$, one order better than Euler, at the price of two evaluations of the derivative.