Study on stability of ordinary differential equation.
Suppose we have an ordinary differential equation,
`dx /dt = f(x)`
equillibria will be reached when, `dx/dt = 0` i.e `f(x) = 0`
If `f(x_e) = 0`, then `x(t) = x_e` is a solution.
The initial conditions decides whether the solution is stable or unstable.
1. If `x(0) = x_e` ; Solution, `x(t) = x_e`
If we start at equilibrium, it will stay at equilibrium.
2. If `x(0) = x_0`, that is close to `x_e`, but `x_0 != x_e`
It arises following possibility,
a. If `x(t)`moves away from `x_e` as t increases; Solution is unstable.
b. If `x(t)`moves towards the `x_e` as t increases; Solution is stable.
For example,
`dy/dt = -10000*y - exp(-t)`
The explicit solution will be,
`y^(n+1) = y^n -10000*y^n*Delta(t) - exp(-t)*Delta(t)`
The implicit solution will be,
`y^n = (y^(n-1) -exp(-t).Delta(t))/(1 + 10000*Delta(t)`
Above Numerical solution to be compared with the analytical solution to get the clear picture of accuracy and deviation with above scheme.
So, The analytical solution is,
`y(t) = (e^(-10000 t) (1 - e^(9999 t)))/9999`
For the numerical solution to reach the actual solution, we should give timestep as input. So, we will see the effect of the time step on the solution. The python code has been produced to get the below solution.
The solution is to run for 0.1 sec, but the timestep size will decide whether the solution will be stable or not.
1. `Deltat = 1e-1`
2.`Deltat = 1e-2`
3.`Deltat = 1e-3`
4. `Deltat = 5e-4`
5. `Deltat = 1e-4`
It has been observed that if we increase the timestep,solution is getting unstable for explicit scheme. I increased it from 1e-4 to 1e-1 and solution seems accurate and stable only at 1e-4. So, stability criteria needs to be derived only for explicit scheme. Implicit scheme's are inheriently stable. Accuracy of the solution depends upon the timestep, thats why we have seen that even if the solution is not blowing up for other scheme, it's also not right.
If stability has been derived, it helps in getting accurate engineering simulations. The choice of the scheme depends highly upon that criteria. But, if problem demands implicit solution only, it does not needs to be derived.