SlideShare a Scribd company logo
1 of 18
Download to read offline
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Initial Value Problems
Mohammad Tawfik
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Objectives
• Understand the applications of initial-value
problems
• Be able to apply the Euler method for
solving initial value problems
• Be able to apply the Runge-Kutta method
for solving initial value problem
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example Problem
dt
dv
mmaF 
cvmgFFF UD 
cvmgvm
dt
dv
m  
m
cvmg
v

    mct
e
c
mg
tv /
1 

Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Exact Solution
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Approximate Solution
12
12
tt
vv
t
v
dt
dv






m
cvmg
tt
vv 



12
12
m
cvmg
tt
vv 1
12
12 



Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Approximate Solution
 
m
cvmg
ttvv 1
1212


Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Euler Method
• Given the differential
equation:
• We may write:
• Giving:
 tyf
dt
dy
,
 tyf
t
yy
t
y
dt
dy ttt
,





 
 tytfyy ttt ,
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
• Given the differential
equation:
• The exact solution is:
• At t=0, y=2
• Find y(4) using Euler
method with step
t=1
ye
dt
dy t
5.04 8.0

  tt
eety 5.08.0
08.108.3 

Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Solution
ye
dt
dy t
5.04 8.0
  yetyy t
tttt 5.04 8.0
 
 
  5142
5.04 0
0
01

 yeyy  
  4.115.245
5.04
8.0
1
8.0
12


e
yeyy
 
  5.254.11*5.044.11
5.04
6.1
2
2*8.0
23


e
yeyy
 
  8.565.25*5.045.25
5.04
4.2
3
3*8.0
34


e
yeyy
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Convergence!
0
10
20
30
40
50
60
70
80
0 0.5 1 1.5 2 2.5 3 3.5 4
Time
y(t)
Exact
Dt=1.0
Dt=0.5
Dt=0.1
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Runge-Kutta Methods
• The Runge-Kutta methods achieves the
Taylor series accuracy
• Many forms of the method are available;
we will use 2nd order and 3rd order
methods only
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
2nd Order Runge-Kutta method
• For the DE:
• The 2nd order R.K. solution
is:
• Where:
• Note: in the textbook there
are 3 different methods, we
are using the first!
 tyf
dt
dy
,
 21
2
kk
t
yy ttt 


 tyfk t ,1 
 tttkyfk t  ,12
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
• Given the differential
equation:
• The exact solution is:
• At t=0, y=2
• Find y(4) using 2nd
order R.K. method
with step t=1
ye
dt
dy t
5.04 8.0

  tt
eety 5.08.0
08.108.3 

Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Solution
• At t=0
32*5.04 0
1  ek
 
  4.61*325.04 108.0
2  
ek
  7.6
2
2101 

 kk
t
yy
• Repeat for all t
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Solution
yk2k1t
20
6.7010826.40216431
16.3197813.685785.5516232
37.1992530.106711.652243
83.3377766.7839625.493084
yk2k1t
20
3.8043254.21729930.5
6.3165385.9837174.0651361
9.9240688.6862255.7438951.5
15.196312.770498.3184342
22.9759418.9045812.213982.5
34.5149228.0876718.068263
51.6768141.8123226.835253.5
77.2385262.3066739.940184
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Convergence
0
10
20
30
40
50
60
70
80
90
0 0.5 1 1.5 2 2.5 3 3.5 4
Time
y(t)
Exact
Dt=1.0
Dt=0.5
Dt=0.1
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
3rd Order Runge-Kutta method
• For the DE:
• The 3rd order R.K.
solution is:
• Where:
 tyf
dt
dy
,
 321 4
6
kkk
t
yy ttt 


 tyfk t ,1 





 



2
,
2
1
2
t
t
tk
yfk t
 tttktkyfk t  ,2 213
Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Homework #4
• Solve:
• Given y(0)=1
1. Analytically
2. Using Euler method until t=2, with t=0.5
3. Repeat part 2 using 2nd order RK method
4. Repeat part 2 using 3rd order RK method
5. Repeat parts 2 through 4 using t=0.25
6. Compare results of all parts above
yyt
dt
dy
2.12


More Related Content

What's hot

12 boundary value problem
12 boundary value problem12 boundary value problem
12 boundary value problem
Mohammad Tawfik
 

What's hot (17)

Interpolation Generalized
Interpolation GeneralizedInterpolation Generalized
Interpolation Generalized
 
Numerical Integration
Numerical IntegrationNumerical Integration
Numerical Integration
 
FEM: Introduction and Weighted Residual Methods
FEM: Introduction and Weighted Residual MethodsFEM: Introduction and Weighted Residual Methods
FEM: Introduction and Weighted Residual Methods
 
Regression
RegressionRegression
Regression
 
FEM: 2-D Problems
FEM: 2-D ProblemsFEM: 2-D Problems
FEM: 2-D Problems
 
FEM: Element Equations
FEM: Element EquationsFEM: Element Equations
FEM: Element Equations
 
FEM: Stationary Functional Approach
FEM: Stationary Functional ApproachFEM: Stationary Functional Approach
FEM: Stationary Functional Approach
 
