Page 1
Numerical Solution
of Ordinary Differential Equation
•
A first order initial value problem of ODE may be written
in the form
•
Example:
•
Numerical methods for ordinary differential equations
calculate solution on the points, where h is
the steps size
0
) 0 ( ), , ( ) ( ' y y t y f t y = =
0 ) 0 ( , 1 ) ( '
1 ) 0 ( , 5 3 ) ( '
= + =
= + =
y ty t y
y y t y
h t t
n n
+ =
- 1
Page 2
Numerical Solution
of Ordinary Differential Equation
•
A first order initial value problem of ODE may be written
in the form
•
Example:
•
Numerical methods for ordinary differential equations
calculate solution on the points, where h is
the steps size
0
) 0 ( ), , ( ) ( ' y y t y f t y = =
0 ) 0 ( , 1 ) ( '
1 ) 0 ( , 5 3 ) ( '
= + =
= + =
y ty t y
y y t y
h t t
n n
+ =
- 1
Numerical Methods for ODE
•
Euler Methods
–
Forward Euler Methods
–
Backward Euler Method
–
Modified Euler Method
•
Runge-Kutta Methods
–
Second Order
–
Third Order
–
Fourth Order
Page 3
Numerical Solution
of Ordinary Differential Equation
•
A first order initial value problem of ODE may be written
in the form
•
Example:
•
Numerical methods for ordinary differential equations
calculate solution on the points, where h is
the steps size
0
) 0 ( ), , ( ) ( ' y y t y f t y = =
0 ) 0 ( , 1 ) ( '
1 ) 0 ( , 5 3 ) ( '
= + =
= + =
y ty t y
y y t y
h t t
n n
+ =
- 1
Numerical Methods for ODE
•
Euler Methods
–
Forward Euler Methods
–
Backward Euler Method
–
Modified Euler Method
•
Runge-Kutta Methods
–
Second Order
–
Third Order
–
Fourth Order
Forward Euler Method
•
Consider the forward difference approximation for first
derivative
•
Rewriting the above equation we have
•
So, is recursively calculated as
n n
n n
n
t t h
h
y y
y - =
- ?
+
+
1
1
, '
) , ( ' , '
1 n n n n n n
t y f y hy y y = + =
+
n
y
) , (
) , (
) , ( '
1 1 1
1 1 1 2
0 0 0 0 0 1
- - - + =
+ =
+ = + =
n n n n
t y f h y y
t y f h y y
t y f h y hy y y
?
Page 4
Numerical Solution
of Ordinary Differential Equation
•
A first order initial value problem of ODE may be written
in the form
•
Example:
•
Numerical methods for ordinary differential equations
calculate solution on the points, where h is
the steps size
0
) 0 ( ), , ( ) ( ' y y t y f t y = =
0 ) 0 ( , 1 ) ( '
1 ) 0 ( , 5 3 ) ( '
= + =
= + =
y ty t y
y y t y
h t t
n n
+ =
- 1
Numerical Methods for ODE
•
Euler Methods
–
Forward Euler Methods
–
Backward Euler Method
–
Modified Euler Method
•
Runge-Kutta Methods
–
Second Order
–
Third Order
–
Fourth Order
Forward Euler Method
•
Consider the forward difference approximation for first
derivative
•
Rewriting the above equation we have
•
So, is recursively calculated as
n n
n n
n
t t h
h
y y
y - =
- ?
+
+
1
1
, '
) , ( ' , '
1 n n n n n n
t y f y hy y y = + =
+
n
y
) , (
) , (
) , ( '
1 1 1
1 1 1 2
0 0 0 0 0 1
- - - + =
+ =
+ = + =
n n n n
t y f h y y
t y f h y y
t y f h y hy y y
?
Example:
Example: solve
Solution:
Solution:
etc
25 . 0 , 1 0 , 1 ) 0 ( , 1 '
0
= = = = = + = h t y y ty y
1.25 1) 1 * 0.25(0 1
) 1 (
' , 25 . 0 for
0 0 0
0 0 1 1
= + + =
+ + =
+ = =
y t h y
hy y y t
1.5781 1) 1.25 * 0.25(0.25 1.25
) 1 (
' , 5 . 0 for
1 1 1
1 1 2 2
= + + =
+ + =
+ = =
y t h y
hy y y t
1 ) 0 ( , 0 for
0 0
= = = y y t
Page 5
Numerical Solution
of Ordinary Differential Equation
•
A first order initial value problem of ODE may be written
in the form
•
Example:
•
Numerical methods for ordinary differential equations
calculate solution on the points, where h is
the steps size
0
) 0 ( ), , ( ) ( ' y y t y f t y = =
0 ) 0 ( , 1 ) ( '
1 ) 0 ( , 5 3 ) ( '
= + =
= + =
y ty t y
y y t y
h t t
n n
+ =
- 1
Numerical Methods for ODE
•
Euler Methods
–
Forward Euler Methods
–
Backward Euler Method
–
Modified Euler Method
•
Runge-Kutta Methods
–
Second Order
–
Third Order
–
Fourth Order
Forward Euler Method
•
Consider the forward difference approximation for first
derivative
•
Rewriting the above equation we have
•
So, is recursively calculated as
n n
n n
n
t t h
h
y y
y - =
- ?
+
+
1
1
, '
) , ( ' , '
1 n n n n n n
t y f y hy y y = + =
+
n
y
) , (
) , (
) , ( '
1 1 1
1 1 1 2
0 0 0 0 0 1
- - - + =
+ =
+ = + =
n n n n
t y f h y y
t y f h y y
t y f h y hy y y
?
Example:
Example: solve
Solution:
Solution:
etc
25 . 0 , 1 0 , 1 ) 0 ( , 1 '
0
= = = = = + = h t y y ty y
1.25 1) 1 * 0.25(0 1
) 1 (
' , 25 . 0 for
0 0 0
0 0 1 1
= + + =
+ + =
+ = =
y t h y
hy y y t
1.5781 1) 1.25 * 0.25(0.25 1.25
) 1 (
' , 5 . 0 for
1 1 1
1 1 2 2
= + + =
+ + =
+ = =
y t h y
hy y y t
1 ) 0 ( , 0 for
0 0
= = = y y t
Graph the solution
Read More