Dr. Mubashir Alam King Saud University
Outline Ordinary Differential Equations (ODE) ODE: An Introduction (8.1) ODE Solution: Euler’s Method (8.2) ODE Solution: Runge-Kutta Method (Order 2) (8.5)
Ordinary Differential Equations (ODE)
ODE: General Solution
ODE: Stability
Assume the solution Y(x) is being sought in the interval x 0 ≤ x ≤ b, and for an initial value Y 0 Change the initial value from Y 0 to Y 0 +ε, and lets call the resulting solution Y ε (x), i.e. Then a solution is stable if for small value of ε Thus a small change in the initial solution Y 0 will only lead to small change in the solution Y(x) of the initial value problem.
Numerical Methods for ODE
Euler’s Method
Proof of Euler’s Method Ch#5
Geometric Approach
Example: Find the solution: Y`(x) = -Y(x), Y(0)=1 True Solution: Y(x)=e -x Euler Method Solution: y n+1 = y n -hy n, n ≥ 0 Y 0 =1 and x n = nh
Example: hxy h (x)ErrorRelative Error E-14.02E E-12.80E E-21.46E E-26.79E E-32.96E
Example
Runge-Kutta Method of Order 2
How to choose constants γ 2 = 1/2, or ¾ or 1
Runge-Kutta Method of Order 2
Example:8.5.2
hxy h (x)Error E E E E E-003
Example: hxy h (x)Error E E E