Project

Literature review ODE Stability

1. When does ODE become unstable?

  1. Stability in mathematics condition in which a slight disturbance in a system does not produce too disrupting an effect on that system.
  2. In term of the solution of a differential equation, a function f(x) is said to be stable if any other solution of the equation that start out sufficiently close to it when x=0 remain close to it for succeeding value of x.
  3. If the difference between the solution approaches zero as x increase, the solution is called asymptotically stable.
  4. If a solution does have either of these properties, it is called unstable

For eg , consider a ODE

`frac{dy}{dx}= -1000*y -e^(-t)`

Explicit form of above equation,

`y^(n+1) = y^n -1000y^ntrianglet - e^(-t)trianglet`

Implicit for of above equation,

`y^n = frac{y^(n+1) -e^(-t)trianglet}{1 + 1000trianglet}`

Analytical equation

`y = frac{e^(-1000*t)*(1-e^(999t))}{999}`

Since, we can apply both explicit and implicit method. But explicit become unstable at higher time step whereas implicit is stable at any time step because it used Backward Differencing

Code:-

import numpy as np
import matplotlib.pyplot as plt 

def explicit_method(total_t,dt):
	t = np.arange(0,total_t,dt)
	y = np.zeros(len(t))
	for i in range(1,len(t)):
		y[i] = y[i-1] + dt*(1000*y[i-1]-np.exp(-t[i]))
	return [t,y]

def implicit_method(total_t,dt):
	t = np.arange(0,total_t,dt)
	y = np.zeros(len(t))
	for i in range(1,len(t)):
		y[i] = (y[i-1] - np.exp(-t[i])*dt)/(1+1000*dt)
	return [t,y]

def analytical_method(total_t,dt):
	t = np.arange(0,total_t,dt)
	y = np.zeros(len(t))
	for i in range(1,len(t)):
		y[i] = (np.exp(-1000*t[i])*(1-np.exp(999*t[i])))/999
	return [t,y]

total_t = 0.1
dt = 2e-4
t,y_explicit = explicit_method(total_t,dt)
t,y_implicit = implicit_method(total_t,dt)
t,y_analytical = analytical_method(total_t,dt)
plt.plot(t,y_explicit,color=\'red\')
plt.plot(t,y_implicit,color=\'orange\')
plt.plot(t,y_analytical,color=\'green\')
plt.legend([\'Explicit\',\'Implicit\',\'Analytical\'])
plt.show()

\"\"

Stable plot when n = 500

\"\"

Unstable plot when n = 50

From the unstable plot we can conclude that the explicit is varies from number of time step.

2. How does stability affect engineering simulation?

  1. Stability of solution is important in physical properties because if slight deviation from mathematical model caused by unavoidable error is measurement do not have a corresponding slight effort on the solution the mathematical equation describing the problem will not accurately predict the future outcome.
  2. Thus one of the difficulties in predicing population growth is the fact that it is govered by the equation which unstable solution of the equation. Relatively slight error in the initial population count will cause quite large error in prediction even if no disturbing influence occur.
  3. Hence, the stability affect engineering simualtion.

3. Can stability condition be derived for all type of problem?

  1. Every proble that we try to solve is based on an expression of some form or another.
  2. To have confidence in our solution we would first need to know that the expression is continuous in its input, so that we would not get completely different result from slight change in the input.
  3. However, this is not enough. We also need to know that the expression is well conditioned.
  4. If it well conditioned, the small change in the input to the expression, will be the output, then we call the problem ill conditioned.
  5. The exact cutoff between well and ill conditioned depend on the context of the problem and the use of the result.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.