SlideShare a Scribd company logo
1 of 18
1
Numerical Solution of Ordinary
Differential Equations (ODE):
Boundary Value Problem (BVP)
Lecture-3
2
Specific Aims
 Applications
 Introduction of Boundary value problem (BVP)
 Discuss finite difference method
 Examples of the solution of BVP by using finite difference
method
 Multiple questions
 Exercises
3
Applications
 Science and Engineering
 Introduction of BVP
Problems involving second and higher order differential
equations, we may prescribed the conditions at two or more
points. Such problems are called boundary value problems
(BVP).
 Finite Difference Formula
 Forward difference formula
 Backward difference formula
 Central difference formula
4
Forward difference formula
𝑦′
=
1
ℎ
𝑦𝑛+1 − 𝑦𝑛
For first order
𝑦′′
=
1
ℎ2
𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛
For second order
For third order 𝑦′′′
=
1
ℎ3
𝑦𝑛+3 − 3𝑦𝑛+2 + 3𝑦𝑛+1 − 𝑦𝑛
5
Backward difference formulas:
𝑦′ =
1
ℎ
𝑦𝑛 − 𝑦𝑛−1
For first order
𝑦′′
=
1
ℎ2
𝑦𝑛 − 2𝑦𝑛−1 + 𝑦𝑛−2
For second order
For third order 𝑦′′′
=
1
ℎ3
𝑦𝑛 − 3𝑦𝑛−1 + 3𝑦𝑛−2 − 𝑦𝑛−3
6
Central Difference formula
For first order 𝑦′
=
1
2ℎ
𝑦𝑛+1 − 𝑦𝑛−1
For second order 𝑦′′ =
1
ℎ2
𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1
For third order 𝑦′′′ =
1
2ℎ3
𝑦𝑛+2 − 2𝑦𝑛+1 + 2𝑦𝑛−1 − 𝑦𝑛−2
7
Examples
Question 1#: Consider the boundary value problem
𝑦′′ − 𝑦′ = 1, 𝑦 0 = 1, 𝑦(1) = 2 𝑒 − 1
(a) Derive a recurrence relation using three points central
difference approximations with ℎ = 1 3.
(b) Using the above finite difference formula solve the
above BVP.
Solution:
(a) Using central difference formulas, we have
𝑦′
=
1
2ℎ
𝑦𝑛+1 − 𝑦𝑛−1
𝑦′′ =
1
ℎ2
𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1
8
Given ODE is
𝑦′′ − 𝑦′ = 1
Or,
1
ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 −
1
2ℎ
𝑦𝑛+1 − 𝑦𝑛−1 = 1
Taking ℎ =
1
3
,
Or
1
(
1
3
)2
𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 −
1
2(
1
3
)
𝑦𝑛+1 − 𝑦𝑛−1 = 1
Or 9 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 −
3
2
𝑦𝑛+1 − 𝑦𝑛−1 = 1
Or 21𝑦𝑛−1 − 36𝑦𝑛 + 15𝑦𝑛+1 = 2
9
(b) With ℎ = 1 3, the nodal points are 𝑥0 = 0, 𝑥1 =
1
3
, 𝑥2 =
2
3
,
𝑥3 = 1.
For 𝑛 = 1, 𝑥1 =
1
3
, 𝑦0 = 1,
−36𝑦1 + 15𝑦2 = 2 − 21 = −19, (1)
Solving the equations (1) and (2), we have
𝑦1 = 1.4548 and 𝑦2 = 2.2250
For 𝑛 = 2, 𝑥2 =
2
3
, 𝑦3 = 2(𝑒 − 1) ,
21𝑦1 − 36𝑦2 = 2 − 30(𝑒 − 1) = −49.5485, (2)
[Since 𝑒 = 2.718283333]
21𝑦𝑛−1 − 36𝑦𝑛 + 15𝑦𝑛+1 = 2
10
Question 2#:
(a) Use three point central difference formula for
derivative to derive a recurrence relation for the above
IVP.
Given that 𝑦′ = 2𝑥𝑦2 − 𝑦, where 𝑦 = 1 at 𝑥 = 0.
(b) Estimate the values of y at 𝑥 = 0.4 and 0.6 using this
recurrence relation.
Three point central difference formula for derivatives is as
follows:
𝑦𝑛
′ ≈
𝑦𝑛+1 − 𝑦𝑛−1
2ℎ
Solution:
𝑦′𝑛 = 2𝑥𝑛𝑦𝑛
2 − 𝑦𝑛
(a) Differential equation at (𝑥𝑛, 𝑦𝑛) is
11
Using three point central difference formula for derivatives
with the differential equation at (𝑥𝑛, 𝑦𝑛) we have
𝑦𝑛
′ ≈
𝑦𝑛+1 − 𝑦𝑛−1
2ℎ
= 2𝑥𝑛𝑦𝑛
2 − 𝑦𝑛
𝑦𝑛+1 = 𝑦𝑛−1 + 2ℎ 2𝑥𝑛𝑦𝑛
2
− 𝑦𝑛
(b) For ℎ = 0.2 with the starting values 𝑥0 = 0, 𝑦0 = 1 . For
getting the values of 𝑥1 and 𝑦1, apply Runge-Kutta four order
method. Here same ODE is used with same initial condition.
The formula of second order Runge-Kutta method:
𝑦1 = 𝑦0 +
1
6
[𝑘1 + 2𝑘2 +2𝑘3 +𝑘4]
12
𝑘1 = ℎ 𝑓(𝑥0, 𝑦0)
𝑘2 = ℎ 𝑓(𝑥0 +
ℎ
2
, 𝑦0 +
𝑘1
2
)
𝑘3 = ℎ 𝑓(𝑥0 +
ℎ
2
, 𝑦0 +
𝑘2
2
)
𝑘4 = ℎ 𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘3)
where
[Since ℎ = 0.2, 𝑥0 =
0, 𝑦0 = 1 ]
Now
𝑘1 = ℎ 𝑓 𝑥0, 𝑦0
= ℎ [2𝑥0𝑦0
2 − 𝑦0]
= 0.2 [2 0 1)2 − 1 = −0.2
[Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ]
13
𝑘2 = ℎ 𝑓(𝑥0 +
ℎ
2
, 𝑦0 +
𝑘1
2
)
= ℎ 𝑓(0 +
0.2
2
, 1 +
−0.2
2
) [Since 𝑥0 = 0, 𝑦0 = 1,
𝑘1= - 0.2, h=0.2]
= 0.2 𝑓(0.1, 0.9)
[Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2
− 𝑦 ]
= 0.2 [2 0.1 0.9)2
− 0.9
= −0.1476
𝑘3 = ℎ 𝑓(𝑥0 +
ℎ
2
, 𝑦0 +
𝑘2
2
)
= ℎ 𝑓(0 +
0.2
2
, 1 +
−0.1476
2
) [Since 𝑥0 = 0, 𝑦0 = 1,
𝑘2= -0.1476, h=0.2]
[Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ]
= 0.2 𝑓(0.1, 0.926)
= 0.2 [2 0.1 0.926)2 − 0.926
= −0.1509
14
𝑘4 = ℎ 𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘3)
= ℎ 𝑓(0 + 0.2, 1 − 0.1509)
[Since 𝑥0 = 0, 𝑦0 = 1, 𝑘3= - 0.1509, h=0.2]
[Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ]
= ℎ 𝑓(0.2, 0.849)
= 0.2 [2 0.2 0.849)2 − 0.849
= −0.1121
𝑦1 = 𝑦0 +
1
6
[𝑘1 + 2𝑘2 +2𝑘3 +𝑘4]
Therefore,
15
Substituting the values of 𝑦0, 𝑘1, 𝑘2, 𝑘3 and 𝑘4 , we get
𝑦1 = 𝑦0 +
1
6
[𝑘1 + 2𝑘2 +2𝑘3 +𝑘4]
= 1 +
1
6
[−0.2 + 2 −0.1476 + 2(−0.1509) − 0.1121]
= 1 +
1
6
[−0.2 − 0.2952 − 0.3018 − 0.1121]
= 0.8485
We get, 𝑥1 = 0.2, 𝑦1 = 0.8485
Taking 𝑛 = 1,
𝑦(0.4) ≈ 𝑦2
= 𝑦0 + 2 0.2 2𝑥1𝑦1
2
− 𝑦1
= 1 + 0.4 2 0.2 0.84852 − 0.8485 = 0.7758
𝑦𝑛+1 = 𝑦𝑛−1 + 2ℎ 2𝑥𝑛𝑦𝑛
2 − 𝑦𝑛
16
Taking 𝑛 = 2,
𝑦(0.6) ≈ 𝑦3
= 𝑦1 + 2 0.2 2𝑥2𝑦2
2
− 𝑦2
= 0.8485 + 0.4 2 0.4 0.77582 − 0.7758 = 0.6099
[Since h=0.2, 𝑥1 = 0.4, 𝑦1 = 0.7758]
Outcomes
 Numerically solved ODE with conditions by using Finite
