Chapter 4. Differential Equations
Chapter 4. Differential Equations
Differential
Equations
Differential equations
• An equation relating a dependent variable to one or
more independent variables by means of its
differential coefficients with respect to the
independent variables is called a “differential
equation”.
d 3 y dy 2
3
− ( ) + 4 y = 4e x
cos x
dx dx
Product between two derivatives ---- non-linear
dy
+ 4 y 2 = cos x
dx
Product between the dependent variable themselves ---- non-linear
Solution to First order differential equations
∂f ∂f
dx + dy = df
∂x ∂y
For example
dy
x − y sin x + (cos x)
3
=0
dx
Separable-variables equations
• In the most simple first order differential equations, the
independent variable and its differential can be
separated from the dependent variable and its
differential by the equality sign, using nothing more than
the normal processes of elementary algebra.
• A differential equation of the type y’ = f(x)g(y) is
separable.
dy
For example y = sin x
dx
• Solution: Direct integration
Homogeneous equations
• Homogeneous/nearly homogeneous?
• A differential equation of the type,
dy y
= f
dx x
is termed a homogeneous differential equation
of the first order.
• Such an equation can be solved by making the
substitution u = y/x and thereafter integrating the
transformed equation.
Example
• Example: Solve the DE
xydy = ( x 2 + y 2 ) dx
• First we show that it homogeneous DE
2
y
1+
dy x + y
2 2
x y
= = = f
dx xy y x
x
Solution
y
u=
Let x
y = ux
dy du
=u+x
dx dx
dy = udx + xdu
Solution
dy x 2 + y 2
=
dx xy
Rewriting in the form : M ( x, y ) dx + N ( x, y ) dy = 0
(x 2
)
+ y dx − xydy = 0
2
(x 2
)
+ x 2 u 2 dx − ux 2 ( udx + xdu ) = 0
x 2 dx + x 2 u 2 dx − u 2 x 2 dx − ux 3 du = 0
x 2 dx − ux 3 du = 0
x dx = ux du
2 3
x 2 dx
3
= udu
x
Solution
dx
= udu is variable separable form
x
dx u2
∫ x = ∫ udx ln x =
2
+c
1 y2
ln x = 2 + c is general solution.
2 x
Equations solved by integrating factor
dy
R + yRP = Ry
dx
dy dR d
(
R = exp ∫ Pdx ) is the integrating factor
R +y = (Ry )
dx dx dx
Example
dy − 3 x 2
Solve xy − = y exp
4
dx 2 dz − 3x 2
3xz + = 3 exp
Let z = 1/y3 dz 3 dz 3 dy dx 2
=− 4 =− 4
dy y dx y dx
integral factor ( ) 3x 2
exp ∫ 3xdx = exp
2
1 3x 2 3x 2 dz 3x 2
exp = 3x + C 3xz exp + exp = 3
y3 2 2 dx 2
3x 2 d 3x 2
z exp z exp = 3
2 = 3 x + C
dx 2
Second O.D.E.
dy dp d 2 y
p= and therefore =
Let dx dx dx 2
dp
+ xp = ax
dx
1
integral factor exp x 2
2 1
y = ax + C ∫ exp − x 2 dx
2
dp 12 x 2
1 2 1 2
x x
e + xpe = axe
2 2 x
dx y = ax + Aerf + B
2
error function
1 2 1 2
d x x
( pe 2
) = axe 2
dx
Non-linear 2nd O.D.E.
- Equations where the independent variables does not occur explicitly
dy d2y dp
Let p=
dx
and therefore = p
dx 2 dy
dp
yp +1 = p2
dy
dx dx
Dividing by 2xy
2
d 2 y 1 y 1 x dy
x 2 + =
dx 2 x 2 y dx
d2y y dy
homogeneous x = f ,
y = Ax
2
dx x dx Singular solution
Let y = ux
2
y = x( B ln x + C ) 2
2
2 d u du 2 du
2ux 2
+ 2ux =x General solution
dx dx dx
Let x = et
du
2 2 p=
d u du dt dp
2u 2
= 2up = p2
dt dt du
Linear differential equations
• The general linear differential equation of the nth
order having constant coefficients may be written:
dny d n −1 y dy
P0 n + P1 n −1 + ... + Pn −1 + Pn y = φ ( x)
dx dx dx
d 2u du
P 2
+ Q + Ru =0
dx dx
The general solution of the linear differential equation will be the sum of
a “complementary function” and a “particular solution”.
purpose
The complementary function
d2y dy
P 2
+ Q + Ry = 0
dx dx
dy d2y
Let the solution assumed to be: y = Am e
mx
= Am me mx = Am m 2 mx
e
dx dx 2
Am e mx ( Pm 2 + Qm + R ) = 0
Unequal roots
Equal roots
Real roots
Complex roots
Unequal roots to auxiliary equation
Let the roots of the auxiliary equation be distinct and of values
m1 and m2. Therefore, the solutions of the auxiliary equation
are:
y = A1e m1x y = A2 e m2 x
The most general solution will be
y = A1e m1x + A2 e m2 x
If m1 and m2 are complex it is customary to replace the complex
exponential functions with their equivalent trigonometric forms.
Solve d2y dy
2
− 5 + 6y = 0
dx dx
auxiliary function
m 2 − 5m + 6 = 0
m1 = 2
m2 = 3
y = Ae 2 x + Be 3 x
Equal roots to auxiliary equation
• Let the roots of the auxiliary equation equal and of value m1 =
m2 = m. Therefore, the solution of the auxiliary equation is:
y = Ae mx
dy mx dV d2y 2
mx d V mx dV
Let y = Ve mx
=e + mVe mx = e + 2 me + m 2
Ve mx
dx dx dx 2 dx 2 dx
m 2 + 6m + 9 = 0
m1 = m2 = −3
y = ( A + Bx)e −3 x
Solve d2y dy
2
− 4 + 5y = 0
dx dx
auxiliary function
m 2 − 4m + 5 = 0
m = 2±i
( 2+i ) x ( 2 −i ) x
y = Ae + Be y = e ( E cos x + F sin x)
2x
Particular integrals
• Two methods will be introduced to obtain the
particular solution of a second linear O.D.E.
– The method of undetermined coefficients
• confined to linear equations with constant coefficients
and particular form of ϕ (x)
– The method of inverse operators
• general applicability
d2y dy
P 2
+ Q + Ry = φ ( x )
dx dx
Method of undetermined coefficients
d2y dy
P 2
+ Q + Ry = φ ( x )
dx dx
y = αe rx
Method of undetermined coefficients
d2y dy
P 2
+ Q + Ry = φ ( x )
dx dx
• When ϕ (x) is of the form G sin nx + H cos
nx, where G and H are constants, the form
of a particular solution is
y = L sin nx + M cos nx
y = p + qx + rx 2 + sx 3
dy
= q + 2rx + 3sx 2
dx
d2y
= 2r + 6 sx
dx 2
2r − 4 q + 4 p = 0
6 s − 8r + 4 q = 4
4r − 12 s = 0 yc = ( A + Bx)e 2 x
4s = 8
y p = 7 + 10 x + 6 x 2 + 2 x 3 y general = yc + y p
Method of inverse operators
• Sometimes, it is convenient to refer to the
symbol “D” as the differential operator:
dy
Dy =
dx
d2y dy
2
D ( Dy ) = D y = But,
2
( Dy ) =
2
dx 2 dx
...
dny
D y =
n
dx n
d2y dy
2
+ 3 + 2y D 2 y + 3Dy + 2 y = ( D 2 + 3D + 2) y = ( D + 1)( D + 2) y
dx dx
The differential operator D can be treated as an ordinary algebraic
quantity with certain limitations.
D ( ye px ) = e px Dy + yDe px = e px ( D + p ) y
D 2 ( ye px ) = e px ( D + p ) 2 y
...
D n ( ye px ) = e px ( D + p ) n y
More convenient!
f ( D)( ye ) = e f ( D + p ) y
px px
Differential operator to trigonometrical
functions
where “Im” represents the imaginary part of the function which follows it.
e ipx = cos px + i sin px
D 2 n (sin px) = (− p 2 ) n sin px
D 2 n +1 (sin px) = (− p 2 ) n p cos px
D 2 n (cos px) = (− p 2 ) n cos px
D 2 n +1 (cos px) = −(− p 2 ) n p sin px
The inverse operator
[ ]
D ∫ f ( x)dx = f ( x) ∫ f ( x)dx = D −1 f ( x)
( D − 4) y = e 2 x
1 f ( D )e px = f ( p )e px 1
y= e2x y= e2 x
( D − 4) ( 2 − 4)
p=2
1
y= e2 x
1
4(1 − D )
4
binomial expansion
1 2x 1 1 1
y=− e [1 + ( D ) + ( D ) 2 + ( D ) 3 +...]1
4 4 4 4
=2
1 1 1 1 1
y = − e 2 x [1 + ( ) + ( ) 2 + ( ) 3 +...] y = − e2x
4 2 2 2 2
1 f ( D)e px = f ( p )e px 1
y= e2x y= e2 x
( D − 4) ( 2 − 4)
p=2
1 1
e =
px
e px
f ( D) f ( p)
1 1
e px = e px
f ( D) ( D − p) n ϕ ( D)
f ( D)e px = f ( p )e px
1 e px
1 f ( D) ye px = e px f ( D + p ) y 1 e px 1
e px = e =
px
f ( D) ϕ ( p) ( D − p) n f ( D) ϕ ( p) D n
1 e px x n integration 1 e px
e =
px
e =
px
D −n
f ( D) ϕ ( p ) n! f ( D) ϕ ( p)
Solve
d2y dy m 2 − 8m + 16 = 0
− 8 + 16 y = 6 xe 4x
dx 2 dx
differential operator
( D 2 − 8D + 16) y = ( D − 4) 2 y = 6 xe 4 x yc = ( A + Bx)e 4 x
6
yp = xe 4x
( D − 4) 2 y = y c + yp
f(p) = 0
f ( D)e px = e px f ( D + p )
y p = 6 xe 4 x D −2
integration
x2
y p = 6 xe 4 x y p = 3 x 3e 4 x
2!
Solve
d 2 y dy m2 − m − 6 = 0
− − 6 y = 4 x 3
+ 3 x 2
dx 2 dx
differential operator
( D 2 − D − 6) y = ( D − 3)( D + 2) y = 4 x 3 + 3 x 2
yc = Ae 3 x + Be −2 x
1
yp = (4 x 3 + 3x 2 )
( D − 3)( D + 2)
1 1 1 3 y = y c + yp
yp = − + ( 4 x + 3 x 2
)
5 (3 − D) ( 2 + D )
expanding each term by binomial theorem
1 1 D D 2 D 3 1 D D 2 D3
y p = − + + + + ... + − + − + ... (4 x 3 + 3 x 2 )
5 3 9 27 81 2 4 8 16
4 x 3 + 3x 2 12 x 2 + 6 x 7(24 x + 6) 13 × 24
yp = − + − + − 0...
6 36 216 1296