When is an ODE (numerically) reversible in time?

  • Context: Undergrad 
  • Thread starter Thread starter Aidyan
  • Start date Start date
  • Tags Tags
    Ode Reversible
Click For Summary
SUMMARY

This discussion centers on the numerical reversibility of ordinary differential equations (ODEs), specifically examining the damped driven oscillator represented by the equation $$\ddot{\theta} + 2\beta \dot{\theta} + \omega_{0}^2 \sin \theta = \gamma \omega_{0}^2 \cos{\omega t}$$. Participants highlight that numerical integration can lead to discrepancies when attempting to reverse the time direction, primarily due to discretization and roundoff errors. The discussion concludes that for an ODE to be time-reversible, it must satisfy specific symmetry conditions, which are often violated in numerical methods.

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with numerical integration techniques
  • Knowledge of stability analysis in numerical methods
  • Basic concepts of discretization and roundoff error
NEXT STEPS
  • Research the stability of numerical integration methods for ODEs
  • Explore the concept of time-reversibility in dynamical systems
  • Learn about the implications of discretization errors in numerical simulations
  • Investigate the properties of the damped driven oscillator and its numerical solutions
USEFUL FOR

Mathematicians, physicists, and engineers involved in numerical analysis, particularly those working with differential equations and seeking to understand the limitations of numerical integration methods.

Aidyan
Messages
182
Reaction score
14
I'm wondering whether a differential equation that can be integrated numerically forwards in time can also be integrated backwards in time starting from the final state and inverting the momenta/velocities? I tried and it didn't work. But I'm not sure whether I'm making a mistake with my solver or because an ODE must meet some conditions to be numerically reversible in time? In my case, it is a second order non-linear ODE (the damped driven oscillator): ## \ddot{\theta} + 2\beta \dot{\theta} + \omega_{0}^2 \sin \theta = \gamma \omega{_0}^2 \cos{\omega t}##, where ##\omega##, ##\omega_0##, ##\beta##, and ##\gamma## are constants. But my question is more general regarding every DE. That is, is there a conceptual fundamental reason that (sometimes or never?) a differential equation can't be integrable in reverse?
 
Physics news on Phys.org
If you make the change of variable t - T - \tau then \frac{d}{dt} = - \frac{d}{d\tau}. Thus to be time-reversible on the interval [0, T] the ODE \ddot x = f(x, \dot x, t) must satisfy the symmetry f(x, -y, T - \tau) \equiv f(x, y, \tau).
 
In numerical integration, there is discretization error and roundoff error that is not the same over the reverse path, and which can grow or decay. Are you familiar with the concept of numerical integration stability?
 
Chestermiller said:
In numerical integration, there is discretization error and roundoff error that is not the same over the reverse path, and which can grow or decay. Are you familiar with the concept of numerical integration stability?
Well, I'm not an expert, but the reason I would like to integrate back in time is precisely because I would like to check how accurately the solution returns to the initial conditions. That would suggest something on how the integration forward in time is correct (does it?) Say one finds a solution in the time span [0,T] and then reverses it by changing the sign of the first derivative and integrating from [T, 2T]. Even if there are large numerical errors, I would expect that at least in the first part of the reverse integration the solver returns similar values (say for some time between [T, T+dt].) But it doesn't at all. It goes completely astray. So, either there is a mistake in the code (but only in the reverse part, the forward is certainly correct, I've checked this with several solvers), or there is a fundamental logical reason why this can't work. I was asking in particular for the second alternative.
 
Aidyan said:
Well, I'm not an expert, but the reason I would like to integrate back in time is precisely because I would like to check how accurately the solution returns to the initial conditions. That would suggest something on how the integration forward in time is correct (does it?) Say one finds a solution in the time span [0,T] and then reverses it by changing the sign of the first derivative and integrating from [T, 2T]. Even if there are large numerical errors, I would expect that at least in the first part of the reverse integration the solver returns similar values (say for some time between [T, T+dt].) But it doesn't at all. It goes completely astray. So, either there is a mistake in the code (but only in the reverse part, the forward is certainly correct, I've checked this with several solvers), or there is a fundamental logical reason why this can't work. I was asking in particular for the second alternative.
It doesn't take long for a numerical scheme to go unstable. Try $$\frac{dy}{dt}=-y$$ and $$\frac{dy}{dt}=+y$$ starting at y = 1.
 
Last edited by a moderator:

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
567
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K