Professional Documents
Culture Documents
Compiled by:
Habtamu G.
Ordinary Differential Equation
(ODE)
Ordinary Differential Equations can be
solved using:
- Euler s Method
- Improvements of Euler's Method
- Runge-Kutta Methods
- General Methods for Boundary-Value Problems
and Derivative Boundary Conditions.
This chapter is developed
to solve ODE on the form:
dy
= g(x, y)
dx
A. Euler’s Methods
It is based on the low-order Taylor series:
y
y i+1 = y i + f (x i , y i )h
h
where f (x i , y i ) = = y'(x i , y i ) = slope
x
xi x i+1
h = xi+1 − xi = stepsize
y = (x 2 − 1.1)dx
dy dy dy
dy
− yx + 1.1y = 0
2 = yx 2
− 1.1y = x 2
− 1.1
dx dx y
x3 x3
− 1.1x+c
x3
Ln(y) = − 1.1x + c y=e3 = c 1e 3
−1.1x
3
From the initial condition y(0)=1 c1 = 1
Numerically:
y i+1 = y i + f (x i , y i )h
dy
= yx 2 − 1.1y
dx
Initial condition y(0)=1 0 0.5 1.5
And so on…
t y z f1 f2
0 2 0 0 ‐2
0.1 2 ‐0.2 ‐0.2 ‐1.95
0.2 1.98 ‐0.395 ‐0.395 ‐1.88
0.3 1.9405 ‐0.583 ‐0.583 ‐1.7905
0.4 1.8822 ‐0.76205 ‐0.76205 ‐1.6822
0.5 1.805995 ‐0.93027 ‐0.93027 ‐1.556
.
.
.
4
Improvements of Euler’s Methods
2 16.31978
3 37.19924
4 83.3377
b. The Midpoint Method (or Improved Polygon
Method)
This is another simple modification of Euler’s
method.
Technique: use Euler’s method to predict a
value of y at the midpoint of the interval.
Example: Solve the following equation using the midpoint
method with a step size of 0.5 and x=[0 2].
Solution:
B. Runge-Kutta Methods (Reading
assignment)
Runge‐Kutta (RK) methods achieve the accuracy of a Taylor
series without requiring the calculation of higher derivatives
The general form: y i+1 = y i + (x i , y i ,h)h
(xi , y i , h) =increment function which represent the slope over the interval
The general form of : = a1k 1 + a 2k 2 + ... + a n k n
k 1 = f (x i , y i )
k 2 = f (x i + p 1h, y i + q 11k 1h)
k 3 = f (x i + p 2h, y i + q 21k 1h + q 22k 2h)
.
.
.
x y
subject to certain conditions: where u is the dependent variable,
and x and y are the independent variables.
Classification of 2nd Order Linear PDE’s
u
2
u 2
u 2
A 2 +B +C 2 + D = 0
x xy y
can be:
• Elliptic B − 4 AC 0
2
• Parabolic B − 4 AC = 0
2
• Hyperbolic B − 4 AC 0
2
Classification of 2nd Order Linear PDE’s: Elliptic
T T
2 2
Example: + 2 =0
x 2
y
where, A = 1, B = 0, C = 1 giving B − 4 AC = 0 − 4(1)(1) = −4 0
2
T T 2
Example: =k 2
t x
where, A = k , B = 0, C = 0 giving B 2 − 4 AC = 0 − 4(0)(k ) = 0
2
y 1 2
y
Example: = 2 2
x 2
c t
−1 4
where, A = 1, B = 0, C = − 1 giving B − 4 AC = 0 − 4(1)( 2 ) = 2 0
2
c2 c c