I don't understand how to find the correct step-size $h$ for the Euler method. My script says the following:

One method consists in computing the numerical solution for an arbitrary $h$ and then $2h$. The Richardson extrapolation gives an estimate of $e = \max_t|y(t,2h)-y(t,h)|$ of the error. When the error is smaller than the tolerance, we keep the result and start from $2y(t,h)-y(t,h)$. If the error is larger we restart with $h/2$ until we reach the tolerance.

( $y(t,2h)$ means approximation with $2h$)

I don't understand why the Richardson extrapolation is mentioned. For what do I have to use it? Can I not just calculate $y(t,2h)$ and $y(t,h)$ and see the error?

  • 1
    $\begingroup$ You need Richardson extrapolation to see that, in general, $2y(t,h)−y(t,2h)$ is correct to order $2$, while the terms themselves are correct to order $1$. $\endgroup$ – Lutz Lehmann Apr 11 '17 at 15:58

You can just check the error, and not bother with Richardson extrapolation, that's fine. But once you've paid the computational price of calculating the error, you might as well use Richardson extrapolation to reduce the error further; it costs you essentially nothing.

  • $\begingroup$ Thank you very much. One small question though. Is the error $e= \max_t|y(t,2h)-y(t,h)|$ an approximation for the error $|y(t)-y(t,h)|$ or what is the link between them? $\endgroup$ – MarcE Apr 11 '17 at 16:05
  • $\begingroup$ The first measures the error over the entire domain, the other measures the error at a point. $\endgroup$ – user14717 Apr 11 '17 at 16:06
  • $\begingroup$ Thanks for the answer, I'm still struggling with the whole thing. I don't understand what is meant with "we can start from $2y(t,h)-y(t,2h)$". If I want do find the best $h$, then I look at the computed values of $y(t,2h)$ and $y(t,h)$ and compare the $N$ values. If the biggest error is smaller than the tolerance is that not the $h$ I need? $\endgroup$ – MarcE Apr 11 '17 at 18:05
  • $\begingroup$ Just for empathy's sake: Stepsize choice is incredibly subtle; algorithms for robust adaptive stepsize choice in ODE solvers are very very complicated. But, there is no "best $h$". Smaller $h$ gives smaller error but longer compute time. $\endgroup$ – user14717 Apr 11 '17 at 18:31

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.