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
    Commented Mar 8, 2017 at 1:57
  • 1
    $\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$ Commented Mar 31, 2017 at 9:15

1 Answer 1


One answer of the above question is $$ E=\frac{Y_{n+2}(h)-Y_{n+2}(2h)}{2^{m+1}-2} $$ computing the value at $X_{n+2}=X_0+(n+2)h$ first with two steps of size $h$ and then with one step of size $2h$. $E$ is then the estimate of the error for one step of size $h$ at or around $X_n$.

So for 4th order of RK, $m=4$; the error would be $$ E=\frac{Y_{n+2}(h)-Y_{n+2}(2h)}{30}. $$

  • $\begingroup$ The site supports Latex. Use Latex! :-) $\endgroup$
    – peterh
    Commented May 12, 2018 at 21:30
  • $\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$ Commented May 14, 2018 at 11:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .