Runge-Kutta method using Taylor series

1.2k Views Asked by At

I was studying Runge-Kutta method for solving $\frac{dy}{dt}=f(t,y)$, but I don't understand how can I write $$y_{n+1}=y_n+ak_1+bk_2$$ using the Taylor series where $k_1=\Delta t f(t_n,y_n)$ and $k_2=\Delta t f(t_n+\alpha \Delta t, y_n+\beta k_1)$. The Taylor series for $y_{n+1}=y(t+\Delta t)$ is $$y_{n+1}=y_n+\Delta t f(t_n,y_n)+\Delta tf'(t_n,y_n)/2+...$$ But I don't know how to get the first equation from the Taylor series! Would you please help? This is the actual text of the textbook I'm studying:


enter image description here

1

There are 1 best solutions below

0
On

The Taylor formula gives you a different approximation... The Taylor method with order 2 reads $$ y_{n+1} \approx y_n + h f(t_n, y_n) + \frac{h^2}{2} f'(t_n, y_n) $$

The RK2 usual method consists in getting an approximation for the term $f'(t_n,y_n)$:

$$ f'(t_n,y_n) \approx \dfrac{f(t_{n+1},y_{n+1})-f(t_n,y_n)}{h}\approx \dfrac{f(t_{n+1},y_n + hf(t_n,y_n))-f(t_n,y_n)}{h} $$

(in the second step we just use Euler's method to approximate $y_{n+1}$). This way we get $$ y_{n+1} \approx y_n + h f(t_n,y_n) + \frac{h}{2}\left(f(t_{n+1},y_n+h f(t_n,y_n)) - f(t_n,y_n) \right) $$

or

$$ y_{n+1} = y_n + \frac{h}{2}\left(f(t_n,y_n) + f(t_n+h,y_n+h f(t_n,y_n)) \right). $$

This is equivalent to setting \begin{align*} k_1 = &f(t_n'y_n)\\ k_2 = &f(t_n + h, y_n + h k_1)\\ y_{n+1} = & y_n + \frac 12 (k_1+k_2) \end{align*}

Even though the formula corresponds to two crude approximations, it turns out to be second order accurate.