12 boundary value problem
12 boundary value problem12 boundary value problem
12 boundary value problem
 
Multiple Degree of Freedom (MDOF) Systems
Multiple Degree of Freedom (MDOF) SystemsMultiple Degree of Freedom (MDOF) Systems
Multiple Degree of Freedom (MDOF) Systems
 
Finite Element for Trusses in 2-D
Finite Element for Trusses in 2-DFinite Element for Trusses in 2-D
Finite Element for Trusses in 2-D
 
FEM: Beams
FEM: BeamsFEM: Beams
FEM: Beams
 
Vibration Absorber
Vibration AbsorberVibration Absorber
Vibration Absorber
 
FEM: Bars and Trusses
FEM: Bars and TrussesFEM: Bars and Trusses
FEM: Bars and Trusses
 
FEM: Nonlinear Beam Deflection Model (with Temperature)
FEM: Nonlinear Beam Deflection Model (with Temperature)FEM: Nonlinear Beam Deflection Model (with Temperature)
FEM: Nonlinear Beam Deflection Model (with Temperature)
 
Hidden Markov Models
Hidden Markov ModelsHidden Markov Models
Hidden Markov Models
 
Hidden markov model ppt
Hidden markov model pptHidden markov model ppt
Hidden markov model ppt
 
Probabilistic Models of Time Series and Sequences
Probabilistic Models of Time Series and SequencesProbabilistic Models of Time Series and Sequences
Probabilistic Models of Time Series and Sequences
 

Viewers also liked

Viewers also liked (15)

Future of Drones ITW'16
Future of Drones ITW'16Future of Drones ITW'16
Future of Drones ITW'16
 
Education: Why? How?
Education: Why? How?Education: Why? How?
Education: Why? How?
 
What is Optimization
What is OptimizationWhat is Optimization
What is Optimization
 
Micromechanics of Composite Materials
Micromechanics of Composite MaterialsMicromechanics of Composite Materials
Micromechanics of Composite Materials
 
Introduction to finite element method(fem)
Introduction to finite element method(fem)Introduction to finite element method(fem)
Introduction to finite element method(fem)
 
13 weightedresidual
13 weightedresidual13 weightedresidual
13 weightedresidual
 
07 interpolationnewton
07 interpolationnewton07 interpolationnewton
07 interpolationnewton
 
Vibration Damping: Lecture Notes - UMD Spring 2001
Vibration Damping: Lecture Notes - UMD Spring 2001Vibration Damping: Lecture Notes - UMD Spring 2001
Vibration Damping: Lecture Notes - UMD Spring 2001
 
Trusses!
Trusses!Trusses!
Trusses!
 
Finite Element Analysis of the Aeroelasticity Plates Under Thermal and Aerody...
Finite Element Analysis of the Aeroelasticity Plates Under Thermal and Aerody...Finite Element Analysis of the Aeroelasticity Plates Under Thermal and Aerody...
Finite Element Analysis of the Aeroelasticity Plates Under Thermal and Aerody...
 
Airfoils and Wings: Airfoils
Airfoils and Wings: AirfoilsAirfoils and Wings: Airfoils
Airfoils and Wings: Airfoils
 
Definition of Basic Quantities
Definition of Basic QuantitiesDefinition of Basic Quantities
Definition of Basic Quantities
 
Finite Element Analysis of the Beams Under Thermal Loading
Finite Element Analysis of the Beams Under Thermal LoadingFinite Element Analysis of the Beams Under Thermal Loading
Finite Element Analysis of the Beams Under Thermal Loading
 
Piezo book
Piezo bookPiezo book
Piezo book
 
Viscoelastic Damping: Lecture Notes 140202
Viscoelastic Damping: Lecture Notes 140202Viscoelastic Damping: Lecture Notes 140202
Viscoelastic Damping: Lecture Notes 140202
 

More from Mohammad Tawfik

More from Mohammad Tawfik (18)

Supply Chain Management for Engineers - INDE073
Supply Chain Management for Engineers - INDE073Supply Chain Management for Engineers - INDE073
Supply Chain Management for Engineers - INDE073
 
Supply Chain Management 01 - Introduction
Supply Chain Management 01 - IntroductionSupply Chain Management 01 - Introduction
Supply Chain Management 01 - Introduction
 
Supply Chain Management 02 - Logistics
Supply Chain Management 02 - LogisticsSupply Chain Management 02 - Logistics
Supply Chain Management 02 - Logistics
 
Supply Chain Management 03 - Inventory Management
Supply Chain Management 03 - Inventory ManagementSupply Chain Management 03 - Inventory Management
Supply Chain Management 03 - Inventory Management
 
Creative problem solving and decision making
Creative problem solving and decision makingCreative problem solving and decision making
Creative problem solving and decision making
 
Digital content for teaching introduction
Digital content for teaching introductionDigital content for teaching introduction
Digital content for teaching introduction
 
Crisis Management Basics
Crisis Management BasicsCrisis Management Basics
Crisis Management Basics
 
DISC Personality Model
DISC Personality ModelDISC Personality Model
DISC Personality Model
 
Training of Trainers
Training of TrainersTraining of Trainers
Training of Trainers
 