difference method.
𝑦𝑛+1 = 𝑦𝑛−1 + 2ℎ 2𝑥𝑛𝑦𝑛
2 − 𝑦𝑛
17
S.No. Questions
1 Which formula refers to central difference formula of second derivative?
(a) 𝑦′
=
1
2ℎ
𝑦𝑛+1 − 𝑦𝑛−1 ,
(b) 𝑦′′
=
1
ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1
(c) Both of them,
(d) None of them
2 Which formula refers to central difference formula of first derivative?
(a) 𝑦′ =
1
2ℎ
𝑦𝑛+1 − 𝑦𝑛−1 ,
(b) 𝑦′
=
1
ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1
3 Which formula refers to forward difference formula of second derivative?
(a) 𝑦′′
=
1
ℎ2 𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 ,
(b) 𝑦′′ =
1
ℎ3 𝑦𝑛+2 − 𝑦𝑛+1 + 𝑦𝑛 ,
(c) Both of them
4 Which formula refers to backward difference formula of second derivative?
(a) 𝑦′′
=
1
ℎ3 𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 ,
(b) 𝑦′′ =
1
ℎ2 𝑦𝑛 − 2𝑦𝑛−1 + 𝑦𝑛−2 ,
(c) None of them
Multiple questions:
18
Try to do yourself
Exercise 2:
(a) Use three point central difference formula for
derivative to derive a recurrence relation for the above
IVP.
Given that 𝑦′ = 𝑦𝑥2 + 2𝑥, where 𝑦 = −1 at 𝑥 = 0,
and h=0.2.
(b) Estimate the values of y at 𝑥 = 0.4 and 0.6 using this
recurrence relation.
Exercise 1: Consider the boundary value problem
(a) Derive a recurrence relation using three points central
difference approximations with ℎ = 1 3.
(b) Using the above finite difference formula solve the
above BVP.
𝑦′′
+ 5𝑦′
+ 3𝑦 = 1, 𝑦 0 = 1, 𝑦 1 = 0

