This document is helpful to study Euler method of Numerical solutions for Ordinary differential equations of first order with Initial value problems.
Size: 405.32 KB
Language: en
Added: May 07, 2024
Slides: 16 pages
Slide Content
5/7/2024 http://numericalmethods.eng.usf.edu 1
Euler Method
Major: All Engineering Majors
Authors: Autar Kaw, Charlie Barker
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM
Undergraduates
Euler Method
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu3
Euler’s Method
Φ
Stepsize,h
x
y
x
0
,y
0
Truevalue
y
1
,Predicted
value
00,, yyyxf
dx
dy
SlopeRun
Rise
01
01
xx
yy
00,yxf
010001 , xxyxfyy hyxfy
000 ,
Figure 1Graphical interpretation of the first step of Euler’s method
http://numericalmethods.eng.usf.edu4
Euler’s Method
Φ
Step size
h
True Value
y
i+1,Predicted value
y
i
x
y
x
i x
i+1
Figure 2.General graphical interpretation of Euler’s method hyxfyy
iiii ,
1
iixxh
1
http://numericalmethods.eng.usf.edu5
How to write Ordinary Differential
Equation
Example50,3.12
yey
dx
dy x
isrewrittenas50,23.1
yye
dx
dy x
Inthiscase yeyxf
x
23.1,
How does one write a first order differential equation in the form ofyxf
dx
dy
,
http://numericalmethods.eng.usf.edu6
Example
Aballat1200Kisallowedtocooldowninairatanambienttemperature
of300K.Assumingheatislostonlyduetoradiation,thedifferential
equationforthetemperatureoftheballisgivenby K
dt
d
12000,1081102067.2
8412
Findthetemperatureat480t secondsusingEuler’smethod.Assumeastepsizeof240h
seconds.
http://numericalmethods.eng.usf.edu12
Comparison with exact results-1500
-1000
-500
0
500
1000
1500
0 100 200 300 400 500
Tim e, t (sec)
Temperature,
Exact solution
h=120
h=240
h=480
θ(K)
Figure 4.Comparison of Euler’s method with exact solution for different step sizes
http://numericalmethods.eng.usf.edu13
Effects of step size on Euler’s
Method-1200
-800
-400
0
400
800
0 100 200 300 400 500
Step size, h (s)
Temperature,
θ(K)
Figure 5.Effect of step size in Euler’s method.
http://numericalmethods.eng.usf.edu14
Errors in Euler’s Method
ItcanbeseenthatEuler’smethodhaslargeerrors.Thiscanbeillustratedusing
Taylorseries. ...
!3
1
!2
1 3
1
,
3
3
2
1
,
2
2
1
,
1
ii
yx
ii
yx
ii
yx
ii
xx
dx
yd
xx
dx
yd
xx
dx
dy
yy
iiii
ii ...),(''
!3
1
),('
!2
1
),(
3
1
2
111
iiiiiiiiiiiiii xxyxfxxyxfxxyxfyy
AsyoucanseethefirsttwotermsoftheTaylorserieshyxfyy
iiii ,
1
Thetrueerrorintheapproximationisgivenby
...
!3
,
!2
,
32
h
yxf
h
yxf
E
iiii
t
aretheEuler’smethod.2
hE
t
Additional Resources
For all resources on this topic such as digital audiovisual
lectures, primers, textbook chapters, multiple-choice
tests, worksheets in MATLAB, MATHEMATICA, MathCad
and MAPLE, blogs, related physical problems, please
visit
http://numericalmethods.eng.usf.edu/topics/euler_meth
od.html