I When is an ODE (numerically) reversible in time?

  • I
  • Thread starter Thread starter Aidyan
  • Start date Start date
  • Tags Tags
    Ode Reversible
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:
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top