Euler Method

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Euler Method

SEM-IV
(HPHCR4082P)
First-order ordinary differential equation

General form:

where is a given function.

This ODE must be solved with a given condition:


Euler method

Taylor series:

Euler method:
Euler method

To solve the ODE where is a given


function using the
Euler method:

1. A suitable step-size in must be chosen which is given here by


2. At the initial point , as is known, the slope at the
initial point , can be obtained from the function
3. The next x-value will be
4. Using , and the slope estimated
before, the corresponding y-value can be obtained.
5. The above steps are repeated in the desired x-range to obtain the
corresponding y values.
6. The plot of y vs. x curve gives the solution curve
Euler method

The algorithm can be written in the following manner:

 Let the initial point be and the step-size of


 Starting from the initial condition, apply
 =
 Iterate the steps for the desired range of values.

Thus, in the Euler method the slope for each interval is considered to
be the slope of the tangent at the initial point of that interval.
Euler method
Second-order ordinary differential equation

General form:

where is a given function.

The second-order differential equation can be written as two


first-order differential equation:

and to solve these we would need two conditions to be given.


Boundary conditions

If the conditions given for solving the problem are both


specified at the same value of the problem is known as an
initial value problem.

If the conditions given for solving the problem are specified


at different values of the problem is known as a boundary
value problem.
Limitations of the Euler method

 The Euler method uses the first order approximation and


hence the truncation error is of the order of

 The step size must be considerably small for this method to


work well, however round-off error at each step may
accumulate for large number of steps.

 For a large number of steps the computation time will also be


longer.

You might also like