se301: numerical methods topic 8 ordinary differential equations (odes) lecture 28-36
DESCRIPTION
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36. KFUPM (Term 101) Section 04 Read 25.1-25.4, 26-2, 27-1. Outline of Topic 8. Lesson 1:Introduction to ODEs Lesson 2:Taylor series methods Lesson 3:Midpoint and Heun’s method - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/1.jpg)
CISE301_Topic8L3 1
SE301: Numerical Methods
Topic 8 Ordinary Differential
Equations (ODEs)Lecture 28-36
KFUPM(Term 101)Section 04
Read 25.1-25.4, 26-2, 27-1
![Page 2: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/2.jpg)
CISE301_Topic8L3 2
Outline of Topic 8 Lesson 1: Introduction to ODEs Lesson 2: Taylor series methods Lesson 3: Midpoint and Heun’s
method Lessons 4-5: Runge-Kutta methods Lesson 6: Solving systems of ODEs Lesson 7: Multiple step Methods Lesson 8-9: Boundary value Problems
![Page 3: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/3.jpg)
CISE301_Topic8L3 3
Lecture 30Lesson 3: Midpoint and
Heun’s Predictor Corrector Methods
![Page 4: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/4.jpg)
CISE301_Topic8L3 4
Learning Objectives of Lesson 3 To be able to solve first order
differential equations using the Midpoint Method.
To be able to solve first order differential equations using the Heun’s Predictor Corrector Method.
![Page 5: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/5.jpg)
CISE301_Topic8L3 5
Topic 8: Lesson 3
Lesson 3: Midpoint and Heun’sPredictor-Corrector Methods
• Review Euler Method• Heun’s Method• Midpoint Method
![Page 6: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/6.jpg)
CISE301_Topic8L3 6
Euler MethodEuler Method
) Error Truncation Global
) Error Truncation Local
,...2,1
),()(
)(),()(
MethodEuler Problem
2
100
00
O(h
O(h
ifor
yxfhyyyxy
xyyyxfxy
iiii
![Page 7: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/7.jpg)
CISE301_Topic8L3 7
The methods proposed in this lesson have the general form:
For the case of Euler: Different forms of will be used for
the Midpoint and Heun’s Methods.
IntroductionIntroduction
hyy ii 1
),( ii yxf
00 )(),,()(
:ODEorder first a is solved be toProblem
yxyyxfxy
![Page 8: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/8.jpg)
CISE301_Topic8L3 8
Midpoint MethodMidpoint Method
) Error Truncation Global
) Error Truncation Local
),(
),(2
)(
)(),()(
MethodMidpoint Problem
2
3
2
1
2
11
2
100
00
O(h
O(h
yxfhyy
yxfh
yyyxy
xyyyxfxy
iiii
iiii
![Page 9: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/9.jpg)
CISE301_Topic8L3 9
Motivation The midpoint can be summarized as:
Euler method is used to estimate the solution at the midpoint.
The value of the rate function f(x,y) at the mid point is calculated.
This value is used to estimate yi+1.
Local Truncation error of order O(h3). Comparable to Second order Taylor series
method.
![Page 10: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/10.jpg)
CISE301_Topic8L3 10
Midpoint MethodMidpoint Method
1
2
10
ii
xxx
),( ii yx
),(,),(2 2
1
2
11
2
1
ii
iiiiii
yxfhyyyxfh
yy
![Page 11: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/11.jpg)
CISE301_Topic8L3 11
Midpoint MethodMidpoint Method
1
2
10
ii
xxx
),( ii yxfslope
),( ii yx
),(,),(2 2
1
2
11
2
1
ii
iiiiii
yxfhyyyxfh
yy
![Page 12: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/12.jpg)
CISE301_Topic8L3 12
Midpoint MethodMidpoint Method
1
2
10
ii
xxx
),( ii yxfslope
),( ii yx
),(,),(2 2
1
2
11
2
1
ii
iiiiii
yxfhyyyxfh
yy
),(2
1
2
1 iiyx
![Page 13: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/13.jpg)
CISE301_Topic8L3 13
Midpoint MethodMidpoint Method
1
2
10
ii
xxx
),(2
1
2
1
iiyxfslope
),( ii yx
),(,),(2 2
1
2
11
2
1
ii
iiiiii
yxfhyyyxfh
yy
),(2
1
2
1 iiyx
![Page 14: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/14.jpg)
CISE301_Topic8L3 14
Midpoint MethodMidpoint Method
1
2
10
ii
xxx
),(2
1
2
1
iiyxfslope
),( ii yx
),(,),(2 2
1
2
11
2
1
ii
iiiiii
yxfhyyyxfh
yy
),(2
1
2
1 iiyx
![Page 15: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/15.jpg)
CISE301_Topic8L3 15
Example 1
y(0.2) and y(0.1) Determine .1.0 Use
1)0(
1)(
ODE thesolve toMethodMidpoint theUse2
h
y
yxxy
![Page 16: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/16.jpg)
CISE301_Topic8L3 16
Example 1
4446.1)3438.2(1.02103.1),(
3213.1)2103.101.01(05.2103.1),(2
:2Step
2103.1)1.10025.01(1.01),(
1.1)101(05.01),(2
:1Step
1.0,1)0(,1),( :Problem
2
11
2
11
12
111
2
11
2
10
2
10
01
000
2
10
02
yxfhyy
yxfh
yy
yxfhyy
yxfh
yy
hyyyxyxf
![Page 17: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/17.jpg)
CISE301_Topic8L3 17
Heun’s Predictor Corrector
![Page 18: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/18.jpg)
CISE301_Topic8L3 18
Heun’s Predictor Corrector Heun’s Predictor Corrector MethodMethod
) ErrorTruncation Global
) ErrorTruncation Local
),(),(2
:Corrector
),(:Predictor)(
)(),()(
Method'HProblem
2
3
011
11
0100
00
O(h
O(h
yxfyxfh
yy
yxfhyyyxy
xyyyxfxy
seun
iiiiii
iiii
![Page 19: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/19.jpg)
CISE301_Topic8L3 19
Heun’s Predictor Corrector(Prediction)
1ii xx
),( ii yx
),(Prediction 01 iiii yxfhyy
),( 011 ii yx
![Page 20: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/20.jpg)
CISE301_Topic8L3 20
Heun’s Predictor Corrector(Prediction)
1ii xx
),( ii yx
),(Prediction 01 iiii yxfhyy
),( 011 ii yx
),( 011 ii yxfslope
![Page 21: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/21.jpg)
CISE301_Topic8L3 21
Heun’s Predictor Corrector(Correction)
1ii xx
),( ii yx
),( 011 ii yx
2
),(),( 011
iiii yxfyxfslope
),( 111 ii yx
),(),(2
011
11 iiiiii yxfyxf
hyy
![Page 22: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/22.jpg)
CISE301_Topic8L3 22
Example 2
y(0.2) and y(0.1) Determine
only correction One .1.0 Use
1)0(
1)(
ODE thesolve toMethod sHeun' theUse2
h
y
yxxy
![Page 23: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/23.jpg)
CISE301_Topic8L3 23
Example 2
4452.1),(),(2
:Corrector
4326.1),(:Predictor
:2Step
2105.1),(),(2
:Corrector
2.1)2(1.01),(:Predictor
:1Step
1.0,1)(,1),( :Problem
022111
12
11102
011000
11
00001
002
yxfyxfh
yy
yxfhyy
yxfyxfh
yy
yxfhyy
hxyyxyyxf
![Page 24: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/24.jpg)
CISE301_Topic8L3 24
Summary Euler, Midpoint and Heun’s methods are
similar in the following sense:
Different methods use different estimates of the slope.
Both Midpoint and Heun’s methods are comparable in accuracy to the second order Taylor series method.
slopehyy ii 1
![Page 25: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/25.jpg)
CISE301_Topic8L3 25
Comparison
),(
)()(),(2
Midpoint
),(),(2
:Corrector
)()(),(:Predictor
Method sHeun'
)()(),( MethodEuler
2
1
2
11
23
2
1
111
1
2301
21
iiii
iiii
kiiiii
ki
iiii
iiii
yxfhyy
hOhOyxfh
yy
yxfyxfh
yy
hOhOyxfhyy
hOhOyxfhyy
Method Local truncation error
Global truncation error
![Page 26: SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture 28-36](https://reader036.vdocuments.us/reader036/viewer/2022081504/56814d04550346895dba336e/html5/thumbnails/26.jpg)
CISE301_Topic8L3 26
More in this Topic
Lessons 4-5: Runge-Kutta Methods Lesson 6: Systems of High order ODE Lesson 7: Multi-step methods Lessons 8-9: Boundary Value Problems