SlideShare a Scribd company logo
Differential equation &
LAPLACE TRANSFORmation
with MATLAB
RAVI JINDAL
Joint Masters, SEGE (M1) Second semester
B.K. Birla institute of Engineering & Technology, Pilani
Differential Equations with
MATLAB
 MATLAB has some powerful features for
solving differential equations of all types. We
will explore some of these features for the
Constant Coefficient Linear Ordinary
Differential Equation forms.
 The approach here will be that of the Symbolic
Math Toolbox. The result will be the form of
the function and it may be readily plotted with
MATLAB.
Symbolic Differential Equation
Terms
2
2
n
n
y
dy
dt
d y
dt
d y
dt
y
Dy
D2y
Dny
Finding Solutions to Differential
Equations
 Solving a First Order Differential Equation
 Solving a Second Order Differential
Equation
 Solving Simultaneous Differential
Equations
 Solving Nonlinear Differential Equations
 Numerical Solution of a Differential
Equation
Solving a 1st Order DE
 Consider the differential
equation:
122 =+ y
dt
dy
The general solution is given by:
The Matlab command used to solve differential
equations is dsolve .
Verify the solution using dsolve command
Solving a Differential
Equation in Matlab
C1 is a constant which is specified by way of the
initial condition
Dy means dy/dt and D2y means d2y/dt2 etc
» syms y t
» ys=dsolve('Dy+2*y=12')
ys =6+exp(-2*t)*C1
Verify Results
 Verify results given y(0) = 9
