Side benefit from Runge-Kutta methods for ODE
|
09-27-2018, 02:11 AM
Post: #5
|
|||
|
|||
RE: Side benefit from Runge-Kutta methods for ODE
(09-26-2018 10:45 PM)Valentin Albillo Wrote: Why the inefficiency ? Well, taking as an example the 4th order Runge Kutta method you mention, it performs 4 evaluations of f(x) per step, and (being exactly equivalent to Simpson's rule) it's exact for polynomials only up to degree 3. The 4 evaluations are: \(\begin{aligned} k_{1}&=f(t_{n},y_{n}),\\ k_{2}&=f\left(t_{n}+\frac{h}{2},y_{n}+\frac{h}{2}k_{1}\right),\\ k_{3}&=f\left(t_{n}+\frac{h}{2},y_{n}+\frac{h}{2}k_{2}\right),\\ k_{4}&=f\left(t_{n}+h,y_{n}+k_{3}\right). \end{aligned}\) But since the function \(f\) only depends on \(t\) we end up with: \(\begin{aligned} k_{1}&=f(t_{n}),\\ k_{2}&=f\left(t_{n}+\frac{h}{2}\right),\\ k_{3}&=f\left(t_{n}+\frac{h}{2}\right),\\ k_{4}&=f\left(t_{n}+h\right). \end{aligned}\) Thus \(k_{2}=k_{3}\). This reduces: \(y_{n+1}=y_{n}+\tfrac{h}{6}\left(k_{1}+2k_{2}+2k_{3}+k_{4}\right)\) to: \(y_{n+1}=y_{n}+\tfrac{h}{6}\left(k_{1}+4k_{2}+k_{4}\right)\) Compare this to the function evaluations of the 3rd-order method: \(\begin{aligned} k_{1}&=f(t_{n},y_{n}),\\ k_{2}&=f\left(t_{n}+\frac {h}{2},y_{n}+\frac {h}{2}k_{1}\right),\\ k_{3}&=f(t_{n}+h,y_{n}-hk_{1}+2hk_{2}). \end{aligned}\) Here we end up with: \(\begin{aligned} k_{1}&=f(t_{n}),\\ k_{2}&=f\left(t_{n}+{\frac {h}{2}}\right),\\ k_{3}&=f(t_{n}+h). \end{aligned}\) \(y_{n+1}=y_{n}+\tfrac{h}{6}\left(k_{1}+4k_{2}+k_{3}\right)\) Therefore we can see that RK4 degrades to RK3. Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Side benefit from Runge-Kutta methods for ODE - Namir - 09-23-2018, 07:27 AM
RE: Side benefit from Runge-Kutta methods for ODE - ttw - 09-24-2018, 06:54 AM
RE: Side benefit from Runge-Kutta methods for ODE - Namir - 09-26-2018, 04:43 PM
RE: Side benefit from Runge-Kutta methods for ODE - Valentin Albillo - 09-26-2018, 10:45 PM
RE: Side benefit from Runge-Kutta methods for ODE - Thomas Klemm - 09-27-2018 02:11 AM
RE: Side benefit from Runge-Kutta methods for ODE - Namir - 09-27-2018, 09:03 AM
RE: Side benefit from Runge-Kutta methods for ODE - Namir - 09-27-2018, 10:03 PM
|
User(s) browsing this thread: 1 Guest(s)