Example ode with Runge-Kutta method 2 step

76 Views Asked by At

We need to find out how the Runge Kutta method of order 2, and step 2 works. For example, is we look at the following ode $$u'(t) = \lambda u(t)$$ How does one step of the Runge-Kutta method looks like?

1

There are 1 best solutions below

0
On

In similarity to RK4 the most likely RK2 method is the midpoint based one $\newcommand{\D}{\mathit{\Delta}}$ \begin{align} \D^1y&=f(x,y)\D x\\ \D^2y&=f(x+\tfrac12\D x,\,y+\tfrac12\D^1y)\D x\\ y_{+1}&=y+\D^2y \end{align} Then for the specific ODE example you get \begin{align} \D^1u&=λu\D t\\ \D^2u&=λ(u+\tfrac12\D^1u)\D t&&=λ(1+\tfrac12λ\D t)u\D t\\ u_{+1}&=u+\D^2y&&=(1+λ\D t+\tfrac12(λ\D t)^2)u \end{align} You will get the same result for this test problem for all 2nd order 2-stage explicit RK methods.