» ys=dsolve('Dy+2*y=12','y(0)=9')
ys =
6+3*exp(-2*t)
39)0( 1 =→= Cy
Solving a 2nd Order DE
8
 Find the general solution of:
02
2
2
=+ yc
dt
yd
)cos()sin()( 21 ctCctCty +=
» syms c y
» ys=dsolve('D2y = - c^2*y')
ys = C1*sin(c*t)+C2*cos (c*t)
9
 Solve the following set of differential equations:
Solving Simultaneous
Differential Equations Example
yx
dt
dx
43 += yx
dt
dy
34 +−=
Syntax for solving simultaneous differential equations is:
dsolve('equ1', 'equ2',…)
 The general solution is given by:
General Solution
)4sin()4cos()( 3
2
3
1 tectectx tt
+=
)4cos()4sin()( 3
2
3
1 tectecty tt
+−=
yx
dt
dx
43 += yx
dt
dy
34 +−=
Given the equations:
Matlab Verification
» syms x y t
» [x,y]=dsolve('Dx=3*x+4*y','Dy=-4*x+3*y')
x = exp(3*t)*(cos(4*t)*C1+sin(4*t)*C2)
y = -exp(3*t)*(sin(4*t)*C1-cos(4*t)*C2)
yx
dt
dx
43 += yx
dt
dy
34 +−=
Given the
equations:
 General
solution is:
)4sin()4cos()( 3
2
3
1 tectectx tt
+=
)4cos()4sin()( 3
2
3
1 tectecty tt
+−=
 Solve the previous system with the initial conditions:
Initial Conditions
0)0( =x 1)0( =y
» [x,y]=dsolve('Dx=3*x+4*y','Dy=-4*x+3*y',
'y(0)=1','x(0)=0')
x = exp(3*t)*sin(4*t)
y = exp(3*t)*cos(4*t) )4cos(
)4sin(
3
3
tey
tex
t
t
=
=
Non-Linear Differential Equation Example
 Solve the differential equation: 2
4 y
dt
dy
−=
Subject to initial condition:
1)0( =y
» syms y t
» y=dsolve('Dy=4-y^2','y(0)=1')
» y=simplify(y)
y =
2*(3*exp(4*t)-1)/(1+3*exp(4*t))
( )
t
t
e
e
ty 4
4
31
132
)(
+
−
=
 If another independent variable, other than t, is used, it must
be introduced in the dsolve command
Specifying the Independent Parameter of a
Differential Equation
122 =+ y
dx
dy
» y=dsolve('Dy+2*y=12','x')
y = 6+exp(-2*x)*C1
Solve the differential equation:
x
eCxy 2
16)( −
+=
Numerical Solution Example
 Not all non-linear differential equations have a closed
form solution, but a numerical solution can be found
Solve the differential equation:
Subject to initial conditions:
0)sin(92
2
=+ y
dt
yd
1)0( =y
0)0( =
•
y
16
Rewrite Differential Equation
yx =1
••
== 12 xyx
)sin(9
)sin(9
12
2
xx
yyx
−=
−==
•
•••
0)sin(92
2
=+ y
dt
yd
1)0()0(1 == yx
0)0()0(2 ==
•
yx
Rewrite in the
following form
)sin(92
2
yy
dt
yd
−==
••
17
Solve DE with MATLAB.
>> y = dsolve ('D2y + 3*Dy + 2*y = 24',
'y(0)=10', 'Dy(0)=0')
y = 12+2*exp(-2*t)-4*exp(-t)
>> ezplot(y, [0 6])
2
2
3 2 24
d y dy
y
dt dt
+ + =
(0) 10y = '(0) 0y =
Definition of Laplace
Transformation:
Let f(t) be a given function defined for all t ≥ 0 ,
then the Laplace Transformation of f(t)
is defined as
Here,
L = Laplace Transform Operator.
f(t) =determining function, depends on t .
F(s)= Generating function, depends on s .
Differential
equations
Input
excitation e(t)
Output
response r(t)
Time Domain Frequency Domain
Algebraic
equations
Input
excitation E(s)
Output
response R(s)
Laplace Transform
Inverse Laplace Transform
The Laplace Transformation
Laplace Transforms with MATLAB
Calculating the Laplace F(s) transform of a function f(t) is
quite simple in Matlab . First you need to specify that the
variable t and s are symbolic ones. This is done with the
command
>> syms t s
The actual command to calculate the transform is
>> F = Laplace (f , t , s)
example for the function f(t)
>> syms t s
>> f=-1.25+3.5*t*exp(-2*t)+1.25*exp(-2*t);
>> F = laplace ( f , t , s)
F = -5/4/s+7/2/(s+2)^2+5/4/(s+2)
>> simplify(F)
ans = (s-5)/s/(s+2)^2
>> pretty (ans)
Inverse Laplace Transform
The command one uses now is ilaplace .
>> syms t s
>> F=(s-5)/(s*(s+2)^2);
>> ilaplace(F)
ans = -5/4+(7/2*t+5/4)*exp(-2*t)
>> simplify(ans)
ans = -5/4+7/2*t*exp(-2*t)+5/4*exp(-2*t)
>> pretty(ans)
- 5/4 + 7/2 t exp(-2 t) + 5/4 exp(-2 t)
Reference
 http://www.mathworks.in/help/symbolic/simpli
 https://www.google.co.in/#q=laplace+transform+
Thank You 

More Related Content

What's hot

Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculus
sheetslibrary
 
Differential equations
Differential equationsDifferential equations
Differential equations
Uzair Saiyed
 
Partial differential equation & its application.
Partial differential equation & its application.Partial differential equation & its application.
Partial differential equation & its application.
isratzerin6
 
partial diffrentialequations
partial diffrentialequationspartial diffrentialequations
partial diffrentialequations8laddu8
 
Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...
Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...
Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...
jani parth
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
Karnav Rana
 
The wave equation
The wave equationThe wave equation
The wave equation
Dhaval Jalalpara
 
Laplace transform and its applications
Laplace transform and its applicationsLaplace transform and its applications
Laplace transform and its applications
Nisarg Shah
 
Application of fourier series
Application of fourier seriesApplication of fourier series
Application of fourier seriesGirish Dhareshwar
 
VECTOR CALCULUS
VECTOR CALCULUSVECTOR CALCULUS
VECTOR CALCULUS
MANJULAKAMALANATHAN
 
euler's theorem
euler's theoremeuler's theorem
euler's theorem
mihir jain
 
state space representation,State Space Model Controllability and Observabilit...
state space representation,State Space Model Controllability and Observabilit...state space representation,State Space Model Controllability and Observabilit...
state space representation,State Space Model Controllability and Observabilit...
Waqas Afzal
 
11.Problems On Transformer On Load.PPT
11.Problems On Transformer On Load.PPT11.Problems On Transformer On Load.PPT
11.Problems On Transformer On Load.PPT
SBABAFAKRUDDIN1
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrixitutor
 
Applications of differential equation
Applications of differential equationApplications of differential equation
Applications of differential equation
DeekshaSrivas
 
Lesson 7: Vector-valued functions
Lesson 7: Vector-valued functionsLesson 7: Vector-valued functions
Lesson 7: Vector-valued functions
Matthew Leingang
 

What's hot (20)

Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculus
 
Differential equations
Differential equationsDifferential equations
Differential equations
 
Partial differential equation & its application.
Partial differential equation & its application.Partial differential equation & its application.
Partial differential equation & its application.
 
partial diffrentialequations
partial diffrentialequationspartial diffrentialequations
partial diffrentialequations
 
Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...
Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...
Ordinary Differential Equations And Their Application: Modeling: Free Oscilla...
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Double Integrals
Double IntegralsDouble Integrals
Double Integrals
 
The wave equation
The wave equationThe wave equation
The wave equation
 
Laplace transform and its applications
Laplace transform and its applicationsLaplace transform and its applications
Laplace transform and its applications
 
Application of fourier series
Application of fourier seriesApplication of fourier series
Application of fourier series
 
Laplace transform
Laplace transformLaplace transform
Laplace transform
 
VECTOR CALCULUS
VECTOR CALCULUSVECTOR CALCULUS
VECTOR CALCULUS
 
euler's theorem
euler's theoremeuler's theorem
euler's theorem
 
state space representation,State Space Model Controllability and Observabilit...
state space representation,State Space Model Controllability and Observabilit...state space representation,State Space Model Controllability and Observabilit...
state space representation,State Space Model Controllability and Observabilit...
 
Markov process
Markov processMarkov process
Markov process
 
11.Problems On Transformer On Load.PPT
11.Problems On Transformer On Load.PPT11.Problems On Transformer On Load.PPT
11.Problems On Transformer On Load.PPT
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
 
Applications of differential equation
Applications of differential equationApplications of differential equation
Applications of differential equation
 
Lesson 7: Vector-valued functions
Lesson 7: Vector-valued functionsLesson 7: Vector-valued functions
Lesson 7: Vector-valued functions
 

Viewers also liked

Using Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential EquationsUsing Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential EquationsGeorge Stevens
 
FDM Numerical solution of Laplace Equation using MATLAB
FDM Numerical solution of Laplace Equation using MATLABFDM Numerical solution of Laplace Equation using MATLAB
FDM Numerical solution of Laplace Equation using MATLAB
Aya Zaki
 
Admission in India 2014
Admission in India 2014Admission in India 2014
Admission in India 2014
Edhole.com
 
Laplace
LaplaceLaplace
Wave behaviour
Wave behaviourWave behaviour
Wave behaviourreastment
 
Ordinary Differential Equation
Ordinary Differential EquationOrdinary Differential Equation
Ordinary Differential Equation
nur fara
 
Wave pitch feedback
Wave pitch feedbackWave pitch feedback
Wave pitch feedback
Caitlin Meredith
 
Delay-Differential Equations. Tools for Epidemics Modelling
Delay-Differential Equations. Tools for Epidemics ModellingDelay-Differential Equations. Tools for Epidemics Modelling
Delay-Differential Equations. Tools for Epidemics ModellingIgnasi Gros
 
Linear differential equation
Linear differential equationLinear differential equation
Linear differential equationPratik Sudra
 
Conditional Control in MATLAB Scripts
Conditional Control in MATLAB ScriptsConditional Control in MATLAB Scripts
Conditional Control in MATLAB Scripts
Shameer Ahmed Koya
 
Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)
anil7nayak
 