Effective Delegation Skills
Effective Delegation SkillsEffective Delegation Skills
Effective Delegation Skills
 
Train The Trainer
Train The TrainerTrain The Trainer
Train The Trainer
 
Business Management - Marketing
Business Management - MarketingBusiness Management - Marketing
Business Management - Marketing
 
Stress Management
Stress ManagementStress Management
Stress Management
 
Project Management (CAPM) - Integration
Project Management (CAPM) - IntegrationProject Management (CAPM) - Integration
Project Management (CAPM) - Integration
 
Project Management (CAPM) - The Framework
Project Management (CAPM) - The FrameworkProject Management (CAPM) - The Framework
Project Management (CAPM) - The Framework
 
Project Management (CAPM) - Introduction
Project Management (CAPM) - IntroductionProject Management (CAPM) - Introduction
Project Management (CAPM) - Introduction
 
The Creative Individual
The Creative IndividualThe Creative Individual
The Creative Individual
 
Introduction to Wind Energy
Introduction to Wind EnergyIntroduction to Wind Energy
Introduction to Wind Energy
 

Initial valueproblems

  • 1. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Initial Value Problems Mohammad Tawfik
  • 2. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Objectives • Understand the applications of initial-value problems • Be able to apply the Euler method for solving initial value problems • Be able to apply the Runge-Kutta method for solving initial value problem
  • 3. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example Problem dt dv mmaF  cvmgFFF UD  cvmgvm dt dv m   m cvmg v      mct e c mg tv / 1  
  • 4. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Exact Solution
  • 5. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Approximate Solution 12 12 tt vv t v dt dv       m cvmg tt vv     12 12 m cvmg tt vv 1 12 12    
  • 6. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Approximate Solution   m cvmg ttvv 1 1212  
  • 7. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Euler Method • Given the differential equation: • We may write: • Giving:  tyf dt dy ,  tyf t yy t y dt dy ttt ,         tytfyy ttt ,
  • 8. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example • Given the differential equation: • The exact solution is: • At t=0, y=2 • Find y(4) using Euler method with step t=1 ye dt dy t 5.04 8.0    tt eety 5.08.0 08.108.3  
  • 9. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Solution ye dt dy t 5.04 8.0   yetyy t tttt 5.04 8.0       5142 5.04 0 0 01   yeyy     4.115.245 5.04 8.0 1 8.0 12   e yeyy     5.254.11*5.044.11 5.04 6.1 2 2*8.0 23   e yeyy     8.565.25*5.045.25 5.04 4.2 3 3*8.0 34   e yeyy
  • 10. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Convergence! 0 10 20 30 40 50 60 70 80 0 0.5 1 1.5 2 2.5 3 3.5 4 Time y(t) Exact Dt=1.0 Dt=0.5 Dt=0.1
  • 11. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Runge-Kutta Methods • The Runge-Kutta methods achieves the Taylor series accuracy • Many forms of the method are available; we will use 2nd order and 3rd order methods only
  • 12. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 2nd Order Runge-Kutta method • For the DE: • The 2nd order R.K. solution is: • Where: • Note: in the textbook there are 3 different methods, we are using the first!  tyf dt dy ,  21 2 kk t yy ttt     tyfk t ,1   tttkyfk t  ,12
  • 13. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Example • Given the differential equation: • The exact solution is: • At t=0, y=2 • Find y(4) using 2nd order R.K. method with step t=1 ye dt dy t 5.04 8.0    tt eety 5.08.0 08.108.3  
  • 14. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Solution • At t=0 32*5.04 0 1  ek     4.61*325.04 108.0 2   ek   7.6 2 2101    kk t yy • Repeat for all t
  • 15. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Solution yk2k1t 20 6.7010826.40216431 16.3197813.685785.5516232 37.1992530.106711.652243 83.3377766.7839625.493084 yk2k1t 20 3.8043254.21729930.5 6.3165385.9837174.0651361 9.9240688.6862255.7438951.5 15.196312.770498.3184342 22.9759418.9045812.213982.5 34.5149228.0876718.068263 51.6768141.8123226.835253.5 77.2385262.3066739.940184
  • 16. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Convergence 0 10 20 30 40 50 60 70 80 90 0 0.5 1 1.5 2 2.5 3 3.5 4 Time y(t) Exact Dt=1.0 Dt=0.5 Dt=0.1
  • 17. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com 3rd Order Runge-Kutta method • For the DE: • The 3rd order R.K. solution is: • Where:  tyf dt dy ,  321 4 6 kkk t yy ttt     tyfk t ,1            2 , 2 1 2 t t tk yfk t  tttktkyfk t  ,2 213
  • 18. Initial Value Problems Mohammad Tawfik #WikiCourses http://WikiCourses.WikiSpaces.com Homework #4 • Solve: • Given y(0)=1 1. Analytically 2. Using Euler method until t=2, with t=0.5 3. Repeat part 2 using 2nd order RK method 4. Repeat part 2 using 3rd order RK method 5. Repeat parts 2 through 4 using t=0.25 6. Compare results of all parts above yyt dt dy 2.12 