Prove from first principles that the Runge-Kutta Method $$ k_1=f(t_n, x_n) $$ $$ k_2=f(t_n + \frac{3}{2}h, x_n + \frac{3}{2}h k_1) $$ $$ x_{n+1}= x_n + \frac{(2 k_1+k_2)h}{3} $$ is consistent of at least second order for solving the initial value problem $x'(t)= f(t,x(t))$, $t>0$ with $x(0)= N$. Note that $x_{n+1}$, $x_n$ are sequences.
|
|
Assume $f$ is regular enough that $x(t)$ is, say, $C^3$. Then by Taylor's theorem, \begin{align} x_{n+1} &= x(t_{n+1}) = x(t_n + h) \\\ &= x(t_n) + x'(t_n)h + \frac{1}{2} x''(t_n)h^2 +O(h^3) \\\ &= x_n + f(t_n, x_n)h + \frac{1}{2} x''(t_n)h^2 + O(h^3) \end{align} If we only wanted to get a first order approximation, we could take $x_{n+1} = x_n + hf(t_n, x_n)$. But at second order, we have that pesky $x''(t_n)$ term. Expand the $x''$ term: \begin{align} x''(t) &= \frac{d}{dt}f(t, x(t)) \\\ &=\partial_t f(t, x(t)) + \partial_x f(t, x(t)) x'(t) \\\ &= \partial_t f(t, x(t)) + \partial_x f(t, x(t)) f(t, x(t)) \end{align} Now, \begin{align} k_2 &= f(t_n + \frac{3}{2}h, x_n + \frac{3}{2}h k_1) \\\ &= f(t_n, x_n) + \frac{3}{2} \left(\partial_t f(t_n, x_n) h + \partial_x f(t_n, x_n) h k_1 \right) + O(h^2) \end{align} Since $k_1 = f(t_n, x_n)$, we see that $$ \frac{2(k_2-k_1)}{3h} = x''(t_n) + O(h) $$ Plugging everything back in, we see \begin{align} x_{n+1} &= x_n + k_1h + \frac{h^2}{2} \left(\frac{2(k_2-k_1)}{3h} \right) + O(h^3) \\\ &= x_n + \frac{2k_1 + k_2}{3}h + O(h^3). \end{align} |
|||
|