Numericals For ODE
Numericals For ODE
1. Euler’s Method - is the simplest technique for solving a first-order ODE of the form
- assumes that for a short distance h near (xi, y;), the function y(x) has a constant slope equal to
the slope at (xi, y;)
a. Euler's Explicit Method - is a single-step, numerical technique for solving a first-order ODE.
- Uses the following equations:
Solution:
Let h = 0.5
( )
Iteration 1:
( )
Iteration 2:
b. Euler's Implicit Method - is the same as the explicit scheme, except, as illustrated
schematically in the figure, for a short distance, h, near (xi, yi) the slope of the function y(x) is
taken to be a constant equal to the slope at the endpoint of the interval (x i+ 1, yi+ 1).
c. Modified Euler’s Method (Heun’s Method) - involves the determination of two derivatives
for the interval—one at the beginning and another at the end. The two derivatives are then
averaged to obtain an improved estimate of the slope for the entire interval.
- predictor-corrector approach
Where:
Example 1: Solve the following initial value problem over the interval from t = 0 to where y(0) = 1.
Display all your results on the same graph.
(a) Analytically.
(b) Using Euler’s method with h = 0.5 and 0.25.
2. Runge – Kutta Method - is an effective and widely used method for solving the initial-value
problems of differential equations.
- can be used to construct high order accurate numerical method by functions' self without
needing the high order derivatives of functions.
Formula:
Where:
Formula:
Where:
c. Fifth-Order Runge-Kutta Method
Formula:
Where:
1. Solve the following problem over the interval from x = 0 to 1 using a step size of 0.25
where y(0) = 1. Display all your results on the same graph.
a. Analytically
b. Using Modified Euler’s Method.
c. Using the second order and the classical fourth-order RK method