More Related Content

Similar to Ch9 SL3 ODE-BVP.pptx

Calculus revision card
Calculus  revision cardCalculus  revision card
Calculus revision cardPuna Ripiye
 
Calculus revision card
Calculus  revision cardCalculus  revision card
Calculus revision cardPuna Ripiye
 
GCSE-CompletingTheSquare.pptx
GCSE-CompletingTheSquare.pptxGCSE-CompletingTheSquare.pptx
GCSE-CompletingTheSquare.pptxMitaDurenSawit
 
Study Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsStudy Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsMeenakshisundaram N
 
Ejercicios resueltos de analisis matematico 1
Ejercicios resueltos de analisis matematico 1Ejercicios resueltos de analisis matematico 1
Ejercicios resueltos de analisis matematico 1tinardo
 
Module 5 (Part 3-Revised)-Functions and Relations.pdf
Module 5 (Part 3-Revised)-Functions and Relations.pdfModule 5 (Part 3-Revised)-Functions and Relations.pdf
Module 5 (Part 3-Revised)-Functions and Relations.pdfGaleJean
 
Semana 12 ecuaciones polinomiales i álgebra-uni ccesa007
Semana 12   ecuaciones polinomiales i  álgebra-uni ccesa007Semana 12   ecuaciones polinomiales i  álgebra-uni ccesa007
Semana 12 ecuaciones polinomiales i álgebra-uni ccesa007Demetrio Ccesa Rayme
 
