0

I'm studying Runge-Kutta method and I don't get some part of it.
Runge-Kutta method is as follows

\begin{equation} x(t+h) = x(t) + w_1 K_1 + w_2 K_2 \\ K_1 = h(f, x) \\ K_2 = hf(t+\alpha h, x + \beta K_1) \end{equation} In above K2 equation, K1 is used as a step size of x. Is there any reasons that $K_1$ is used for estimating $K_2$? I think $K_2$ also could be estimated by $hf(t+\alpha h, x + \beta k)$.

alryosha
  • 563
  • Yes, it could. What's the value of $k$ that you propose? (Also, $K_1$ isn't the step size here. It's the derivative.) – Arthur Oct 16 '19 at 04:33
  • $k$ is just an arbitrary value that can be chosen likewise h, but i want to know why people choose it as $K_1$ – alryosha Oct 16 '19 at 04:37
  • 2
    Shouldn't $f$ be a function with two arguments? I think the middle equation should be $K_1=hf(t,x)$ based on the $K_2$ equation – Ross Millikan Oct 16 '19 at 05:21

2 Answers2

2

$K_1$ is the change in $x$ when you take a Euler step of length $h$. The result of that Euler step would be $x(t+h)=x(t)+K_1$. This is an approximation to the value of $x$ at the end of the step. We then pick a point along the Euler step to evaluate $f$, getting a better value for the derivative. Finally we compute $x(t+h)$.

The reason to do this is to increase the order. Euler's method is exact for linear functions $x$ because the derivative is constant. This Runge-Kutta method can be exact for quadratic functions $x$ because of the two evaluations of $f$. You choose the parameters $\alpha, \beta, w_1, w_2$ to make the method exact this way. If you don't compute $K_1$ you can't get it to come out right.

Ross Millikan
  • 374,822
2

The idea is the following: assuming we know $x(t)$, we don't know what $x(t+h)-x(t)$ is exactly. But intuitively, as $h$ is relatively small, it's probably somewhere in the vicinity of $hx'(t)$. So that's our first estimate, and we call it $K_1$.

However, an even better approximation would be $\frac{hx'(t) + hx'(t+h)}2$. Now, $hx'(t)$ we already have. That's just $K_1$. However, $x'(t+h)$ is a different story. As we don't know $x(t+h)$, we can't just calculate $f(t+h, x(t+h))$ directly. But we know a value that is relatively close to $x(t+h)$, and that's $x(t)+ K_1$. So we use that as our best estimate to get $$ x'(t+h)\approx f(t+h, x(t)+K_1) $$ And that's why we use that specific value for $k$.

As for the $\alpha$ and $\beta$ (I don't think you ever want $\alpha\neq\beta$, but I could be wrong; computational methods isn't my main field), that's a result of asking for $\frac{hx'(t) + hx'(t+\alpha h)}2$ in step 2, rather than $\frac{hx'(t) + hx'(t+h)}2$. The exact same argument applies.

Higher order RK methods repeat this process, each time with cleverly chosen $k, \alpha$ and $\beta$, based on the best estimate we can make so far.

Arthur
  • 199,419