# Relative error in numerical computations doubt

I wonder why in numerical computations, if, in order to estimate the error it's done with respect to a higher precision calculus than the one used, why don't take the higher precision result as the final solution to take into account? Because of the convergence of the methods, it could be possible to keep the error estimate as a higher boundary of the real error considering the higher precision computation as the final result.

For example, in an adaptative step method as Runge Kutta 4-5. The result given by this method is the one obtained by RK4 while RK5 is just used to calculate the error, but if it's demonstrable that RK5 is a higher precision method than RK4, the error obtained for RK4 is also a upper boundary of RK5, so it could be possible to just use RK4 to get a wide upper error boundary for RK5 and use RK5 result as the final solution, isn't it?

Thanks

## 1 Answer

This is actually done in implementations, but non-trivial to get right for most cases.

While you can take $y_{rk4}-y_{rk5}$ as proxy for the error of the 4th order method $y_{rk4}-y_{exact}$, the same is not true for the 5th order method, exactly because the 5th order method is much closer to the exact value.

One needs a pretty accurate error estimate to get a sensible step size adaptation strategy. One knows that the local error of a 4th order method is $C·h^5+O(h^6)$, which can be compared to the desired error contribution $tol·\frac{h}{T}$ for a segment of size $h$ to the global error $tol$. Then the step size can be adapted so that the error falls in a segment around that goal.

This reasoning is only valid if the values of the 4th order method are used for the integration. One can argue that using the values of the 5th order method will in most cases yield a better approximation, severely undercutting the desired global error $tol$, but possibly with step sizes that are too small for that goal.

• So the only reason not to take Yrk5 as the solution is because the error estimte is too loose and we're taking a smaller h than needed? – Krotanix Oct 8 '15 at 9:35
• Yes, it somehow defies the philosophy behind the step size adaptation. But I'm sure that more advanced algorithms compensate for that in some way. This in turn may, in compensation, increase the class of problems where the algorithm does not work exactly as intended. – Dr. Lutz Lehmann Oct 8 '15 at 13:32