[go: up one dir, main page]

0% found this document useful (0 votes)
29 views7 pages

Eulers Method

The document explains Euler's Method, a numerical technique for solving ordinary differential equations by estimating slopes using the first derivative. It provides a step-by-step example of applying this method to the equation dy/dt = 4e^(0.8t) - 0.5y, with a specific initial condition and step size. The document includes a table to track iterations, calculated values, and errors in the approximation compared to the true analytical solution.

Uploaded by

pierce.tanilon
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)
29 views7 pages

Eulers Method

The document explains Euler's Method, a numerical technique for solving ordinary differential equations by estimating slopes using the first derivative. It provides a step-by-step example of applying this method to the equation dy/dt = 4e^(0.8t) - 0.5y, with a specific initial condition and step size. The document includes a table to track iterations, calculated values, and errors in the approximation compared to the true analytical solution.

Uploaded by

pierce.tanilon
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/ 7

Euler’s Method

Numerical Method use in solving Ordinary Differential Equation


• The first derivative
provides a direct estimate
of the slope at ti

• Here f (ti, yi) is the


differential equation
evaluated at ti and yi . This
estimate can be substituted ,
• This formula is referred to as Euler’s method (or the Euler-Cauchy or
point-slope method).

• A new value of y is predicted using the slope (equal to the first


derivative at the original value of t) to extrapolate linearly over the
step size h.
Problem:
Use Euler’s method to integrate dy/dt = 4e0.8t − 0.5y from t = 0 to 4
with a step size of 1. The initial condition at t = 0 is y = 2 or y(0) = 2
Note that the exact solution can be determined analytically as,
Step 1: Identify given data
dy/dt = 4e0.8t − 0.5y
h = 1, t = 0 to 4 , y(0) = 2

Step 2: Determine the required


y (4) = ?

Step 3: Draw a table with the following columns and fill in given data
Iteration ti yi f (ti,yi) Y Euler Y True  a  (%)
1 0 2
2 1
3 2
4 3
5 4
Step 4: Solve for f (ti , yi) and y i+1
f (0, 2) = 4e0 − 0.5(2) = 3.0000
y1 = y0+ f (ti,yi) h
y1 = y0 + f (0,2)(1)
= 2 + 3 (1)
= 5.0000

Step 5: Solve for the value of analytical value of y or ytrue. Fill in data.
Iteration ti yi f (ti,yi) Y euler Y true  a  (%)
1 0 2 3.0000 5.0000 2.0000
2 1 5.0000 6.4021 11.4022 6.1946

Take note of the analytical solution: 4


𝑦= 𝑒 .8 0
− 𝑒 −0.5 0
+ 2 𝑒 −0.5 0
= 2.0000
1.3
Step 5: Complete the table

Iteration ti yi f (ti,yi) Y Euler Y True  a  (%)


1 0 2 3.0000 5.0000 2.0000 150 %
2 1 5.0000 6.4021 11.4022 6.1946 84.07 %
3 2 11.40216 14.1111 25.5132 14.8439 71.88 %
4 3 … … … … …
5 4 … … … … …

4
𝑦= 𝑒 .8 2
− 𝑒 −0.5 2
+ 2 𝑒 −0.5 2
= 14.84392
1.3

You might also like