A Trick to Solve Ordinary Differential Equations Backwards in Time
📂Numerical AnalysisA Trick to Solve Ordinary Differential Equations Backwards in Time
Method
dtdy=f(y)
Consider a numerical solver K for solving the given ordinary differential equation using a future time point T>0 and initial value y0. Assume it operates as follows:
K(f,T,y0)={y(t):t∈[0,T]}
Conversely, to obtain {y(s):s∈[−S,0]} at a past time point S>0, one would calculate K(−f,S,y0).
Explanation
The trick introduced above involves a method to send the solver in reverse time, regardless of its form. This reverse-time manipulation is particularly useful in analyzing dynamical systems to locate unstable fixed points, and similar tasks.
The crux of the trick is that reversing time is simple, requiring only the substitution of f with −f.
Motive
⟹f(y)=dtdy=h→0limhy(t+h)−y(t)y(t+h)≈y(t)+hf(y)
Consider, for example, the Euler method, which derives such approximation for sufficiently small h. According to the definition of a derivative y˙, there should be no harm in using y(t)−y(t−h) instead of y(t+h)−y(t) in the numerator. Consequently, the following calculation is possible.
⟹f(y)=dtdy=h→0limhy(t)−y(t−h)y(t−h)≈y(t)−hf(y)=y(t)+h⋅(−f(y))
This backward solution implies that if the Euler method is K, solving K(−f,h,y0) is effectively the same.
Variable Substitution
However, if K is not the Euler method, deriving results from such intuition alone becomes challenging. We attempt to explain this generalization using variable substitution like s=−t. Here, the positive progression of s towards S>0 indicates the reverse movement of t, implying that time t flows backward. The original ordinary differential equation y˙=f(y) can thus be expressed as follows, using the chain rule:
⟹⟹⟹dtdy=f(y)dsdydtds=f(y)dsdy=−f(y)y′=−f(y)
Formally, this is equivalent to solving y′=g(y) for g=−f, and effectively applies the original method K by merely reversing the sign of f.