Indeterminate Forms and L' Hospital Rule
Indeterminate Forms and L' Hospital RuleIndeterminate Forms and L' Hospital Rule
Indeterminate Forms and L' Hospital Rule
Aakash Singh
 
DIFFRENTIAL EQUATIONS
DIFFRENTIAL EQUATIONSDIFFRENTIAL EQUATIONS
DIFFRENTIAL EQUATIONS
Aafaq Malik
 
Orthogonal trajectories
Orthogonal trajectoriesOrthogonal trajectories
Orthogonal trajectories
Bilal Amjad
 
Matlab
MatlabMatlab
Giai phuong trinh vi phan bang bien doi laplace
Giai phuong trinh vi phan bang bien doi laplaceGiai phuong trinh vi phan bang bien doi laplace
Giai phuong trinh vi phan bang bien doi laplace
Kiếm Hùng
 
Laplace transform and its application
Laplace transform and its applicationLaplace transform and its application
Laplace transform and its application
mayur1347
 

Viewers also liked (20)

Using Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential EquationsUsing Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential Equations
 
FDM Numerical solution of Laplace Equation using MATLAB
FDM Numerical solution of Laplace Equation using MATLABFDM Numerical solution of Laplace Equation using MATLAB
FDM Numerical solution of Laplace Equation using MATLAB
 
