# Estimating error at mid timesteps for Runge-Kutta methods

When a timestep $h$ is rejected using a Runge-Kutta pair, such as Dormand–Prince, the algorithm resumes from the same initial point $t$ with a smaller timestep. A different idea is to resume at an intermediate point $t + kh$ where $1/7 < k < 4/5$, using the 4th order interpolation. The estimated error would be tested at intermediate points until an acceptable point is found. The FSAL property is lost when doing this type of recovery, thus costing an extra function evaluation during the next timestep. My questions are:

1. Is it expensive to calculate the error at these intermediate points?
2. Will these intermediate points have an acceptable error that makes it worthwhile to do this procedure, or does high error make the interpolation useless throughout the entire interval?

Using the interpolation to come up with an error estimate of the continuous (dense) solution is known as residual control. This is done quite frequently when the Runge-Kutta methods are utilized for delay differential equations. There are smarter ways than just taking random points though. You can see some discussion here where a method for estimating the maximum residual error is done with a few points using the properties of the interpolant.

• Shampine's paper makes it sound easy, with only the practical benchmarks left. Based on tables 2-4 in doi.org/10.1016/j.cam.2004.01.027, rejection rates hover at around 20-30% with PI control, which means this approach can at best give a 15% performance increase, likely less. That could be interesting but it's not interesting enough for me to procrastinate further. Thanks for the answer! Sep 2 '18 at 20:12

Is it expensive to calculate the error at these intermediate points?

At a quick glance¹, you need 11 vector operations (scalar multiplications or vector additions) for each interpolation. For comparison, a Dormand–Prince step (without evaluations of the right-hand side) takes 45 vector operations¹. In many applications both of this is negligible as the 7 evaluations of the right-hand side of the differential equation are much more costly than this. Even if not, the interpolations are comparably cheap.

¹ Even if I am mistaken about this, at least the order of magnitude should be correct.

Will these intermediate points have an acceptable error that makes it worthwhile to do this procedure, or does high error make the interpolation useless throughout the entire interval?

For explicit Runge–Kutta methods of order higher than 3 (such as the Dormand–Prince method), the interpolation error is inevitably of higher order than the integration error. (This is why in cases where interpolation is required such as integrating DDEs, a third-order pair such as Bogacki–Shampine is often preferred.)

But even if your integration error has the same relative size as your integration error, there is another problem with what you propose, namely that you do not gain anything. For an example, suppose that the relative error you make during a full step is $ρ$ and your intermediate point is at $t+\tfrac{1}{2}h$, i.e., exactly in the middle of the step. Then the relative error of your interpolated step is $\tfrac{ρ}{2}$. If you now make two steps with that error, you have as a first-order approximation again an error of $ρ$, so you gain nothing. Now, of course, you could do your second step with a smaller $h$, but your first, interpolated step has still a higher error than a respective adapted step.