Differential Equation Solving System: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
* <B>Example(s):</B> | * <B>Example(s):</B> | ||
** [[Taylor Series Method System]]. | ** [[Taylor Series Method System]]. | ||
** | ** [[Euler Method System]]. | ||
import math | import math | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
Line 30: | Line 31: | ||
plt.ylabel('Rats[rats]') | plt.ylabel('Rats[rats]') | ||
plt.title('Euler Solution') | plt.title('Euler Solution') | ||
plt.show( ) | plt.show( ) | ||
** [[Runge-Kutta Method System]], that applies a [[Runge-Kutta algorithm]]. | ** [[Runge-Kutta Method System]], that applies a [[Runge-Kutta algorithm]]. | ||
** [[Predictor-Corrector Method System]]. | ** [[Predictor-Corrector Method System]]. |
Revision as of 12:18, 15 January 2016
A Differential Equation Solving System is an equation solving system that can apply a differential equation solving algorithm to solve a differential equation solving task.
- AKA: Differential Equation Solver.
- Example(s):
import math import matplotlib.pyplot as plt
- Initial conditions
y0 = 2.0
- Time step and final time
dt = 1.0 # days tf = 364 .0 # days
- Empty lists to hold the time and solution
tt = [ ] yy = [ ]
- Append initial values
tt.append (0.0) yy . append (y0)
- Parameters of our equation
a = 0.01 omega = 2.0*math.pi/365.0
- Iteration
while tt [−1] <= tf : r = a*yy[−1]*(1+math . sin(omega*tt[ − 1 ])) yy.append(yy[−1]+ r*dt) tt.append (tt[−1]+dt) plt.figure(1) plt.plot(tt,yy,'.') plt.xlabel('Time[days]') plt.ylabel('Rats[rats]') plt.title('Euler Solution') plt.show( )
- Runge-Kutta Method System, that applies a Runge-Kutta algorithm.
- Predictor-Corrector Method System.
- Adams-Bashforth Method System, that applies an Adams-Bashforth algorithm..
- Adam-Moulton Method System, that applies an Adam-Moulton algorithm..
- Milne-Simpson Method System, that applies a Milne-Simpson algorithm..
- a PDE System.
- an ODE System.
- See: Differential Equation.