Differential equations
Differential equationsDifferential equations
Differential equations
 
Admission in India 2014
Admission in India 2014Admission in India 2014
Admission in India 2014
 
Laplace
LaplaceLaplace
Laplace
 
Wave behaviour
Wave behaviourWave behaviour
Wave behaviour
 
Ch01 1
Ch01 1Ch01 1
Ch01 1
 
Ordinary Differential Equation
Ordinary Differential EquationOrdinary Differential Equation
Ordinary Differential Equation
 
Wave pitch feedback
Wave pitch feedbackWave pitch feedback
Wave pitch feedback
 
How Waves Behave
How Waves BehaveHow Waves Behave
How Waves Behave
 
Delay-Differential Equations. Tools for Epidemics Modelling
Delay-Differential Equations. Tools for Epidemics ModellingDelay-Differential Equations. Tools for Epidemics Modelling
Delay-Differential Equations. Tools for Epidemics Modelling
 
Linear differential equation
Linear differential equationLinear differential equation
Linear differential equation
 
Conditional Control in MATLAB Scripts
Conditional Control in MATLAB ScriptsConditional Control in MATLAB Scripts
Conditional Control in MATLAB Scripts
 
Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)
 
Indeterminate Forms and L' Hospital Rule
Indeterminate Forms and L' Hospital RuleIndeterminate Forms and L' Hospital Rule
Indeterminate Forms and L' Hospital Rule
 
DIFFRENTIAL EQUATIONS
DIFFRENTIAL EQUATIONSDIFFRENTIAL EQUATIONS
DIFFRENTIAL EQUATIONS
 
Orthogonal trajectories
Orthogonal trajectoriesOrthogonal trajectories
Orthogonal trajectories
 
Matlab
MatlabMatlab
Matlab
 
Giai phuong trinh vi phan bang bien doi laplace
Giai phuong trinh vi phan bang bien doi laplaceGiai phuong trinh vi phan bang bien doi laplace
Giai phuong trinh vi phan bang bien doi laplace
 
Laplace transform and its application
Laplace transform and its applicationLaplace transform and its application
Laplace transform and its application
 

Similar to Differential equation & laplace transformation with matlab

Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
Awais Chaudhary
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
Chit Laplana
 
21 3 ztransform
21 3 ztransform21 3 ztransform
21 3 ztransform
Mahyar Alzobaidy
 
19 4
19 419 4
19 4
Mayar Zo
 
phuong trinh vi phan d geometry part 2
phuong trinh vi phan d geometry part 2phuong trinh vi phan d geometry part 2
phuong trinh vi phan d geometry part 2
Bui Loi
 
Top ranking colleges in india
Top ranking colleges in indiaTop ranking colleges in india
Top ranking colleges in india
Edhole.com
 
Den5200 ps1
Den5200 ps1Den5200 ps1
Den5200 ps1jogerpow
 
Week 8 [compatibility mode]
Week 8 [compatibility mode]Week 8 [compatibility mode]
Week 8 [compatibility mode]
Hazrul156
 
On Laplace Transform.ppt
On Laplace Transform.pptOn Laplace Transform.ppt
On Laplace Transform.ppt
AwaisAsghar31
 
Chapter 9(laplace transform)
Chapter 9(laplace transform)Chapter 9(laplace transform)
Chapter 9(laplace transform)
Eko Wijayanto
 
digital control Chapter 2 slide
digital control Chapter 2 slidedigital control Chapter 2 slide
digital control Chapter 2 slide
asyrafjpk
 
free Video lecture
free Video lecture free Video lecture
free Video lecture
Edhole.com
 
21 1 ztransform
21 1 ztransform21 1 ztransform
21 1 ztransform
Mahyar Alzobaidy
 
differentiol equation.pptx
differentiol equation.pptxdifferentiol equation.pptx
differentiol equation.pptx
PlanningHCEGC
 
IPC - Lectures 16-18 (Laplace Transform).pdf
IPC - Lectures 16-18 (Laplace Transform).pdfIPC - Lectures 16-18 (Laplace Transform).pdf
IPC - Lectures 16-18 (Laplace Transform).pdf
burhannaveed69
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
wilmersaguamamani
 
Laplace
LaplaceLaplace
Laplace problems
Laplace problemsLaplace problems
Laplace problems
Arianne Banglos
 
