0% found this document useful (0 votes)
875 views

Euler's Method and Error Analysis PDF

This report introduces Euler's method for solving ordinary differential equations numerically. Euler's method approximates the slope of the tangent line at each step to estimate the next value. The method is first-order accurate and simple to implement but can be numerically unstable. Error analysis shows the local truncation error is proportional to the step size h. Stability depends on choosing h small enough to satisfy the stability condition. While simple, Euler's method has limitations including reduced accuracy for large step sizes and increased computation time for small step sizes.

Uploaded by

Sh Smart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
875 views

Euler's Method and Error Analysis PDF

This report introduces Euler's method for solving ordinary differential equations numerically. Euler's method approximates the slope of the tangent line at each step to estimate the next value. The method is first-order accurate and simple to implement but can be numerically unstable. Error analysis shows the local truncation error is proportional to the step size h. Stability depends on choosing h small enough to satisfy the stability condition. While simple, Euler's method has limitations including reduced accuracy for large step sizes and increased computation time for small step sizes.

Uploaded by

Sh Smart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Republic of Iraq

Ministry of Higher Education


and Scientific Research
University of Technology
Electrical Engineering Department

Euler’s Method and Error Analysis

Report By

Shatha Hani Jasim

Supervised by

Assist. Prof. Dr. Suad Khairi


June 2020
Abstract

In this report, we introduce the notion of Euler's method and error analysis. And we

obtain various conditions for stability analysis and it has been shown that the Euler's method is
convergent and consistent. The method is clarified with the help of numerical illustration and
graphical analysis.

It is sometimes felt that the step size is root cause for such misconceptions. But it is hardly felt
that clubbing of the forward Euler algorithm with the backward Euler algorithm for convenience can
lead to serious misconceptions and of course it depends on the nature of the problems. With this in
mind we consider few such problems that falls under the category of Ordinary Deferential Equation
(ODE).
Euler’s Method and Error Analysis Shatha Hani

Euler’s Method and Error Analysis

1. Introduction
Differential equations are used to model problems that involve the change of some variable
with respect to another. These problems require the solution to an initial- value problem that
is, the solution to a differential equation that satisfied a given (initial condition). [1]The
methods we consider in this paper is the Euler’s method. It is a numerical technique to solve
ordinary differential equations of the form

2. Numerical Method
The numerical method forms an important part of solving initial value problem in ordinary
differential equation, most especially in cases where there is no closed form analytic, formula or
difficult to obtain exact solution. Next, we shall present Euler’s method for solving initial value
problems in ordinary differential equations

3. Euler’s Method
Euler’s method is also called tangent line method and is the simplest numerical method for
solving initial value problem in ordinary differential equation, particularly suitable for quick
programming which was originated by Leonhard Euler in 1768. This method subdivided into three
namely:

• Forward Euler’s method.

• Improved Euler’s method.

• Backward Euler’s method.

In this work, we shall only consider forward Euler’s method.

3.1. Algorithm for Euler’s Method (Samuel, 1981)


The typical steps of Euler’s method are given below:

Step 1: define f (xn , yn )

Step 2: input initial values x0 and y0

1
Euler’s Method and Error Analysis Shatha Hani

Step 3: input step sizes h and number of steps n

Step 4: calculate x and y

for n = 1: N −1
xn+1 = xn + h

yn+1 = yn + hf (xn , yn )

Step 5: output xn+1 and yn+1

Step 6: end

3.2. Derivation of Euler's Method


Euler's method is defined by

From the graph let y1 denotes y(x1) and y0 denotes y(x0): So the slope

Figure (1) : graphical representation of Euler's method

2
Euler’s Method and Error Analysis Shatha Hani

One can use the value of y(xi) (an approximate value of y at x = xi)

to calculate y(x2) , that would be the predicted value at x2 , given by

Based on the above equations , if we know the value of y = yn at xn ,

Then

This formula is known as Euler's Method.

3.3. Numerical Differentiation


From the definition of a derivative,

3
Euler’s Method and Error Analysis Shatha Hani

Example (1):Use Euler's method on the interval [0, 1] to find the solution

But from the given equation ,by using the method of separation of variables,

the exact value of y(x4) is

4
Euler’s Method and Error Analysis Shatha Hani

3.4. Error Analysis


3.4.1.Order of Euler’s Method
The difference method

Figure (2): Stability region (shadowed circle) for Euler method

5
Euler’s Method and Error Analysis Shatha Hani

Example (2): Suppose the initial-value problem

then examine the effect of( h) on the stability of the Euler's method and give graphical
explanation when:

a) n=20
b) n=25
c) n=30

Sol: The exact solution of the Euler method is

Here the solution oscillates and the error grows slowly. The method is unstable.

Here the solution oscillates and the error grows slowly. The method is in some sense stable.

6
Euler’s Method and Error Analysis Shatha Hani

Figure (3): graphical comparison for h=20,h=25 and h=30

Example(3): Examine the stability of the above example when :

n=50

n=100

Sol: We know that the Euler solution is stable when

0.04, but the value of

So we have

which implies the solution stable and similarly when n = 100 the solution is stable Remark: The
above examples indicates that a numerical method can not be applied as we like to a given initial
value problem. The choice of the step length is very important and it is governed by the stability
condition.

3.5. Advantages/Disadvantages of Euler’s Method


 Advantages: Euler’s Method is simple and direct
• Can be used for nonlinear IVPs
 Disadvantages:
• it is less accurate and numerically unstable.
• Approximation error is proportional to the step size h. Hence, good approximation is obtained
with a very small h. This requires a large number of time discretization leading to a larger
computation time.
• Usually applicable to explicit differential equations

7
Euler’s Method and Error Analysis Shatha Hani

4. Conclusion
In general, each numerical method has its own advantages and disadvantages of use: Euler’s
method is therefore best reserved for simple preferably, recursive derivatives that can be represented
by few terms. It is simple to implement and simplifies rigorous analysis. The major disadvantages of
this method are the tiresome, sometimes impossible calculation of higher derivatives and the slow
convergence of the series for some functions, which involves terms of opposite sign.

This report examines one of the most popular numerical methods for solving the deferential
equation of the form

This report also dealt with the error analysis of the Euler's method. And we are able to show
that the Eulers method is convergent as well as consistent .Further more we investigated the stability
conditions of the Euler's method and it is found that the stability condition is

In general a numerical method can not be applied as we like to a given initial value problem.
The choice of the step length is very important and it is governed by the stability condition.

You might also like