Functions and their Graphs (mid point)
Functions and their Graphs (mid point)Functions and their Graphs (mid point)
Functions and their Graphs (mid point)Nadeem Uddin
 
SUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptxSUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptxtungwc
 
elemetary algebra review.pdf
elemetary algebra review.pdfelemetary algebra review.pdf
elemetary algebra review.pdfDianaOrcino2
 
Solving Quadratic Equations
Solving Quadratic EquationsSolving Quadratic Equations
Solving Quadratic EquationsCipriano De Leon
 
Presentación álgebra
Presentación álgebraPresentación álgebra
Presentación álgebraKeishmer Amaro
 
Illustrating Quadratic Equation
Illustrating Quadratic EquationIllustrating Quadratic Equation
Illustrating Quadratic EquationRonaManabat1
 
Ecuaciones lineales de orden superior
Ecuaciones lineales de orden superiorEcuaciones lineales de orden superior
Ecuaciones lineales de orden superiormariarivas114
 

Similar to Ch9 SL3 ODE-BVP.pptx (20)

Calculus revision card
Calculus  revision cardCalculus  revision card
Calculus revision card
 
Calculus revision card
Calculus  revision cardCalculus  revision card
Calculus revision card
 
GCSE-CompletingTheSquare.pptx
GCSE-CompletingTheSquare.pptxGCSE-CompletingTheSquare.pptx
GCSE-CompletingTheSquare.pptx
 
Study Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsStudy Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential Equations
 
Ejercicios resueltos de analisis matematico 1
Ejercicios resueltos de analisis matematico 1Ejercicios resueltos de analisis matematico 1
Ejercicios resueltos de analisis matematico 1
 
Module 5 (Part 3-Revised)-Functions and Relations.pdf
Module 5 (Part 3-Revised)-Functions and Relations.pdfModule 5 (Part 3-Revised)-Functions and Relations.pdf
Module 5 (Part 3-Revised)-Functions and Relations.pdf
 
Semana 12 ecuaciones polinomiales i álgebra-uni ccesa007
Semana 12   ecuaciones polinomiales i  álgebra-uni ccesa007Semana 12   ecuaciones polinomiales i  álgebra-uni ccesa007
Semana 12 ecuaciones polinomiales i álgebra-uni ccesa007
 
Functions and their Graphs (mid point)
Functions and their Graphs (mid point)Functions and their Graphs (mid point)
Functions and their Graphs (mid point)
 
DE-PS.pdf
DE-PS.pdfDE-PS.pdf
DE-PS.pdf
 
SUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptxSUEC 高中 Adv Maths (Locus) (Part 2).pptx
SUEC 高中 Adv Maths (Locus) (Part 2).pptx
 
elemetary algebra review.pdf
elemetary algebra review.pdfelemetary algebra review.pdf
elemetary algebra review.pdf
 
Solving Quadratic Equations
Solving Quadratic EquationsSolving Quadratic Equations
Solving Quadratic Equations
 
Four Point Gauss Quadrature Runge – Kuta Method Of Order 8 For Ordinary Diffe...
Four Point Gauss Quadrature Runge – Kuta Method Of Order 8 For Ordinary Diffe...Four Point Gauss Quadrature Runge – Kuta Method Of Order 8 For Ordinary Diffe...
Four Point Gauss Quadrature Runge – Kuta Method Of Order 8 For Ordinary Diffe...
 
Presentación álgebra
Presentación álgebraPresentación álgebra
Presentación álgebra
 