Advanced Engineering Mathematics Solutions Manual.pdf
Advanced Engineering Mathematics Solutions Manual.pdfAdvanced Engineering Mathematics Solutions Manual.pdf
Advanced Engineering Mathematics Solutions Manual.pdf
Whitney Anderson
 

Similar to Differential equation & laplace transformation with matlab (20)

Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
 
21 3 ztransform
21 3 ztransform21 3 ztransform
21 3 ztransform
 
19 4
19 419 4
19 4
 
phuong trinh vi phan d geometry part 2
phuong trinh vi phan d geometry part 2phuong trinh vi phan d geometry part 2
phuong trinh vi phan d geometry part 2
 
Top ranking colleges in india
Top ranking colleges in indiaTop ranking colleges in india
Top ranking colleges in india
 
Den5200 ps1
Den5200 ps1Den5200 ps1
Den5200 ps1
 
Assignment6
Assignment6Assignment6
Assignment6
 
Week 8 [compatibility mode]
Week 8 [compatibility mode]Week 8 [compatibility mode]
Week 8 [compatibility mode]
 
On Laplace Transform.ppt
On Laplace Transform.pptOn Laplace Transform.ppt
On Laplace Transform.ppt
 
Chapter 9(laplace transform)
Chapter 9(laplace transform)Chapter 9(laplace transform)
Chapter 9(laplace transform)
 
digital control Chapter 2 slide
digital control Chapter 2 slidedigital control Chapter 2 slide
digital control Chapter 2 slide
 
free Video lecture
free Video lecture free Video lecture
free Video lecture
 
21 1 ztransform
21 1 ztransform21 1 ztransform
21 1 ztransform
 
differentiol equation.pptx
differentiol equation.pptxdifferentiol equation.pptx
differentiol equation.pptx
 
IPC - Lectures 16-18 (Laplace Transform).pdf
IPC - Lectures 16-18 (Laplace Transform).pdfIPC - Lectures 16-18 (Laplace Transform).pdf
IPC - Lectures 16-18 (Laplace Transform).pdf
 
Laplace transforms
Laplace transformsLaplace transforms
Laplace transforms
 
Laplace
LaplaceLaplace
Laplace
 
Laplace problems
Laplace problemsLaplace problems
Laplace problems
 
Advanced Engineering Mathematics Solutions Manual.pdf
Advanced Engineering Mathematics Solutions Manual.pdfAdvanced Engineering Mathematics Solutions Manual.pdf
Advanced Engineering Mathematics Solutions Manual.pdf
 

Recently uploaded

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 

Recently uploaded (20)

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 

