§ Forward versus backward euler
- Suppose we have a vector field X, initial point x0, and we want to plot trajectories.
- We survey two classical algorithms, forward versus backward euler.
- Reference
§ Forward euler
- p is current "known" point, q is next unknown point, X(.) is the known vector field.
- p+ϵX(p)∼q.
- This gives us the equation motion.
§ Stability analysis of Forward euler
- Suppse we have a 1D system, with X(q)=aq. (ie, exponential growth).
- Then, p+ϵX(p)∼q simplifies to p+ϵap∼q, or p(1+ϵa)∼q.
- If we relabel pi+1≡q,pi≡p, then we get: pi+1≡pi(1+ϵa).
- Repeatedly applying, we get pn=(1+ϵa)np0.
- This {pn} sequence converges if ∣1+ϵa∣<1.
- If a>0, then it is impossible for this to be stable, because ϵ>0 (by defn), and therefore (1+ϵa)>1.
- If a<0, then the exponential is damped, and the solver will converge if ϵ<1/∣a∣. That is, we step with size smaller than the exponential growth rate.
§ Backward euler
- (q−ϵX(q))∼p.
- This requires us to solve for q. This is generally a nonlinar equation in q due to the presence of X(q), but this can be solved by using any black-box equation solver.
§ Stability analysis of Backward euler
- Suppse we have a 1D system, with X(q)=aq. (ie, exponential growth).
- Then, q−ϵX(q)∼p simplifies to q−ϵaq∼p, or q(1−ϵa)∼p.
- If we relabel pi+1≡q,pi≡p, then we get: ≡pi≡pi+1(1−ϵa).
- Repeatedly applying, we get p0=(1−ϵa)npn.
- Rearranging, we get pn=p0/(1−ϵa)n.
- See that in this case, if a<0, we will always be stable , because then the denominator will be of the form 1/v where v>1.
- So, backward euler is unconditionally stable in the case of exponential decay.