Yoaniker morles2
Yoaniker morles2Yoaniker morles2
Yoaniker morles2
 
Numerical Methods and Analysis
Numerical Methods and AnalysisNumerical Methods and Analysis
Numerical Methods and Analysis
 
Illustrating Quadratic Equation
Illustrating Quadratic EquationIllustrating Quadratic Equation
Illustrating Quadratic Equation
 
Week_3-Circle.pptx
Week_3-Circle.pptxWeek_3-Circle.pptx
Week_3-Circle.pptx
 
GraphTransformations.pptx
GraphTransformations.pptxGraphTransformations.pptx
GraphTransformations.pptx
 
Ecuaciones lineales de orden superior
Ecuaciones lineales de orden superiorEcuaciones lineales de orden superior
Ecuaciones lineales de orden superior
 

Recently uploaded

Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Recently uploaded (20)

Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Ch9 SL3 ODE-BVP.pptx

  • 1. 1 Numerical Solution of Ordinary Differential Equations (ODE): Boundary Value Problem (BVP) Lecture-3
  • 2. 2 Specific Aims  Applications  Introduction of Boundary value problem (BVP)  Discuss finite difference method  Examples of the solution of BVP by using finite difference method  Multiple questions  Exercises
  • 3. 3 Applications  Science and Engineering  Introduction of BVP Problems involving second and higher order differential equations, we may prescribed the conditions at two or more points. Such problems are called boundary value problems (BVP).  Finite Difference Formula  Forward difference formula  Backward difference formula  Central difference formula
  • 4. 4 Forward difference formula 𝑦′ = 1 ℎ 𝑦𝑛+1 − 𝑦𝑛 For first order 𝑦′′ = 1 ℎ2 𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 For second order For third order 𝑦′′′ = 1 ℎ3 𝑦𝑛+3 − 3𝑦𝑛+2 + 3𝑦𝑛+1 − 𝑦𝑛
  • 5. 5 Backward difference formulas: 𝑦′ = 1 ℎ 𝑦𝑛 − 𝑦𝑛−1 For first order 𝑦′′ = 1 ℎ2 𝑦𝑛 − 2𝑦𝑛−1 + 𝑦𝑛−2 For second order For third order 𝑦′′′ = 1 ℎ3 𝑦𝑛 − 3𝑦𝑛−1 + 3𝑦𝑛−2 − 𝑦𝑛−3
  • 6. 6 Central Difference formula For first order 𝑦′ = 1 2ℎ 𝑦𝑛+1 − 𝑦𝑛−1 For second order 𝑦′′ = 1 ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 For third order 𝑦′′′ = 1 2ℎ3 𝑦𝑛+2 − 2𝑦𝑛+1 + 2𝑦𝑛−1 − 𝑦𝑛−2
  • 7. 7 Examples Question 1#: Consider the boundary value problem 𝑦′′ − 𝑦′ = 1, 𝑦 0 = 1, 𝑦(1) = 2 𝑒 − 1 (a) Derive a recurrence relation using three points central difference approximations with ℎ = 1 3. (b) Using the above finite difference formula solve the above BVP. Solution: (a) Using central difference formulas, we have 𝑦′ = 1 2ℎ 𝑦𝑛+1 − 𝑦𝑛−1 𝑦′′ = 1 ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1
  • 8. 8 Given ODE is 𝑦′′ − 𝑦′ = 1 Or, 1 ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 − 1 2ℎ 𝑦𝑛+1 − 𝑦𝑛−1 = 1 Taking ℎ = 1 3 , Or 1 ( 1 3 )2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 − 1 2( 1 3 ) 𝑦𝑛+1 − 𝑦𝑛−1 = 1 Or 9 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 − 3 2 𝑦𝑛+1 − 𝑦𝑛−1 = 1 Or 21𝑦𝑛−1 − 36𝑦𝑛 + 15𝑦𝑛+1 = 2
  • 9. 9 (b) With ℎ = 1 3, the nodal points are 𝑥0 = 0, 𝑥1 = 1 3 , 𝑥2 = 2 3 , 𝑥3 = 1. For 𝑛 = 1, 𝑥1 = 1 3 , 𝑦0 = 1, −36𝑦1 + 15𝑦2 = 2 − 21 = −19, (1) Solving the equations (1) and (2), we have 𝑦1 = 1.4548 and 𝑦2 = 2.2250 For 𝑛 = 2, 𝑥2 = 2 3 , 𝑦3 = 2(𝑒 − 1) , 21𝑦1 − 36𝑦2 = 2 − 30(𝑒 − 1) = −49.5485, (2) [Since 𝑒 = 2.718283333] 21𝑦𝑛−1 − 36𝑦𝑛 + 15𝑦𝑛+1 = 2
  • 10. 10 Question 2#: (a) Use three point central difference formula for derivative to derive a recurrence relation for the above IVP. Given that 𝑦′ = 2𝑥𝑦2 − 𝑦, where 𝑦 = 1 at 𝑥 = 0. (b) Estimate the values of y at 𝑥 = 0.4 and 0.6 using this recurrence relation. Three point central difference formula for derivatives is as follows: 𝑦𝑛 ′ ≈ 𝑦𝑛+1 − 𝑦𝑛−1 2ℎ Solution: 𝑦′𝑛 = 2𝑥𝑛𝑦𝑛 2 − 𝑦𝑛 (a) Differential equation at (𝑥𝑛, 𝑦𝑛) is
  • 11. 11 Using three point central difference formula for derivatives with the differential equation at (𝑥𝑛, 𝑦𝑛) we have 𝑦𝑛 ′ ≈ 𝑦𝑛+1 − 𝑦𝑛−1 2ℎ = 2𝑥𝑛𝑦𝑛 2 − 𝑦𝑛 𝑦𝑛+1 = 𝑦𝑛−1 + 2ℎ 2𝑥𝑛𝑦𝑛 2 − 𝑦𝑛 (b) For ℎ = 0.2 with the starting values 𝑥0 = 0, 𝑦0 = 1 . For getting the values of 𝑥1 and 𝑦1, apply Runge-Kutta four order method. Here same ODE is used with same initial condition. The formula of second order Runge-Kutta method: 𝑦1 = 𝑦0 + 1 6 [𝑘1 + 2𝑘2 +2𝑘3 +𝑘4]
  • 12. 12 𝑘1 = ℎ 𝑓(𝑥0, 𝑦0) 𝑘2 = ℎ 𝑓(𝑥0 + ℎ 2 , 𝑦0 + 𝑘1 2 ) 𝑘3 = ℎ 𝑓(𝑥0 + ℎ 2 , 𝑦0 + 𝑘2 2 ) 𝑘4 = ℎ 𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘3) where [Since ℎ = 0.2, 𝑥0 = 0, 𝑦0 = 1 ] Now 𝑘1 = ℎ 𝑓 𝑥0, 𝑦0 = ℎ [2𝑥0𝑦0 2 − 𝑦0] = 0.2 [2 0 1)2 − 1 = −0.2 [Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ]
  • 13. 13 𝑘2 = ℎ 𝑓(𝑥0 + ℎ 2 , 𝑦0 + 𝑘1 2 ) = ℎ 𝑓(0 + 0.2 2 , 1 + −0.2 2 ) [Since 𝑥0 = 0, 𝑦0 = 1, 𝑘1= - 0.2, h=0.2] = 0.2 𝑓(0.1, 0.9) [Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ] = 0.2 [2 0.1 0.9)2 − 0.9 = −0.1476 𝑘3 = ℎ 𝑓(𝑥0 + ℎ 2 , 𝑦0 + 𝑘2 2 ) = ℎ 𝑓(0 + 0.2 2 , 1 + −0.1476 2 ) [Since 𝑥0 = 0, 𝑦0 = 1, 𝑘2= -0.1476, h=0.2] [Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ] = 0.2 𝑓(0.1, 0.926) = 0.2 [2 0.1 0.926)2 − 0.926 = −0.1509
  • 14. 14 𝑘4 = ℎ 𝑓(𝑥0 + ℎ, 𝑦0 + 𝑘3) = ℎ 𝑓(0 + 0.2, 1 − 0.1509) [Since 𝑥0 = 0, 𝑦0 = 1, 𝑘3= - 0.1509, h=0.2] [Since 𝑓 𝑥, 𝑦 = 2𝑥𝑦2 − 𝑦 ] = ℎ 𝑓(0.2, 0.849) = 0.2 [2 0.2 0.849)2 − 0.849 = −0.1121 𝑦1 = 𝑦0 + 1 6 [𝑘1 + 2𝑘2 +2𝑘3 +𝑘4] Therefore,
  • 15. 15 Substituting the values of 𝑦0, 𝑘1, 𝑘2, 𝑘3 and 𝑘4 , we get 𝑦1 = 𝑦0 + 1 6 [𝑘1 + 2𝑘2 +2𝑘3 +𝑘4] = 1 + 1 6 [−0.2 + 2 −0.1476 + 2(−0.1509) − 0.1121] = 1 + 1 6 [−0.2 − 0.2952 − 0.3018 − 0.1121] = 0.8485 We get, 𝑥1 = 0.2, 𝑦1 = 0.8485 Taking 𝑛 = 1, 𝑦(0.4) ≈ 𝑦2 = 𝑦0 + 2 0.2 2𝑥1𝑦1 2 − 𝑦1 = 1 + 0.4 2 0.2 0.84852 − 0.8485 = 0.7758 𝑦𝑛+1 = 𝑦𝑛−1 + 2ℎ 2𝑥𝑛𝑦𝑛 2 − 𝑦𝑛
  • 16. 16 Taking 𝑛 = 2, 𝑦(0.6) ≈ 𝑦3 = 𝑦1 + 2 0.2 2𝑥2𝑦2 2 − 𝑦2 = 0.8485 + 0.4 2 0.4 0.77582 − 0.7758 = 0.6099 [Since h=0.2, 𝑥1 = 0.4, 𝑦1 = 0.7758] Outcomes  Numerically solved ODE with conditions by using Finite difference method. 𝑦𝑛+1 = 𝑦𝑛−1 + 2ℎ 2𝑥𝑛𝑦𝑛 2 − 𝑦𝑛
  • 17. 17 S.No. Questions 1 Which formula refers to central difference formula of second derivative? (a) 𝑦′ = 1 2ℎ 𝑦𝑛+1 − 𝑦𝑛−1 , (b) 𝑦′′ = 1 ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 (c) Both of them, (d) None of them 2 Which formula refers to central difference formula of first derivative? (a) 𝑦′ = 1 2ℎ 𝑦𝑛+1 − 𝑦𝑛−1 , (b) 𝑦′ = 1 ℎ2 𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1 3 Which formula refers to forward difference formula of second derivative? (a) 𝑦′′ = 1 ℎ2 𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 , (b) 𝑦′′ = 1 ℎ3 𝑦𝑛+2 − 𝑦𝑛+1 + 𝑦𝑛 , (c) Both of them 4 Which formula refers to backward difference formula of second derivative? (a) 𝑦′′ = 1 ℎ3 𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 , (b) 𝑦′′ = 1 ℎ2 𝑦𝑛 − 2𝑦𝑛−1 + 𝑦𝑛−2 , (c) None of them Multiple questions:
  • 18. 18 Try to do yourself Exercise 2: (a) Use three point central difference formula for derivative to derive a recurrence relation for the above IVP. Given that 𝑦′ = 𝑦𝑥2 + 2𝑥, where 𝑦 = −1 at 𝑥 = 0, and h=0.2. (b) Estimate the values of y at 𝑥 = 0.4 and 0.6 using this recurrence relation. Exercise 1: Consider the boundary value problem (a) Derive a recurrence relation using three points central difference approximations with ℎ = 1 3. (b) Using the above finite difference formula solve the above BVP. 𝑦′′ + 5𝑦′ + 3𝑦 = 1, 𝑦 0 = 1, 𝑦 1 = 0