# How do we approximate the numerical error a numerical scheme (e.g Runge Kutta, Euler etc) makes without having access to an analytical solution?

So I recently encountered this question in my head while taking my Scientific Computing class, where the lecturer talked about computing numerical error of a scheme. My guess would be that we take a much higher order scheme and treat its solution close to the analytical one and compute the error for the scheme we want but this obviously doesn't answer the question for very high order numerical schemes.

New contributor
KARTIK BALI is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Changing the step size is also sufficient, see Richardson extrapolation. For an example see math.stackexchange.com/questions/3058387/… Nov 25 at 5:23
• @LutzLehmann: that's a good answer over there at math.stackexchange! Nov 25 at 6:59
• Sidenote: There is an elegant trick to use the Runge kutta Method with an extra step, where you use the last step as an error measure. You basically measure the difference between the result you would get with a 5-Step RK and a 4-Step RK. This is used extensively to adjust the stepsizes adaptively: en.wikipedia.org/wiki/… Nov 26 at 11:42
• Thanks @LutzLehmann. We could approximate the error by doubling the timestep as we know the ratio of the errors by the order of the scheme ! yesterday
• @MPIchael : That works to get an extra 3-order step, so that an embedded 4(3) method results, the step-size control is in extrapolation mode. Fehlberg as a 4(5) method gives a 5th order error estimate, but has 6 stages. There are no 5-stages 5th order RK methods. Note that RK4 with an extra double-length step every 2 steps also averages to 6 evaluations per step. yesterday