I am using Runge-Kutta 4th order method for numerical simulation of system of ODEs $x'=f(t,x)$ where $x$ has around 20 dimensions.

I wish to give a bound on the global error.

I know that the global accumulated error is $O(h^4)$, but I need an actual bound, ie what is the coefficient of $h^4$ and a bound on the terms that comes after $h^4$.

I can obtain a bound on both $|x|$ and $|\frac{dx}{dt}|$ (by appealing to physics, since my system is modelling some real-life things), but it's hard to compute bounds for higher order derivatives.

I'm sure there are many methods for error estimation, but I just need one. It doesn't have to be asymptotically tight, just an upper bound is enough.

  • 1
    $\begingroup$ A very common method for estimating the truncation error is using step-doubling: take a single step of length $2h$ and compare this with two steps of length $h$. Use the difference (divided by $2^n-1$ where $n=4$ for RK4) as an estimate for the truncation error. Some other methods are mentioned in this article $\endgroup$ – Winther Mar 8 '17 at 1:57
  • $\begingroup$ Then divide by $h^4$ to get the coefficient of the lowest order error term. For a middling range of $h$ (often 1e-2 to 1e-4) you should get consistently constant values. For larger $h$, the non-linearity of the problem has too much influence, for smaller $h$, the accumulation of floating point errors over the $O(1/h)$ integration steps dominates over the method error. $\endgroup$ – Dr. Lutz Lehmann Mar 31 '17 at 9:15

The true answer of above question is $E=\frac{Yn+2(h)-Yn+2(2h)}{2^(m+1)-2}$ so for 4th order of RK, m=4; the error would be $E=\frac{Yn+2(h)-Yn+2(2h)}{30}$.

  • $\begingroup$ The site supports Latex. Use Latex! :-) $\endgroup$ – peterh says reinstate Monica May 12 '18 at 21:30
  • $\begingroup$ The use of $2^{m+1}$ is also wrong. The local error of a step of size $h$ is $O(h^5)$, but the error over a fixed time interval $\Delta t$ over a variable number of steps $n$, $nh=\Delta t$, which you need here, is $O(\Delta t\cdot h^4)$ $\endgroup$ – Dr. Lutz Lehmann May 13 '18 at 10:11
  • $\begingroup$ Hello, Thanks for your comment. I don't think so! I can give you the details that leads to my formula upon your request!! but, my answer is true. $\endgroup$ – Hamidreza Khodajou May 14 '18 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.