0
$\begingroup$

Suppose I have integrated a differential equation numerically using some time-interval $\delta t$.

How might I determine the accuracy of the result? Does solving simultaneous equations reduce the accuracy?

My method is of order 6.

  • 3
    It completely depends on both your differential equation and your method of integration. each numerical method comes with explicit estimates, depending on $\delta t$ and your ODE, for example the lipschitz constant of $f$ in $y'=f(y)$. what's your method ?2012-01-12
  • 0
    @Glougloubarbaki: Does it suffice to know that the method is of order 6 and the ODE is of the form $\ddot{x}=a(t)x$?2012-01-12
  • 1
    if your method is of order 6 then your error is bounded by some $C \delta t^6$, where $C$ is a constant which depends on $a(t)$, the time interval, and the method of integration2012-01-12
  • 0
    @Glougloubarbaki: thanks! if i solve the equation by setting simultaneous 1st order odes does that change the order of accuracy of the result generated by my 6th order method?2012-01-12
  • 0
    Our sister site [Computational Science](http://scicomp.stackexchange.com) may also be a good place to ask this question.2012-06-20

1 Answers 1

1

There have been some suggestions in the comments, but let me give one of the techniques you can use when you are unable or unwilling to do analytical work on your differential equation.

One of the most popular methods for ascertaining the accuracy of a "fixed step" method for numerically solving an ODE, with a given fixed step $h$, is to repeat the computations, but this time using a fixed step of $h/2$. What you're basically going for with the "double step" strategy is that if things are going well with your solution, the result after one step of size $h$, and the result after two steps of size $h/2$ should have a number of digits in common. If the results from those two evaluations are rather different, then something is clearly wrong. (As with most other numerical methods, this is not entirely foolproof, but it tends to catch most instabilities.)

If one has the patience and/or computational power, one could go further and compare the result from stepsize $h$ with the result after four steps of size $h/4$, eight steps of size $h/8$... and so on. If need be, one can even construct a result from those results that can be more accurate through the use of Richardson extrapolation. Carried to its logical conclusion, you end up with the Bulirsch-Stoer strategy for solving differential equations. But of course, if you only need a few digits of accuracy, simple double-stepping might be enough for your needs.