Appm 212 Assignment 2

You might also like

You are on page 1of 4

INITIALS & SURNAME STUDENT NO

OR MAJOLA 38260433

SA MALULEKE 35680768

J MAHLAHLANE 34582495

MODULE: APPM212

ASSIGNMENT NO: 2 (GROUP ASSIGNMENT)

LECTURER: DR L PHALI

DUE DATE: 11 APRIL 2023


EULER’S METHOD AND APPLICATION

Introduction and background

A numerical method for roughly estimating solutions to ordinary differential equations


is the Euler's method (ODEs). It was created by the well-known Swiss mathematician
Leonhard Euler, and it is still one of the most straightforward and popular techniques
for resolving ODEs today.
Euler's approach is based on the fundamental principle of approximating an ODE's
solution by utilizing its derivative at a single point to forecast its value at a nearby
location. This is accomplished by breaking the solution interval into manageable time
steps and updating the solution at each one using a straightforward recursive
algorithm.
The approach is based on the solution's first-order Taylor series expansion, which
calculates an approximation of the value of the solution at a given position using the
value and derivative of the solution at a nearby point. The inaccuracy of Euler's
approach therefore reduces linearly with the size of the time step, making it a first-
order numerical method.
Euler's approach has some drawbacks while being quite straightforward and
straightforward to use. For stiff ODEs, which are characterized by rapid changes in
the solution over brief time intervals, it might not produce correct results, for
instance. Yet, it continues to be a helpful tool for approximating solutions to
numerous ODEs in a variety of scientific and technical domains.

Methodology

The procedure begins by defining an initial value for the ODE's solution, such as y(0)
= y0. The approach then uses the following formula to approximation the value of the
answer at each time step, let's say y(t+Δt):

y(t+Δt) = y(t) + Δt * f(t, y(t)) ≈ yn = yn-1+h.f(xn-1,yn-1)


Where the derivative of the solution at time t is represented by f(t, y(t)). In other
terms, the rate of change of the solution at time t, or f(t, y(t)) is the measure of how
quickly the solution is changing at that time.

According to the Euler's method formula, the value of the solution at the subsequent
time step is equal to the value of the solution at the previous time step plus the
product of the previous time step's (Δt) value and the current time step's (t)
derivative's (f(t, y(t)) value. This approximation makes the assumption that the
solution's rate of change will remain constant over the time span Δt.

We can roughly determine the solution of the ODE over a period of time by
periodically applying this formula at each time step Δt. The size of the time step t
affects the method's accuracy. While requiring more computing work, smaller time
increments typically produce estimates that are more accurate.

EXAMPLE OF EULER
y(t+Δt) = y(t) + Δt * f(t, y(t)) ≈ yn = yn-1+h.f(xn-1,yn-1)
Use euler’s method with step size h=0.1 to estimate y(0.3) where y(x) is the solution
of the initial value problem
Y’ = y + xy y(0) = 0

Solution

Y’= f(xi,yi) is the slope of the tangent line at (xi,yi)

𝑥𝑛 = 𝑥𝑛−1 + ℎ 𝑦𝑛 = 𝑦𝑛−1 + ℎ𝑓(𝑥𝑛−1; 𝑦𝑛−1)


𝑥0 = 0 𝑦0 = 0
𝑥1 = 0.1 𝑦1 = 0 + (0.1)(0 + 2(0)) = 0
𝑥2 = 0.2 𝑦2 = 0 + (0.1)(0.1 + 2(0)) = 0.01
𝑥3 = 0.3 𝑦3 = 0.01 + (0.1)(0.2 + 2(0.01)) = 0.032
Applications

In many disciplines, including physics, engineering, biology, and economics,


differential equation solutions are approximated using the Euler's method, a
commonly used numerical technique. It can be used to mimic and model a variety of
real-world issues involving ongoing changes over time.
Modeling the motion of things under the influence of forces is one application of
Euler's approach to real-world issues. Consider the scenario where we want to mimic
the motion of a projectile, let us say a basketball is thrown into the air and it is
affected by gravity. We may create a differential equation that describes the motion
of the projectile by using physical principles, such as Newton's second law of motion.
Next, we may simulate the projectile's trajectory over time using Euler's method to
approximatively solve the differential equation at discrete time steps.
Modeling the spread of infectious diseases is another application of Euler's
approach. The dynamics of an epidemic can be explained by a system of differential
equations, such as the SIR model. Then, we may forecast the spread of the disease
over time by using Euler's approach to approximate the system's solution at discrete
time steps as it was done in the world during coronavirus pandemic.

Many engineering applications, including the design and analysis of electrical


circuits, control systems, and structural mechanics, also employ Euler's method.
Differential equations are utilized in these applications to simulate the behaviour of
physical systems, and Euler's method is employed to examine the performance of
the systems and approximate the equations' solutions.

Conclusion

In conclusion, Euler's method is a numerical technique for approximating the answer


to a first-order ordinary differential equation. Differential equations that cannot be
determined analytically can be determined using this method. Although it is
straightforward and simple to apply, it has certain obstructions, including precision
flaws brought on by the linear approximation used in the method. On the other hand,
it can provide approximations to the differential equation's solution that are quite
accurate if the right steps and safeguards are taken. Euler's method is a helpful tool
for simulating and modeling a variety of real-world issues involving ongoing changes
in the environment. The accuracy of the approach is dependent on the size of the
time step used in the approximation, so it is essential to understand that for more
effective and difficult situations other more advanced numerical methods might be
considered.

You might also like