+++unit 2 - Analytical Solution Techniques For ODEs
+++unit 2 - Analytical Solution Techniques For ODEs
3
Basic definitions of DEs:
◼ Order
◼ Linearity
◼ Initial conditions
◼ Solution
Classify DEs based on:
◼ Order, linearity, and conditions.
Classify the solution methods.
4
Derivatives
Derivatives
Partial Derivatives
Ordinary Derivatives
dv u
dt y
u is a function of
v is a function of one
more than one
independent variable
independent variable
5
Differential Equations
Differential
Equations
+ 6tv = 1 − 2 =0
dt 2 y x
2
involve one or more involve one or more
Ordinary derivatives of partial derivatives of
unknown functions unknown functions
6
Ordinary Differential Equations
Ordinary Differential Equations (ODEs) involve one or
more ordinary derivatives of unknown functions with
respect to one independent variable
Examples :
dv(t )
− v(t ) = et x(t): unknown function
dt
d 2 x(t ) dx(t )
2
−5 + 2 x(t ) = cos(t )
dt dt
t: independent variable
7
Example of ODE:
Model of Falling Parachutist
The velocity of a falling
parachutist is given by:
dv c
= 9.8 − v
dt M
M : mass
c : drag coefficient
v : velocity
8
Definitions
Ordinary
differential
equation
dv c
= 9. 8 − v
dt M
9
Definitions (Cont.)
dv c
= 9.8 − v (Dependent
dt M variable)
unknown
function to be
determined
10
Definitions (Cont.)
dv c
= 9.8 − v
dt M
(independent variable)
the variable with respect to which
other variables are differentiated
11
12
Classification of ODEs
ODEs can be classified in different ways:
Order
◼ First order ODE
◼ Second order ODE
◼ Nth order ODE
Linearity
◼ Linear ODE
◼ Nonlinear ODE
Auxiliary conditions
◼ Initial value problems
◼ Boundary value problems
13
Order of a Differential Equation
The order of an ordinary differential equation is the order
of the highest order derivative.
Examples :
dx(t )
− x(t ) = et First order ODE
dt
d 2 x(t ) dx(t )
2
−5 + 2 x(t ) = cos(t ) Second order ODE
dt dt
3
d x(t )
2
dx(t )
2
− + 2 x 4 (t ) = 1 Second order ODE
dt dt
14
Linear ODE
An ODE is linear if
The unknown function and its derivatives appear to power one
No product of the unknown function and/or its derivatives
Examples :
dx(t )
− x(t ) = et
dt Linear ODE
d 2 x(t ) dx(t )
2
− 5 + 2t 2
x(t ) = cos(t ) Linear ODE
dt dt
3
d 2 x(t ) dx(t )
2
− + x(t ) = 1 Non-linear ODE
dt dt
15
Nonlinear ODE
An ODE is linear if
The unknown function and its derivatives appear to power one
No product of the unknown function and/or its derivatives
Independent Dependent
Equation Variable Variable Order Linearity
𝑑𝑦 2
( ) +2 = 0
𝑑𝑥
𝑑 2 𝑦 𝑑𝑦
2
+ = 𝑒𝑥
𝑑𝑥 𝑑𝑥
𝑧 (𝑖𝑣) + 𝑧" = −y
𝑦 ′ + 𝑎𝑦 = 𝑏𝑡
𝑓" + 𝑓′ + 𝑔(𝑡)𝑓 = ℎ(𝑡)
17
Solution of a Differential Equation
A solution to a differential equation is a function that
satisfies the equation.
Example : −t
Solution x(t ) = e
dx(t )
+ x(t ) = 0 Proof :
dt
dx(t )
= −e −t
dt
dx(t ) −t −t
+ x(t ) = −e + e = 0
dt
18
Solutions of Ordinary Differential Equations
General Solution: Solutions obtained from integrating the
differential equations are called general solutions. The general
solution of a order ordinary differential equation contains
arbitrary constants resulting from integrating times.
19
:
20
Solutions of Ordinary Differential Equations
Explicit Solution: Any solution that is given in the form
y = y (independent variable).
Examples: 𝐴 𝑟 = 𝜋𝑟 2 + 𝑐, 𝑦 𝑡 = 𝑒 −𝑡 + 𝑐 etc.
21
Solutions of Ordinary Differential Equations
x(t ) = cos( 2t )
is a solution to the ODE
d 2 x(t )
2
+ 4 x(t ) = 0
dt
Is it unique?
All functions of the form x(t ) = cos( 2t + c)
(where c is a real constant) are solutions.
22
Exercise:
Check whether the given expression a solution of the corresponding equation?
23
Uniqueness of a Solution
In order to uniquely specify a solution to an nth
order differential equation we need n conditions.
d 2 x (t )
+ 4 x ( t ) = 0 Second order ODE
dt 2
x (0) = a Two conditions are
x (0) = b needed to uniquely
specify the solution
24
Auxiliary Conditions
Auxiliary Conditions
25
Boundary-Value and
Initial value Problems
Initial-Value Problems Boundary-Value Problems
−2 t
x + 2 x + x = e x + 2 x + x = e −2t
x(0) = 1, x (0) = 2.5 x(0) = 1, x(2) = 1.5
same different
26
Analytical Solutions
Analytical Solutions to ODEs are available
for linear ODEs and special classes of
nonlinear differential equations.
27
Numerical Solutions
Numerical methods are used to obtain a
graph or a table of the unknown function.
28
Solution for First Order Differential
Equations
29
Solution for First Order Differential Equations
30
Solution for First Order Differential Equations
Def: A first order differential equation is said to
be linear if it can be written:
y + p ( x) y = g ( x) 1
Method (1): Integrating factor
called an integrating factor
( x) = e p ( x ) dx (2
8)
The solution to a linear first order differential equation is then
y ( x) =
( x) g ( x)dx + c
(93)
e
p ( x ) dx
31
Example 1:
y − y = e 2x
Sol:
y ( x) = e
− p ( x ) dx e p ( x ) dx g ( x)dx + c
− ( −1) dx ( −1) dx 2 x
=e e e dx + c
= e x e − x e 2 x dx + c
= ex ex + c
= ce x + e 2 x
32
Example 2: xy'+2 y = x 2 − x, y (1) = 1
2
Sol: 2
y '+ y = x −1
x
y ( x) = e e p ( x ) dx g ( x)dx + c
− p ( x ) dx
− dx
2 2
dx
−2
=e x
e x
( x − 1) dx + c = x x 2
( x − 1)dx + c
−2 1 4 1 3 1 2 1
= x x − x + c = x − x + cx − 2
4 3 4 3
Apply the initial condition to get c,
1 1 1 7
= − +cc = .
2 4 3 12
33
Solution for First Order Differential Equations
Method (2): Separable Equations
Form of Equation: 𝒇 𝒙 𝒅𝒙 = 𝒈 𝒚 𝒅𝒚
Method of Solution:
Integrate both sides will give the solution of such type of
equations.
34
Examples
Example 3: Solve Example 4: Solve
𝑑𝑦 𝑦 𝒅𝒛 𝟏
= =
𝑑𝑥 𝑥 𝒅𝒕 𝒛𝒆𝒕
Solution: Solution:
𝑑𝑦 𝑦 𝑑𝑧 1
= =
𝑑𝑥 𝑥 𝑑𝑡 𝑧𝑒 𝑡
𝑑𝑦 𝑑𝑥 𝑑𝑡
= 𝑧𝑑𝑧 = 𝑡
𝑦 𝑥 𝑒
𝑑𝑦 𝑑𝑥 𝑑𝑡
න =න න 𝑧𝑑𝑧 = න 𝑡
𝑦 𝑥 𝑒
ln 𝑦 = ln 𝑥 + 𝑐 𝑧2
= −𝑒 −𝑡 + 𝑐
2
𝑑𝑝 1−𝑝2
Exercise: Solve = .
𝑑𝑡 𝑡
35
Method (3): Homogeneous Equations (of degree zero)
𝑑𝑦
Form of Equation: = 𝑓 𝑥, 𝑦
𝑑𝑥
𝑓 𝑡𝑥, 𝑡𝑦 = 𝑡 0 𝑓 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 .
𝑓 𝑡𝑥, 𝑡𝑦 = 𝑡 𝑛 𝑓 𝑥, 𝑦 .
𝑑𝑦 𝑑𝑣
Method of Solution: Substituting 𝑦 = 𝑣𝑥, =𝑣 +𝑥 , reduces
𝑑𝑥 𝑑𝑥
the equation in form separable in variables v and x. Integrate both
sides and then substituting the value of v will give the solution.
36
Example 5: Solve
𝑑𝑦 𝑦
=
𝑑𝑥 𝑥
Solution:
𝑦
𝑓 𝑥, 𝑦 =
𝑥
𝑡𝑦 𝑦
𝑓 𝑡𝑥, 𝑡𝑦 = = = 𝑓 𝑥, 𝑦
𝑡𝑥 𝑥
𝑑𝑦 𝑑𝑣
Put 𝑦 = 𝑣𝑥, 𝑑𝑥 = 𝑣 + 𝑥 𝑑𝑥 .
𝑑𝑣
𝑣+𝑥 = 𝑣,
𝑑𝑥
𝑑𝑣
𝑥 = 0,
𝑑𝑥
𝑑𝑣
=0
𝑑𝑥
Integrating we get
𝑣=𝑐
or
𝑦
= 𝑐 , 𝑦 = 𝑐𝑥.
𝑥
Exercise: Solve
𝒅𝒚 𝒙
=
𝒅𝒙 𝒚
37
Method (4): Bernoulli Equations (nonlinear )
𝑑𝑦
Form of Equation: + 𝑢 𝑥 𝑦 = 𝑤 𝑥 𝑦 𝑛 , 𝑛 ∈ ℝ.
𝑑𝑥
Method of Solution:
39
Solution for Second Order
Differential Equations
42
Second Order Linear Differential Equations
• Homogeneous Second Order Linear
Differential Equations
o real roots, complex roots and repeated roots
• Euler Equations
43
Second Order Linear Differential Equations
The general equation can be expressed in the form:
44
Second Order Linear Differential Equations
Therefore
au' '+bu'+cu+ av' '+bv'+cv = g ( x)
2) Double roots
3) Complex roots
46
1) Real, Distinct Roots to Characteristic Equation
• Let the roots of the characteristic equation be real, distinct and
of values r1 and r2. Therefore, the solutions of the characteristic
equation are:
y=e r1 x rx
y=e2
• The general solution will be
y = c1e + c2e
r1x r2 x
• Example
y ' '−5 y '+6 y = 0 r 2 − 5r + 6 = 0
r1 = 2
y = c1e 2 x + c2e3 x
r2 = 3
47
2) Equal Roots to Characteristic Equation
• Let the roots of the characteristic equation equal and of value r1
= r2 = r. Therefore, the solution of the characteristic equation is:
y=e rx
Let y = Ve y' = e rxV '+rVerx and y' ' = e rxV ' '+2re rxV '+r 2Verx
rx
where V is a
function of x
ay ' '+by '+cy = 0
ar 2 + br + c = 0 2ar + b = 0
V ' ' ( x) = 0 V = cx + d
r 2 + 6r + 9 = 0
r1 = r2 = −3
y = (c1 + c2 x)e−3 x
49
3) Complex Roots to Characteristic Equation
Let the roots of the characteristic equation be complex in the
form r1,2 =λ±µi.
Therefore, the solution of the characteristic equation is:
( + i ) x x
y1 = e = e (cos( x) + i sin( x)),
y2 = e( − i ) x = ex (cos( x) − i sin( x)).
1 1
u ( x) = ( y1 + y2 ) = e x cos( x), v( x) = ( y1 − y2 ) = e x sin( x)
2 2i
It is easy to see that u and v are two solutions to the differenti al
equation. Therefore, the geneal solution t o the d.e. is :
y(x) = c1e λx cos (x) + c2 e λx sin( x).
50
Example:
r 2 − 4r + 5 = 0
r1, 2 = 2 i
51
Example: Find two solutions to 𝑦 ′′ − 9𝑦 = 0.
𝑟 2 − 9 = 0 ⇒ 𝑟 = ±3.
The two roots are 3 and -3. Therefore, two solutions are 𝑦1 𝑡 =
𝑒 3𝑡 and 𝑦2 𝑡 = 𝑒 −3𝑡 .
52
Example: Solve the following IVP
𝑦 ′′ − 4𝑦 ′ + 9𝑦 = 0, 𝑦 0 = 0, 𝑦 ′ 0 = −8.
𝑦𝑐 𝑡 = 𝑐1 𝑒 2𝑡 cos 5𝑡 + 𝑐2 𝑒 2𝑡 sin 5𝑡
𝑦 ′′ − 4𝑦 ′ + 4𝑦 = 0, 𝑦 0 = 12, 𝑦 ′ 0 = −3.
𝑟 2 − 4𝑟 + 4 = 0 ⇒ 𝑟 − 2 2
= 0 ⇒ 𝑟 = 2,2.
𝑦 ′′ + 3𝑦 ′ − 10𝑦 = 0, 𝑦 0 = 4, 𝑦 ′ 0 = −2
3𝑦 ′′ − 2𝑦 ′ − 8𝑦 = 0, 𝑦 0 = −6, 𝑦 ′ 0 = −18
4𝑦 ′′ − 5𝑦 ′ = 0, 𝑦 −2 = 0, 𝑦 ′ −2 = 7
𝑦 ′′ − 6𝑦 ′ − 2𝑦 = 0
𝑦 ′′ − 8𝑦 ′ + 17𝑦 = 0, 𝑦 0 = −4, 𝑦 ′ 0 = −1
4𝑦 ′′ − 24𝑦 ′ + 37𝑦 = 0, 𝑦 𝜋 = 1, 𝑦 ′ 𝜋 = 0
𝜋 𝜋
𝑦 ′′ + 16𝑦 = 0, 𝑦 = −10, 𝑦 ′ =3
2 2
9
16𝑦 ′′ − 40𝑦 ′ + 25𝑦 = 0, 𝑦 0 = 3, 𝑦 ′ 0 = −
4
𝑦 ′′ + 14𝑦 ′ + 49𝑦 = 0, 𝑦 −4 = −1, 𝑦 ′ −4 = 5
56
Euler Equations
•Def: Euler equations:
ax y' '+bxy'+cy = 0
2
ar (r − 1) + b(r ) + c = 0.
57
Solving Euler Equations: (Case I)
• The characteristic equation has two different real solutions r1
and r2.
• In this case the functions y = xr1 and y = xr2 are both solutions
to the original equation. The general solution is:
y( x) = c1 x + c2 x
r1 r2
Example:
2 x 2 y ' '+3 xy'−15 y = 0, the characteri stic equation is :
5
2r(r-1 ) + 3r-15 = 0 r1 = , r2 = −3.
2
5
y(x) = c1 x + c2 x −3.
2
58
Solving Euler Equations: (Case II)
• The characteristic equation has two equal roots r1 = r2=r.
y( x) = x (c1 + c2 ln x)
r
Example:
59
Solving Euler Equations: (Case III)
• The characteristic equation has two complex roots r1,2 = λ±µi.
x + i = e( + i ) ln x = x cos( ln x) + ix sin( ln x)
So, in the case of complex roots, the general solution w ill be :
y(x) = x λ(c1 cos (μ ln x) + c2 sin (μ ln x))
Example:
60
Second Order Non-Linear Differential Equations
2
d2y 2 dy
Solve 2x y 2
+ y 2
= x
dx 2 dx
Dividing by 2xy
2
d2y 1 y 1 x dy
x + =
dx 2 2 x 2 y dx
homogeneous
d2y y dy
x = f ,
x dx
2
dx
2
y = x( B ln x + C ) 2
2 du
2
2 d u du
2ux + 2ux = x General solution
dx 2 dx dx
Let x = et
du
2 p=
d u du
2
dp
2u = dt
2up = p2
dt 2 dt du
62
Second Order Non-Linear Differential Equations
63
Example:
d2y dy 2
Solve y + 1 = ( )
dx 2 dx
dy d2y dp
p=
and therefore = p
Let dx dx 2 dy
dp
yp +1 = p2
dy
64
Thank you
+974 4495 2222
Location
University of Doha for Science &
Technology
68 Al Tarfa, Duhail North
P.O. Box 24449 Doha, Qatar