Differential equation & laplace transformation with matlab

  • 1. Differential equation & LAPLACE TRANSFORmation with MATLAB RAVI JINDAL Joint Masters, SEGE (M1) Second semester B.K. Birla institute of Engineering & Technology, Pilani
  • 2. Differential Equations with MATLAB  MATLAB has some powerful features for solving differential equations of all types. We will explore some of these features for the Constant Coefficient Linear Ordinary Differential Equation forms.  The approach here will be that of the Symbolic Math Toolbox. The result will be the form of the function and it may be readily plotted with MATLAB.
  • 4. Finding Solutions to Differential Equations  Solving a First Order Differential Equation  Solving a Second Order Differential Equation  Solving Simultaneous Differential Equations  Solving Nonlinear Differential Equations  Numerical Solution of a Differential Equation
  • 5. Solving a 1st Order DE  Consider the differential equation: 122 =+ y dt dy The general solution is given by: The Matlab command used to solve differential equations is dsolve . Verify the solution using dsolve command
  • 6. Solving a Differential Equation in Matlab C1 is a constant which is specified by way of the initial condition Dy means dy/dt and D2y means d2y/dt2 etc » syms y t » ys=dsolve('Dy+2*y=12') ys =6+exp(-2*t)*C1
  • 7. Verify Results  Verify results given y(0) = 9 » ys=dsolve('Dy+2*y=12','y(0)=9') ys = 6+3*exp(-2*t) 39)0( 1 =→= Cy
  • 8. Solving a 2nd Order DE 8  Find the general solution of: 02 2 2 =+ yc dt yd )cos()sin()( 21 ctCctCty += » syms c y » ys=dsolve('D2y = - c^2*y') ys = C1*sin(c*t)+C2*cos (c*t)
  • 9. 9  Solve the following set of differential equations: Solving Simultaneous Differential Equations Example yx dt dx 43 += yx dt dy 34 +−= Syntax for solving simultaneous differential equations is: dsolve('equ1', 'equ2',…)
  • 10.  The general solution is given by: General Solution )4sin()4cos()( 3 2 3 1 tectectx tt += )4cos()4sin()( 3 2 3 1 tectecty tt +−= yx dt dx 43 += yx dt dy 34 +−= Given the equations:
  • 11. Matlab Verification » syms x y t » [x,y]=dsolve('Dx=3*x+4*y','Dy=-4*x+3*y') x = exp(3*t)*(cos(4*t)*C1+sin(4*t)*C2) y = -exp(3*t)*(sin(4*t)*C1-cos(4*t)*C2) yx dt dx 43 += yx dt dy 34 +−= Given the equations:  General solution is: )4sin()4cos()( 3 2 3 1 tectectx tt += )4cos()4sin()( 3 2 3 1 tectecty tt +−=
  • 12.  Solve the previous system with the initial conditions: Initial Conditions 0)0( =x 1)0( =y » [x,y]=dsolve('Dx=3*x+4*y','Dy=-4*x+3*y', 'y(0)=1','x(0)=0') x = exp(3*t)*sin(4*t) y = exp(3*t)*cos(4*t) )4cos( )4sin( 3 3 tey tex t t = =
  • 13. Non-Linear Differential Equation Example  Solve the differential equation: 2 4 y dt dy −= Subject to initial condition: 1)0( =y » syms y t » y=dsolve('Dy=4-y^2','y(0)=1') » y=simplify(y) y = 2*(3*exp(4*t)-1)/(1+3*exp(4*t)) ( ) t t e e ty 4 4 31 132 )( + − =
  • 14.  If another independent variable, other than t, is used, it must be introduced in the dsolve command Specifying the Independent Parameter of a Differential Equation 122 =+ y dx dy » y=dsolve('Dy+2*y=12','x') y = 6+exp(-2*x)*C1 Solve the differential equation: x eCxy 2 16)( − +=
  • 15. Numerical Solution Example  Not all non-linear differential equations have a closed form solution, but a numerical solution can be found Solve the differential equation: Subject to initial conditions: 0)sin(92 2 =+ y dt yd 1)0( =y 0)0( = • y
  • 16. 16 Rewrite Differential Equation yx =1 •• == 12 xyx )sin(9 )sin(9 12 2 xx yyx −= −== • ••• 0)sin(92 2 =+ y dt yd 1)0()0(1 == yx 0)0()0(2 == • yx Rewrite in the following form )sin(92 2 yy dt yd −== ••
  • 17. 17 Solve DE with MATLAB. >> y = dsolve ('D2y + 3*Dy + 2*y = 24', 'y(0)=10', 'Dy(0)=0') y = 12+2*exp(-2*t)-4*exp(-t) >> ezplot(y, [0 6]) 2 2 3 2 24 d y dy y dt dt + + = (0) 10y = '(0) 0y =
  • 18.
  • 19. Definition of Laplace Transformation: Let f(t) be a given function defined for all t ≥ 0 , then the Laplace Transformation of f(t) is defined as Here, L = Laplace Transform Operator. f(t) =determining function, depends on t . F(s)= Generating function, depends on s .
  • 20. Differential equations Input excitation e(t) Output response r(t) Time Domain Frequency Domain Algebraic equations Input excitation E(s) Output response R(s) Laplace Transform Inverse Laplace Transform The Laplace Transformation
  • 21. Laplace Transforms with MATLAB Calculating the Laplace F(s) transform of a function f(t) is quite simple in Matlab . First you need to specify that the variable t and s are symbolic ones. This is done with the command >> syms t s The actual command to calculate the transform is >> F = Laplace (f , t , s)
  • 22. example for the function f(t) >> syms t s >> f=-1.25+3.5*t*exp(-2*t)+1.25*exp(-2*t); >> F = laplace ( f , t , s) F = -5/4/s+7/2/(s+2)^2+5/4/(s+2) >> simplify(F) ans = (s-5)/s/(s+2)^2 >> pretty (ans)
  • 23. Inverse Laplace Transform The command one uses now is ilaplace . >> syms t s >> F=(s-5)/(s*(s+2)^2); >> ilaplace(F) ans = -5/4+(7/2*t+5/4)*exp(-2*t) >> simplify(ans) ans = -5/4+7/2*t*exp(-2*t)+5/4*exp(-2*t) >> pretty(ans) - 5/4 + 7/2 t exp(-2 t) + 5/4 exp(-2 t)

Editor's Notes

  1. <number>