Differential Equations: X F y X A DX Dy X A DX y D X A DX y D X A

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Differential Equations

A Differential Equation is an equation that contains one or more derivatives of a


differentiable function. An equation with partial derivatives is called a Partial
Differential Equation. While, an equation with ordinary derivatives, that is, derivatives
of a function of a single variable, is called an Ordinary Differential Equation.
The order of a differential equation is the order of the equation’s highest order
derivative. A differential equation is linear if it can be put in the form

dny d n−1 y dy
an ( x) n + an−1 ( x) n−1 + ... + a1 ( x) + a0 ( x) y = F ( x)
dx dx dx

The degree of a differential equation is the power (exponent) of the equation’s


highest order derivative.

Example
dy dy
First order, first degree, linear = 5y , 3 − sin x = 0
dx dx
2 5
⎛ d 3 y ⎞ ⎛ d 2 y ⎞ dy
Third order, second degree, nonlinear ⎜⎜ 3 ⎟⎟ + ⎜⎜ 2 ⎟⎟ − = ex
⎝ dx ⎠ ⎝ dx ⎠ dx

Solution of First Order Differential Equations


1) Separable Equations
A first order differential equations is separable if it can be put in the form
M ( x)dx + N ( y )dy = 0

70

33
Steps for Solving a Separable First Order Differential Equation
i. Write the equation in the form M ( x) dx + N ( y ) dy = 0 .
ii. Integrate M with respect to x and N with respect to y to obtain an equation
that relates y and x .
Example
Solve the following differential equations
dy dy x(2 ln x + 1) x+ y dy
(a) = (1 + y 2 )e x , (b) = , (c) e dx =
dx dx sin y + y cos y x
Solution
dy 1
(a) = (1 + y 2 )e x ⇒ e x dx − dy = 0
dx 1+ y2
1
∫ e dx − ∫ dy = C ⇒ e x − tan −1 y = C
x

1+ y2
tan −1 y = e x − C ⇒ y = tan(e x − C )

dy x(2 ln x + 1)
(b) = ⇒ (sin y + y cos y )dy = x(2 ln x + 1)dx
dx sin y + y cos y

∫ (sin y + y cos y)dy − ∫ x(2 ln x + 1)dx = C


∫ sin( y )dy + ∫ y cos( y )dy − 2∫ x ln( x)dx − ∫ xdx = C
[ ]
⎡ x2 x2 1 ⎤ x2
− cos( y ) + y sin y − ∫ sin( y )dy − 2 ⎢ln( x) × − ∫ × dx ⎥ − = C
⎣ 2 2 x ⎦ 2

x2 x2
− cos( y ) + y sin y + cos y − x ln x + − = C
2

2 2
y sin y − x 2 ln x = C .

71 34
x+ y dy dy
(c) e dx = ⇒ e x e y dx =
x x
dy
∫ xe dx − ∫ e
−y
xe x dx = ⇒ x
dy = C
ey
xe x − ∫ e x dx + e − y = C ⇒ xe x − e x + e − y = C

Notes
1) f1 ( x) g1 ( y ) dy + f 2 ( x) g 2 ( y ) dx = 0 Separable
f1 ( x) f ( x)
2) dy + 2 dx = 0 Separable
g1 ( y ) g 2 ( y)
3) [ f1 ( x) ± g1 ( y )]dy + [ f 2 ( x) ± g 2 ( y )]dx Not Separable

Example
f1 ( x ) = x , f 2 ( x) = sin( x) , g1 ( y ) = y , g 2 ( y ) = tan( y )
1) xydy + sin( x) tan( y ) dx = 0 ⇒ xydy = − sin( x) tan( y )dx
y sin( x)
dy = − dx Separable
tan( y ) x
x sin( x) x sin( x)
2) dy + dx = 0 ⇒ dy = − dx
y tan( y ) y tan( y )
tan( y ) sin( x)
dy = − dx Separable
y x
3) ( x + y )dy + (sin( x) + tan( y ) )dx = 0

( x + y )dy = −(sin( x) + tan( y ) )dx Not Separable

35
72
Special Type of Separable Equations
dy
If = f (ax + by + c) ; then let z = ax + by + c and the resultant equation may
dx
be reduced to a separable equation.

Example
dy
Solve the differential equation = tan 2 ( x + y )
dx
Solution
dz dy
z = x+ y ⇒ = 1+
dx dx
dy dz dz
= −1 ⇒ − 1 = tan 2 ( z )
dx dx dx
dz dz
= tan 2 ( z ) + 1 ⇒ = sec 2 ( z )
dx dx
dz
= dx ⇒ cos 2 ( z )dz = dx
sec 2 ( z )
1 + cos(2 z )
∫ cos ( z )dz − ∫ dx = C ⇒ ∫ dz − ∫ dx = C
2

2
1 1
z + sin( 2 z ) − x = C
2 4
While z = x + y , then the solution is

1 1
( x + y ) + sin(2( x + y )) − x = C
2 4

36
73
Note
dy
For the differential equation = tan( x + y ) − sec( x − y ) , we can not use the
dx
assumption because the difference between the arguments of tan( x + y ) and

sec( x − y ) . So, the differential equation can not be converted to a separable equation.

Exercises

Find the solution of the following Differential Equations


1) y′ = ky 2) y′ = − xy
3) y′ − 2 y + a = 0 4) xy′ + by = 0

5) ( x ln x ) y′ = y 6) ( x + 2) y′ − xy = 0

7) y′ = 2 x −1 y − 1 8) yy′ = 2 x exp( y 2 )
9) 2 y′ = y cot( x) 10) y′ + csc( y ) = 0
11) y′ = (1 + x)(1 + y 2 ) 12) yy′ = 0.5 sin 2 (ω x)
13) y′ = y tanh( x) 14) y′ sin( 2 x) = y cos(2 x)
15) y′ = y tan( 2 x) , y (0) = 2 16) ( x + 1) y ′ = 2 y , y (0) = 1

17) 2 xy′ = 3 y , y (1) = 4 18) y′x ln( x) = y , y (2) = ln(4)


19) y ′ = 2e x y 3 , y ( 0 ) = 0 . 5 20) ( x 2 + 1) yy ′ = 1, y (0) = −3

21) dr sin(θ ) = 2r cos(θ )dθ , r (π / 2) = 2 22) υ dυ / dx = C , υ ( x0 ) = υ0

37
74
Homogeneous Function
If f (λx, λy ) = λn f ( x, y ) then f ( x, y ) is homogeneous function and n
represents the degree of the homogeneous function.

Example

For the function f ( x, y ) = x + y then


2 2

f (λx, λy ) = (λx ) + (λy )


2 2

= λ2 x 2 + λ2 y 2
= λ2 (x 2 + y 2 ) = λ2 f ( x, y )
So, the function f ( x, y ) is homogeneous with degree 2 .

Example

For the function f ( x, y ) = x + y then


2

f (λx, λy ) = λx + (λy )
2

= λx + λ2 y 2
= λ (x + λy 2 )
So, the function f ( x, y ) is not homogeneous.
Example

f ( x, y ) = x 2 + y 2 + 5 (Non-homogeneous)

f ( x, y ) = x 3 + xy + x (Non-homogeneous)

f ( x, y ) = cos( xy ) (Non-homogeneous)

f ( x, y ) = cos( x 2 ± y 2 ) (Non-homogeneous)

38
75
⎛ x⎞
f ( x, y ) = cos⎜⎜ ⎟⎟ (Homogeneous)
⎝ y⎠
⎛ x2 ⎞
f ( x, y ) = cos⎜⎜ ⎟⎟ (Non-homogeneous)
⎝ y⎠

Homogeneous Equations
The differential equation M ( x, y ) dx + N ( x, y ) dy is homogeneous if M and N
are homogeneous functions of the same degree.

Example

1) ( x + y ) dx + xydy = 0
2 2

This is homogeneous because M and N are both homogeneous with degree 2 .

2) ( x + y ) dx + xydy = 0
3 3

This is not homogeneous because M is homogeneous with degree 3 while N is


homogeneous with degree 2 .

3) xdx + ( x + y ) dy = 0
2

This is not homogeneous because N is not homogeneous.

Solution of Homogeneous Equations


A homogeneous first order differential equation can be put in the form
dy ⎛ y⎞
= F⎜ ⎟
dx ⎝ x⎠
This equation can be changed into separable equation with the substitutions

39
76
y dy dv
v= ⇒ y = vx ⇒ =v+x
x dx dx
dv
Then becomes v+x = F (v)
dx
which can be rearranged algebraically to give
dx dv
+ =0
x v − F (v )
with the variables now separated, the equation can now be solved by integrating with
respect to x and v . We can then return to x and y by substituting v = y / x .

Example
Find the solution of the differential equation

dy x2 + y2
=−
dx 2 xy
that satisfies the condition y (1) = 1 .
Solution
2
Dividing the numerator and denominator of the right-hand side by x gives

dy 1 + ( y / x) 2 dy 1 + v2
=− ⇒ =− = F (v )
dx 2( y / x) dx 2v

1 + v 2 2v 2 + 1 + v 2 3v 2 + 1
v − F (v ) = v + = =
2v 2v 2v
dx dv dx 2vdv
+ =0 ⇒ + =0
x v − F (v ) x 3v 2 + 1
The solution of this equation can be written as

40
77
dx 2vdv 1
∫ x ∫ 3v 2 + 1 = C
+ ⇒ ln x + ln(1 + 3v 2 ) = C
3
3 ln x + ln(1 + 3v 2 ) = 3C ⇒ ln x 3 + ln(1 + 3v 2 ) = 3C

e ln x +ln(1+3v ) = e3C e ln x × e ln(1+3v ) = e3C


3 2

3 2

⎛ y2 ⎞
x (1 + 3v ) = C ′
3 2
⇒ x ⎜⎜1 + 3 2 ⎟⎟ = C ′
3

⎝ x ⎠

x 3 + 3 xy 2 = C ′
The condition is that when x = 1 then y = 1 and the constant C ′ can be found

(1) 3 + 3(1)(1) 2 = C ′ ⇒ C′ = 4
The final solution is x + 3 xy = 4 .
3 2

Reducible to Homogeneous
If the differential equation has the form
dy a1 x + b1 y + c1
=
dx a2 x + b2 y + c2
a1 b1
Case 1: if = then z = a1 x + b1 y
a2 b2
a1 b1
Case 2: if ≠ then intersect the two lines a1 x + b1 y + c1 = 0 and
a2 b2
a2 x + b2 y + c2 = 0 to find the intersection point (h, k ) and let

x= X +h ⇒ dx = dX , and y =Y +k ⇒ dy = dY

41
78
Example
dx 4 x + 6 y + 5
Solve the differential equation =
dy 3 y + 2 x + 4
Solution
dy 2 x + 3 y + 4
=
dx 4 x + 6 y + 5
a1 2 1
a1 = 2 , a2 = 4 ⇒ = =
a2 4 2
b1 3 1
b1 = 3 , b2 = 6 ⇒ = =
b2 6 2
a1 b1
So = ⇒ Case 1
a2 b2
dz dy
Let z = 2x + 3y ⇒ = 2+3
dx dx
dy 1 ⎛ dz ⎞ 1 dz 2 z + 4 dz 3 z + 12
= ⎜ − 2⎟ ⇒ − = ⇒ = +2
dx 3 ⎝ dx ⎠ 3 dx 3 2 z + 5 dx 2 z + 5
dz 3 z + 12 + 4 z + 10 dz 7 z + 22 2z + 5
= ⇒ = ⇒ dz = dx
dx 2z + 5 dx 2 z + 5 7 z + 22
2z + 5 ⎛2 9 1 ⎞
∫ 7 z + 22 dz − ∫ dx = C ⇒ ∫ ⎝ 7 7 7 z + 22 ⎟⎠dz − ∫ dx = C
⎜ − ×

2 9 7
∫ 7 dz − ∫ 7 × 7 × 7 z + 22 dz − ∫ dx = C
2 9
z − × ln(7 z + 22) − x = C
7 49
2 9
(2 x + 3 y ) − × ln(7(2 x + 3 y ) + 22 ) − x = C
7 49
42
79
Example
Solve the differential equation ( 2 x + y − 3) dy = ( x + 2 y − 3) dx
Solution
dy x + 2 y − 3
=
dx 2 x + y − 3
a1 1
a1 = 1, a2 = 2 ⇒ =
a2 2
b1
b1 = 2 , b2 = 1 ⇒ =2
b2
a1 b1
So ≠ ⇒ Case 2
a2 b2
x + 2y −3 = 0 ….. (1)
2x +y −3 = 0 ….. (2)
+ 2x + 4 y −6 =0
m 2x m y ±3 =0
3y −3 =0

⇒ y =1
Substituting into ( 2) , we get
2x + 1 − 3 = 0 ⇒ x = 1
The intersection point ( h, k ) = (1,1) .
Let x = X +1 ⇒ dx = dX
y = Y +1 ⇒ dy = dY
dY ( X + 1) + 2(Y + 1) − 3
=
dX 2( X + 1) + (Y + 1) − 3
X + 1 + 2Y + 2 − 3 dY X + 2Y
= ⇒ =
2X + 2 + Y +1− 3 dX 2 X + Y
43
80
Y
1+ 2
dY X
=
dX Y
2+
X
Y dY 1 + 2v
Let v= ⇒ = = F (v )
X dX 2 + v
dX dv
+ =0
X v − F (v )
1 + 2v
v − F (v ) = v −
2+v
2v + v 2 − 1 − 2v v 2 − 1
= =
2+v 2+v
dX 2 + v 2+v
+ dv = 0 ⇒ ln X + ∫ dv = C
X v2 −1 v2 −1
2+v A B A(v − 1) + B (v + 1)
= + =
v2 −1 v + 1 v −1 v2 −1
2 + v = A(v − 1) + B(v + 1)
3
At v =1 ⇒ B=
2

−1
At v = −1 ⇒ A =
2
−1/ 2 3/ 2
ln X + ∫ dv + ∫ dv = C
v +1 v −1
1 3
ln X − ln(v + 1) + ln(v − 1) = C
2 2

44
81
1 Y 3 Y
ln X − ln( + 1) + ln( − 1) = C
2 X 2 X
1 ( y − 1) 3 ( y − 1)
ln( x − 1) − ln( + 1) + ln( − 1) = C
2 ( x − 1) 2 ( x − 1)

Exercises
Find the solution of the following Differential Equations
1) xy′ = x + y 2) xy′ = 2 x + 2 y

3) x 2 y ′ = y 2 + xy + x 2 4) x 2 y ′ = y 2 + 5 xy + 4 x 2

y−x y+x
5) y′ = 6) y′ =
y+x y−x
7) y′ = ( y − x) 2 8) y′ = tan( x + y ) − 1
y − x +1 1 − 2 y − 4x
9) y′ = 10) y′ =
y− x+5 1 + y + 2x

2) Linear First Order Equations


A differential equation that can be written in the form
dy
+ P( x) y = Q( x)
dx
where P and Q are functions of x , is called a Linear First Order Equation. The
solution is
1
ρ ( x) ∫
y= ρ ( x)Q( x)dx

ρ ( x) = e ∫
P ( x ) dx
where

45
82
Steps for Solving a Linear First Order Equation
i. Put it in standard form and identify the functions P and Q .

ii. Find an anti-derivative of P (x ) .


ρ ( x) = e ∫
P ( x ) dx
iii. Find the integrating factor .
iv. Find y using the following equation

1
ρ ( x) ∫
y= ρ ( x)Q( x)dx

Example
dy
Solve the equation x − 3y = x2
dx
Solution
Step 1: Put the equation in standard form and identify the functions P and Q . To do

so, we divide both sides of the equation by the coefficient of dy / dx , in this


case x , obtaining
dy 3 3
− y=x ⇒ P( x) = − , Q( x) = x .
dx x x
Step 2: Find an anti-derivative of P (x ) .

3 1
∫ P ( x ) dx = ∫ x
− dx = −3∫ x dx = −3 ln( x)
Step 3: Find the integrating factor ρ (x) .
1
1
ρ ( x) = e ∫
−3 ln
= e −3 ln x = e ln x = e =
P ( x ) dx
x3
x3
Step 4: Find the solution.
1 1 ⎛1⎞
ρ ( x) ∫ (1 / x 3 ) ∫ ⎝ x 3 ⎠
y= ρ ( x )Q ( x ) dx = ⎜ ⎟( x)dx

46
83
1 3⎛ 1 ⎞
= x3 ∫ dx =x ⎜ − + C ⎟ = Cx 3 − x 2
⎝ x ⎠
2
x
The solution is the function y = Cx − x .
3 2

Example
−1
Solve the equation (1 + x ) dy + ( y − tan ( x))dx = 0 .
2

Solution

Dividing the two sides by (1 + x ) dx


2

dy y tan −1 ( x)
+ − =0
dx 1 + x 2 1 + x2
dy y tan −1 ( x) 1 tan −1 ( x)
+ = ⇒ P( x) = , Q=
dx 1 + x 2 1 + x2 1 + x2 1 + x2
1
∫ P( x)dx = ∫ 1+ x 2
dx = tan −1 ( x)
−1
ρ ( x) = e tan ( x)

tan −1 ( x ) tan −1 ( x ) tan −1 ( x)


e y = ∫e dx + C
1 + x2
1
z = tan −1 ( x) ⇒ dz = dx
1 + x2
−1
e tan ( x)
y = ∫ e z × zdz + C

= ze z − ∫ e z dz + C

= ze z − e z + C
−1 −1 −1
e tan ( x)
y = tan −1 ( x)e tan ( x)
− e tan ( x)
+C

47
84
Steps for Solving other Form of Linear First Order Equation
There is another form of differential equation that can be written in the form
dx
+ P( y ) x = Q( y )
dy
where P and Q are functions of y . The solution is found as follows:
i. Put it in standard form and identify the functions P and Q .

ii. Find an anti-derivative of P ( y ) .

ρ ( y) = e ∫
P ( y ) dy
iii. Find the integrating factor .
iv. Find x using the following equation
1
ρ ( y) ∫
x= ρ ( y )Q( y )dy

Example

Solve the equation e dx + 2( xe − y )dy = 0 .


2y 2y

Solution
2y
Dividing the differential equation by e dy to get

dx
+ 2 x − 2 ye −2 y = 0
dy
dx
+ 2 x = 2 ye −2 y ⇒ P ( y ) = 2 , Q( y ) = 2 ye −2 y
dy

∫ P( y)dy = ∫ 2dy = 2 y , ρ ( y) = e ∫ = e2 y
P ( y ) dy

∫ (e )(2 ye )dy + C
1
x= 2y −2 y
⇒ e 2 y x = 2 ∫ ydy + C
e2 y
y2
e x = 2 +C
2y
⇒ e2 y x = y 2 + C
2
48

85
Reducible to Linear
™ The general form
dy
+ P( x) y = Q( x) f ( y )
dx
where the function f is y to any power n .
™ Also, it may be in the following form
dy
+ P ( x ) g ( y ) = Q ( x ) h( y )
dx
where the function g and h are functions of y .
Example
dy y
Solve the equation + = ln( x) y 2
dx x
Solution
2
Dividing the two sides of the equation by y

1 dy 1
+ = ln( x)
y 2 dx xy
1 dz 1 dy dy dz
Let z = ⇒ =− 2 ⇒ = − y2
y dx y dx dx dx
dz 1
− + z = ln( x)
dx x
dz 1 −1
− z = − ln( x) ⇒ P= , Q = − ln( x )
dx x x
−1
∫ P( x)dx = ∫ x
dx = − ln( x)

49
86
⎛1⎞
ln ⎜ ⎟ 1
ρ ( x) = e ∫
−1
= e −ln( x ) = e ln( x ) = e =
P ( x ) dx ⎝x⎠

x
ρ ( x) z = ∫ ρ ( x)Q( x)dx + C
1 1
z = − ∫ ln( x)dx + C
x x
1 1
× =−
(ln( x) ) + C 2


1
=−
(ln( x) ) + C 2

x y 2 xy 2
Example
dy
Solve the equation + x sin(2 y ) = x cos 2 ( y )
dx
Solution
2
Dividing the two sides of the equation by cos ( y )

1 dy sin(2 y ) dy 2 sin( y ) cos( y )


+ x = x ⇒ sec 2
( y ) + x =x
cos 2 ( y ) dx cos 2 ( y ) dx cos 2 ( y )
dy 2 sin( y ) dy
sec 2 ( y ) +x = x ⇒ sec 2 ( y ) + 2 x tan( y ) = x
dx cos( y ) dx
dz dy dy 1 dz
Let z = tan( y ) ⇒ = sec 2 ( y ) ⇒ =
dx dx dx sec 2 ( y ) dx
dz
+ 2 xz = x ⇒ P = 2x , Q = x
dx

∫ P( x)dx = ∫ 2 xdx = x ⇒ ρ ( x) = e ∫ = ex
P ( x ) dx 2
2

ρ ( x) z = ∫ ρ ( x)Q( x)dx + C
2
ex
e z = ∫ e ( x)dx + C
x2 x2
⇒ e tan( y ) =
x2
+C
2
50
87
Another Form of Reducible to Linear
™ The general form may be as follows
dx
+ P( y ) x = Q( y ) f ( x)
dy
where the function f is x to any power n .
™ Also, it may be in the following form
dx
+ P ( y ) g ( x ) = Q ( y )h( x )
dy
where the function g and h are functions of x .

Example
Solve the equation cos( y ) dx = x(sin( y ) − x) dy
Solution
Dividing the two sides of the equation by cos( y ) dy

dx sin( y ) x2 dx
= x− ⇒ − x tan( y ) = − x 2 sec( y )
dy cos( y ) cos( y ) dy
2
Dividing by x , we get
1 dx 1
− tan( y ) = − sec( y )
x 2 dy x
1 dz − 1 dx dx dz
Let z = ⇒ = ⇒ = −x2
x dy x 2 dy dy dy
dz
− − z tan( y ) = − sec( y )
dy
dz
+ z tan( y ) = sec( y ) ⇒ P = tan( y ) , Q = sec( y )
dy
51
88
sin( y )
∫ P( y )dy = ∫ tan( y )dy = ∫ dy = − ln(cos( y ) )
cos( y )
⎛ 1 ⎞
ln ⎜⎜ ⎟⎟
ρ ( y) = e ∫ = e −ln (cos( y ) ) = e ln (cos( y ) ) = e
−1
= sec( y )
P ( y ) dy ⎝ cos( y ) ⎠

ρ ( y ) z = ∫ ρ ( y )Q( y )dy + C
1
x ∫
sec( y ) × = sec( y ) sec( y )dy + C

sec( y ) sec( y )
= ∫ sec 2 ( y )dy + C ⇒ = tan( y ) + C
x x

Exercises

Find the solution of the following Differential Equations


1) y′ − y = 3 2) y′ + 2 xy = 0
3) y′ + 2 y = 6e x 4) y′ − 4 y = 2 x − 4 x 2
5) y′ + y = sin(x) 6) y′ + 2 y = cos( x)
7) y′ + ky = e − kx 8) y′ = ( y − 1) cot( x)

9) xy′ − 2 y = x 3e x 10) x 2 y′ + 2 xy = sinh(3 x)

11) y′ − y = e x , y (1) = 0 12) y′ + y = ( x + 1) 2 , y (0) = 0


13) y′ + xy = xy −1 14) y′ + x −1 y = x −1 y 2
15) 2 xy ′ = 10 x 3 y 5 + y 16) y′ + y = xy −1

52
89
Exact Differential Equations
Example
If f ( x, y ) = C and f ( x, y ) = sin( xy ) then

df dy
= y cos( xy ) + x cos( xy ) = 0 , or
dx dx
df = y cos( xy )dx + x cos( xy)dy = 0
i.e., y cos( xy ) dx + x cos( xy ) dy = 0

∂f
From the above equation, we see that M ( x, y ) = y cos( xy ) = , and
∂x
∂f
N ( x, y ) = x cos( xy ) = . The solution of this differential equation is f ( x, y ) = C .
∂y

Exact Differential Equation Test


A differential equation M ( x, y ) dx + N ( x, y ) dy = 0 is said to be exact if for

some function f ( x, y )

∂f ∂f
M ( x, y )dx + N ( x, y )dy = dx + dy = df
∂x ∂y
∂M ∂N
is exact if and only if =
∂y ∂x
Example

¾ The equation ( x + y )dx + ( 2 xy + cos( y ))dy = 0 is exact because the partial


2 2

derivatives
∂M ∂ 2 ∂N ∂
= (x + y2 ) = 2 y , = (2 xy + cos( y )) = 2 y
∂y ∂y ∂x ∂x
are equal.

53
90
¾ The equation ( x + 3 y ) dx + ( x + cos( y ))dy = 0 is not exact because the partial
2

derivatives
∂M ∂ ∂N ∂ 2
= ( x + 3 y) = 3 , = ( x + cos( y )) = 2 x
∂y ∂y ∂x ∂x
are not equal.

Steps for Solving an Exact Differential Equation


i. Match the equation to the form M ( x, y ) dx + N ( x, y ) dy = 0 to identify M and
N.
ii. Integrate M (or N ) with respect to x (or y ), writing the constant of integration

as g ( y ) (or g (x) ).
iii. Differentiate with respect to y (or x ) and set the result equal to N (or M ) to

find g ′( y ) (or g ′(x) ).

iv. Integrate to find g ( y ) (or g (x) ).

v. Write the solution of the exact equation as f ( x, y ) = C .

Example
Solve the differential equation

( x 2 + y 2 )dx + (2 xy + cos( y ))dy = 0 .


Solution
Step 1: Match the equation to the form M ( x, y ) dx + N ( x, y )dy = 0 to identify M .

M ( x, y ) = x 2 + y 2
Step 2: Integrate M with respect to x , writing the constant of integration as g ( y ) .

54
91
x3
f ( x, y ) = ∫ M ( x, y )dx = ∫ ( x + y )dx = + xy 2 + g ( y )
2 2

3
Step 3: Differentiate with respect to y and set the result equal to N to find g ′( y ) .

∂ ⎛ x3 ⎞
⎜⎜ + xy 2 + g ( y ) ⎟⎟ = 2 xy + g ′( y )
∂y ⎝ 3 ⎠
2 xy + g ′( y ) = 2 xy + cos( y ) ⇒ g ′( y ) = cos( y )
Step 4: Integrate to find g ( y ) .

∫ g ′( y)dy = ∫ cos( y)dy = sin( y)


Step 5: Write the solution of the exact equation as f ( x, y ) = C .

x3
+ xy 2 + sin( y ) = C
3

Another Solution

Step 1: Match the equation to the form M ( x, y ) dx + N ( x, y )dy = 0 to identify N .

N ( x, y ) = 2 xy + cos( y )
Step 2: Integrate N with respect to y , writing the constant of integration as g (x) .

f ( x, y ) = ∫ N ( x, y )dy = ∫ (2 xy + cos( y ))dy = xy 2 + sin( y ) + g ( x)


Step 3: Differentiate with respect to x and set the result equal to M to find g ′(x) .


(xy 2 + sin( y) + g ( x)) = y 2 + g ′( x)
∂x
y 2 + g ′( x) = x 2 + y 2 ⇒ g ′( x) = x 2

55
92
Step 4: Integrate to find g (x) .

x3
∫ g ′( x)dx = ∫ x dx = 3
2

Step 5: Write the solution of the exact equation as f ( x, y ) = C .

x3
+ xy 2 + sin( y ) = C
3

Reducible to Exact
A differential equation M ( x, y ) dx + N ( x, y )dy = 0 which is not exact can be
made exact by multiplying both sides by a suitable integrating factor ρ . In other words,
the equation
ρM ( x, y )dx + ρN ( x, y )dy = 0
is an exact equation for an appropriate choice of ρ.

Method to Find the Integrating Factor


∂M ∂N

∂y ∂x
= f (x) or Constant then ρ ( x) = e ∫
f ( x ) dx
™ If .
N
∂N ∂M

∂x ∂y
= f ( y ) or Constant then ρ ( y) = e ∫
f ( y ) dy
™ If .
M

56
93
Example
Solve the equation 2 ydx + xdy = 0
Solution
∂M
M ( x, y ) = 2 y ⇒ =2
∂y
∂N
N ( x, y ) = x ⇒ =1
∂x
This equation is not exact
∂M ∂N

∂y ∂x 2 − 1 1
= = = f ( x)
N x x
1
∫ f ( x)dx = ∫ dx = ln( x)
x

ρ ( x) = e ∫ = e ln( x ) = x
f ( x ) dx

Multiplying both sides of the equation by the integrating factor ρ ( x) = x , we get


x(2 ydx + xdy ) = 0 ⇒ 2 xydx + x 2 dy = 0
∂M ∂N
which is exact because = 2 x and = 2 x , and the solution is
∂y ∂x
f ( x, y ) = ∫ 2 xydx = x 2 y + g ( y )

∂ 2
(x y + g ( y)) = x 2 + g ′( y)
∂y
x 2 + g ′( y ) = x 2 ⇒ g ′( y ) = 0
g ( y ) = ∫ g ′( y )dy = C ⇒ x2 y = C

57
94
Exercises

Find the solution of the following Differential Equations


1) ydx + xdy = 0 2) ( xdy − ydx) / x 2 = 0

3) ( 2 x + e y ) dx + xe y dy = 0 4) 2 x ln( y ) dx + y −1 x 2 dy = 0

5) sinh( x) cos( y ) dx = cosh( x) sin( y ) dy 6) 3re 3θ dθ + e 3θ dr = 0

7) (1 + x 2 )dy + 2 xydx = 0 8) xdy − 4 ydx = 0

9) ydx + x(1 + y )dy = 0 10) ( 2 ydx + dy )e 2 x = 0

11) (3 y cos(3x)dx − sin(3x)dy ) / y 2 = 0 12) sin( β y ) dx = − β cos( β y ) dy

13) xdy − ydx = 0 14) 2 cos(π y ) dx = π sin(π y )dy

15) y cos( x)dx + 3 sin( x)dy = 0 16) 3 ydx + 2 xdy = 0

17) dx + ( y / x) 2 dy = 0 18) 2dx − e y − x dy = 0

19) y cos( x)dx + 2 sin( x)dy = 0 20) ( y + 1) dx − ( x + 1) dy = 0

21) 2 ydx + xdy = 0 22) sin( y ) dx + cos( y )dy = 0

23) 2dx + sec( x ) cos( y ) = 0 , y (0) = 0 24) 2 x 2 dx − 3 xy 2 dy = 0 , y (1) = 0


25) 2 sin( y ) dx + cos( y ) dy = 0 , 26) ( 2 y + xy ) dx + 2 xdy = 0 ,

y (0) = π / 2 y (3) = 2

58
95
Second Order Linear Homogeneous Equations
The linear equation

dny d n−1 y dy
an ( x) n + an−1 ( x) n−1 + ... + a1 ( x) + a0 ( x) y = F ( x)
dx dx dx
if F ( x) = 0 then it is called homogeneous; otherwise it is called non-homogeneous.

Linear Differential Operator


It is convenient to introduce the symbol D to represent the operation of
differentiation with respect to x . That is, we write Df (x) to mean df / dx .
Furthermore, we define powers of D to mean taking successive derivatives:

D f ( x) = D{D f ( x)} = 3
d2 f d3 f
D f ( x) = D{Df ( x)} = 2 ,
2 3 2

dx dx
d 2 f df
( D + D − 2) f ( x) = D f ( x) + Df ( x) − 2 f ( x) = 2 +
2 2
− 2 f ( x)
dx dx

The Characteristic Equation


The linear second order equation with constant real-number coefficients is

d2y dy
+ 2 a + by = 0
dx 2 dx
or, in operator notation

( D 2 + 2aD + b) y = 0
( D − r1 )( D − r2 ) y = 0

59
96
d2y dy
Solution of + 2 a + by = 0
dx 2 dx
Roots r1 & r2 Solution

y = C1e + C2 e
r 1x r 2x
Real and unequal

y = (C1 x + C2 )e
r 2x
Real and equal

Complex conjugate, α ± jβ y = eαx (C1 cos βx + C2 sin βx)

Example
Solve the following differential equations:

d 2 y dy d2y dy
(a) + − 2y = 0, (b) + 4 + 4y = 0
dx 2 dx dx 2 dx
d2y dy d2y
(c) 2
+ 4 + 6y = 0, (d) + 4y = 0
dx dx dx 2
Solution

d 2 y dy
(a) + − 2y = 0
dx 2 dx
The characteristic equation is

D2 + D − 2 = 0
( D − 1)( D + 2) = 0 ⇒ r1 = 1 and r2 = −2
The solution is

y = C1e x + C2 e −2 x

60
97
d2y dy
(b) + 4 + 4y = 0
dx 2 dx
The characteristic equation is

D 2 + 4D + 4 = 0
( D + 2) 2 = 0 ⇒ r1 = r2 = −2
The solution is

y = (C1 x + C2 )e −2 x

d2y dy
(c) 2
+ 4 + 6y = 0
dx dx
The characteristic equation is

D 2 + 4D + 6 = 0
− B ± B 2 − 4 AC
r1, 2 =
2A
− 4 ± (4) 2 − 4(1)(6) − 4 ± 16 − 24
r1, 2 = =
2(1) 2
− 4 ± − 8 − 4 ± j2 2
r1, 2 = =
2 2
r1, 2 = −2 ± j 2 ⇒ r1 = −2 + j 2 and r2 = −2 − j 2

⇒ α = −2 and β = 2
The solution is

y = e −2 x (C1 cos 2 x + C2 sin 2 x)

61
98
d2y
(d) + 4y = 0
dx 2
The characteristic equation is

D2 + 4 = 0
( D − j 2)( D + j 2) = 0 ⇒ r1 = j 2 and r2 = − j 2
⇒ α = 0 and β = 2
The solution is
y = C1 cos 2 x + C2 sin 2 x

Exercises

Find the solution of the following Differential Equations


1) y′′ − 4 y′ + 3 y = 0 2) y′′ − 16 y = 0
3) y′′ + 16 y = 0 4) y′′ − y′ − 6 y = 0
5) y′′ + 2 y′ = 0 6) y′′ − 2 y′ + 2 y = 0
7) y′′ + ω 2 y = 0 , (ω ≠ 0 ) 8) y′′ + 4 y′ + 5 y = 0
9) y′′ − y = 0 , y (0) = 6 , y′(0) = −4 10) y′′ − 9 y = 0 , y (0) = 2 , y′(0) = 0
11) y′′ − 4 y′ + 3 y = 0 , y (0) = −1, 12) y′′ − 3 y′ + 2 y = 0 , y (0) = −1,
y′(0) = −5 y′(0) = 0
13) y′′ + 2 y′ + 2 y = 0 14) 4 y ′′ + 4 y ′ + y = 0

15) y′′ − 9 y = 0 16) y′′ + 6 y′ + 12 y = 0


17) y′′ − 4 y′ = 0 18) 4 y ′′ + 4 y ′ + 17 y = 0

62
99
Second Order Non-homogeneous Linear Equations
Now, we solve non-homogeneous equations of the form

d2y dy
+ 2 a + by = F ( x)
dx 2 dx
The procedure has three basic steps. First, we find the homogeneous solution yh

( h stands for “homogeneous”) of the reduced equation

d2y dy
2
+ 2a + by = 0
dx dx
Second, we find a particular solution y p of the complete equation. Finally, we add

y p to yh to form the general solution of the complete equation. So, the final solution is
y = yh + y p

Variation of Parameters
This method assumes we already know the homogeneous solution
yh = C1u1 ( x) + C2u 2 ( x)
The method consists of replacing the constants C1 and C2 by functions v1 ( x) and

v2 ( x) and then requiring that the new expression


yh = v1u1 + v2u2
and by solving the following two equations
v1′u1 + v2′ u2 = 0
v1′u1′ + v2′ u ′2 = F ( x)
for the unknown functions v1′ and v2′ using the following matrix notation

63
100
⎡u1 u2 ⎤ ⎡ v1′ ⎤ ⎡ 0 ⎤
⎢u ′ u′ ⎥ ⎢v′ ⎥ = ⎢ F ( x)⎥
⎣ 1 2 ⎦⎣ 2 ⎦ ⎣ ⎦

Finally v1 and v2 can be found by integration.


In applying the method of variation of parameters to find the particular solution,
the following steps are taken:
i. Find v1′ and v2′ using the following equations

0 u2 u1 0
F ( x) u ′2 − u2 F ( x) u ′ F ( x) u1 F ( x)
v1′ = = , v2′ = 1 =
u1 u2 D u1 u2 D
u1′ u ′2 u1′ u2′

u1 u2
where D=
u1′ u2′
ii. Integrate v1′ and v2′ to find v1 and v2 .
iii. Write the particular solution as
y p = v1u1 + v2u2

Example

d2y dy
Solve the equation + 2 − 3y = 6
dx 2 dx
Solution
The homogeneous solution yh can be found using the reduced equation

d2y dy
+ 2 − 3y = 0
dx 2 dx

64
101
The characteristic equation is D + 2 D − 3 = 0 and the roots of this equation are
2

r1 = −3 and r2 = 1 , so
yh = C1e −3 x + C2 e x

Then u1 = e −3 x , u2 = e x

e −3 x ex
D= = e −2 x + 3e −2 x = 4e −2 x
− 3e −3 x e x

0 ex e −3 x 0
6 e x − 6e x 3 3x − 3e −3 x 6 6e −3 x 3 − x
v1′ = = = − e , v2′ = = −2 x = e
4e −2 x 4e −2 x 2 4e −2 x 4e 2
3 1 3 3
v1 = ∫ − e3 x dx = − e3 x , v2 = ∫ e − x dx = − e − x
2 2 2 2
⎛ 1 ⎞ ⎛ 3 ⎞
y p = v1u1 + v2u2 = ⎜ − e3 x ⎟e −3 x + ⎜ − e − x ⎟e x = −2
⎝ 2 ⎠ ⎝ 2 ⎠
y = yh + y p = C1e −3 x + C2 e x − 2

Example

Solve the equation y ′′ − 2 y ′ + y = e ln( x )


x

Solution
The homogeneous solution yh can be found using the reduced equation

y′′ − 2 y′ + y = 0
The characteristic equation is

D 2 − 2D + 1 = 0
65
102
( D − 1) 2 = 0
The roots are r1 = r2 = 1
The solution is yh = (C1 x + C2 )e x

yh = C1 xe x + C2 e x

From that we have u1 ( x) = xe , and u 2 ( x) = e .


x x

xe x ex
D= = xe 2 x − ( xe 2 x + e 2 x ) = −e 2 x
xe x + e x ex

0 ex
e x ln( x) e x − ln( x)e 2 x
v1′ = = = ln( x)
− e2 x − e2 x
xe x 0
xe x + e x e x ln( x) x ln( x)e 2 x
v2′ = = = − x ln( x)
− e2 x − e2 x
v1 = ∫ ln( x)dx = x ln( x) − x

v2 = − ∫ x ln( x)dx

dx x2
u = ln(x) ⇒ du = , dv = xdx ⇒ v=
x 2
⎛ x2 x2 1 ⎞ ⎛ x2 x ⎞
v2 = −⎜⎜ ln( x) − ∫ × dx ⎟⎟ = −⎜⎜ ln( x) − ∫ dx ⎟⎟
⎝ 2 2 x ⎠ ⎝ 2 2 ⎠

⎛ x2 x2 ⎞ x2 x2
= −⎜⎜ ln( x) − ⎟⎟ = − ln( x)
⎝ 2 4⎠ 4 2

66
103
The particular solution is

⎛ x2 x2 ⎞
y p = v1u1 + v2u 2 = ( x ln( x) − x )xe + ⎜⎜ − ln( x) ⎟⎟e x
x

⎝ 4 2 ⎠
x2 x x2 x
= x e ln( x) − x e + e − e ln( x)
2 x 2 x

4 2
x2 x 3x 2 x
= e ln( x) − e
2 4
The complete solution is

x2 x 3x 2 x
y = yh + y p = C1 xe + C2 e + e ln( x) −
x x
e
2 4

Undetermined Coefficients
This method gives us the particular solution for selected equations.

The Method of Undetermined Coefficients for Selected Equations of the Form

d2y dy
+ 2 a + by = F ( x)
dx 2 dx
If F (x) has a term of The expression for y p

A (Constant) C (Another Constant)


e rx Ae rx
sin(kx) , cos(kx) B cos(kx) + C sin( kx)
ax 2 + bx + c Dx 2 + Ex + F

67
104
Example

Solve the equation y′′ + 3 y = e


x

Solution
The homogeneous solution yh can be found using the reduced equation

y′′ + 3 y = 0
The characteristic equation is

D2 + 3 = 0
The roots are r1 = j 3 , and r2 = − j 3 ⇒ α = 0 and β = 3
So, yh = C1 cos( 3x) + C2 sin( 3x)

Since F ( x) = e then let y p = Ae ⇒ y′p = Ae ⇒ y′p′ = Ae


x x x x

Substituting into the differential equation y ′′ + 3 y = e we get


x

1
Ae x + 3 Ae x = e x ⇒ A + 3 A = 1 ⇒ A =
4
1
So, yp = ex
4
And the complete solution is
1
y = C1 cos( 3x) + C2 sin( 3x) + e x
4

Important Note
The expression used for y p should not have any term similar to the terms of the

homogeneous solution. Otherwise, multiply the term that is similar to the homogeneous
solution repeatedly by x until it becomes different.

68
105
Example

Solve the equation y′′ − 3 y′ + 2 y = 5e


x

Solution
The homogeneous solution yh can be found using the reduced equation

y′′ − 3 y′ + 2 y = 0
The characteristic equation is

D 2 − 3D + 2 = 0
( D − 1)( D − 2) = 0
The roots are r1 = 1, and r2 = 2
yh = C1e x + C2 e 2 x

Since F ( x) = 5e then let y p = Ae ⇒ y′p = Ae ⇒ y′p′ = Ae


x x x x

Substituting into the differential equation y′′ − 3 y′ + 2 y = 5e we get


x

Ae x − 3 Ae x + 2 Ae x = 5e x
0 = 5e x (Wrong Answer)
x
The trouble can be traced to the fact that e is already a solution in the

homogeneous equation yh = C1e + C2 e .


x 2x

x
The appropriate way is to modify the particular solution to replace Ae by

y p = Axe x

y′p = Axe x + Ae x

y′p′ = Axe x + Ae x + Ae x = Axe x + 2 Ae x

Substituting into the differential equation y′′ − 3 y′ + 2 y = 5e we get


x

(Axe x
+ 2 Ae x ) − 3(Axe x + Ae x ) + 2 Axe x = 5e x
69
106
− Ae x = 5e x
⇒ A = −5
So, y p = −5 xe x
The complete solution (general solution) is

y = C1e x + C2 e 2 x − 5 xe x

Example
Solve the equation

(a) y′′ − 6 y ′ + 9 y = e , (b) y′′ − y′ = 5e − sin( 2 x)


3x x

(c) y′′ − y′ − 2 y = 4 x
3

Solution
(a) The homogeneous solution yh can be found using the reduced equation

y′′ − 6 y′ + 9 y = 0
The characteristic equation is

D 2 − 6D + 9 = 0
( D − 3) 2 = 0
The roots are r1 = r2 = 3
yh = (C1 x + C2 )e3 x

Since F ( x) = e then let y p = Ae . But, Ae


3x 3x 3x
is similar to the second term of the

homogeneous solution so, let y p = Axe . Again Axe


3x 3x
is also similar to the first

term of the homogeneous solution. Finally, let

y p = Ax 2 e3 x ⇒ y′p = 3 Ax 2 e 3 x + 2 Axe3 x
70
107
y′p′ = (9 Ax 2 e 3 x + 6 Axe3 x ) + (6 Axe3 x + 2 Ae3 x )

= 9 Ax 2 e3 x + 12 Axe3 x + 2 Ae3 x
Substituting into the differential equation y′′ − 6 y′ + 9 y = e
3x
we get

(9 Ax e
2 3x
+ 12 Axe3 x + 2 Ae3 x ) − 6(3 Ax 2 e 3 x + 2 Axe3 x ) + 9 Ax 2 e 3 x = e 3 x
2 Ae3 x = e 3 x
⇒ 2A =1
1
⇒ A=
2
1 2 3x
So, yp = xe
2
1
The general solution is y = (C1 x + C2 )e3 x + x 2 e 3 x
2

(b) The homogeneous solution yh can be found using the reduced equation

y′′ − y′ = 0
The characteristic equation is

D2 − D = 0
D( D − 1) = 0
The roots are r1 = 1, and r2 = 0
yh = C1e x + C2

Since F ( x) = 5e − sin( 2 x) then let y p = Ae + B cos(2 x) + C sin( 2 x) . But,


x x

Ae x is similar to the first term of the homogeneous solution so, let

71
108
y p = Axe x + B cos(2 x) + C sin( 2 x)

y′p = Axe x + Ae x − 2 B sin( 2 x) + 2C cos(2 x)

y′p′ = Axe x + Ae x + Ae x − 4 B cos(2 x) − 4C sin( 2 x)

= Axe x + 2 Ae x − 4 B cos(2 x) − 4C sin( 2 x)

Substituting into the differential equation y′′ − y′ = 5e − sin( 2 x) we get


x

(Axe + 2 Ae − 4B cos(2 x) − 4C sin(2 x))


x x

− ( Axe + Ae − 2 B sin( 2 x) + 2C cos(2 x) ) = 5e


x x x
− sin( 2 x)

Ae x − (4 B + 2C ) cos(2 x) + (2 B − 4C ) sin( 2 x) = 5e x − sin( 2 x)


⇒ A = 5, (4 B + 2C ) = 0 , (2 B − 4C ) = −1
1 1
or A = 5, B=− , C=
10 5
1 1
So, y p = 5 xe x − cos(2 x) + sin( 2 x)
10 5
The general solution is
1 1
y = yh + y p = C1e x + C2 + 5 xe x − cos(2 x) + sin( 2 x)
10 5

(c) The homogeneous solution yh can be found using the reduced equation

y′′ − y′ − 2 y = 0
The characteristic equation is

D2 − D − 2 = 0

72
109
( D − 2)( D + 1) = 0
The roots are r1 = 2 , and r2 = −1
yh = C1e 2 x + C2 e − x

Since F ( x) = 4 x then let


3

y p = Ax 3 + Bx 2 + Cx + D ⇒ y′p = 3 Ax 2 + 2 Bx + C
y′p′ = 6 Ax + 2 B

Substituting into the differential equation y′′ − y′ − 2 y = 4 x we get


3

6 Ax + 2 B − (3 Ax 2 + 2 Bx + C ) − 2(Ax 3 + Bx 2 + Cx + D ) = 4 x 3
− 2 Ax 3 − (3 A + 2 B )x 2 + (6 A − 2 B − 2C )x + (2 B − C − 2 D ) = 4 x 3
⇒ A = −2
3 A + 2 B = 0 ⇒ 3(−2) + 2 B = 0 ⇒ B = 3
6 A − 2 B − 2C = 0 ⇒ 6(−2) − 2(3) − 2C = 0 ⇒ C = −9
15
2B − C − 2D = 0 ⇒ 2(3) − (−9) − 2 D = 0 ⇒ D=
2
So, y p = −2 x 3 + 3 x 2 − 9 x + 7.5

The general solution is

y = C1e 2 x + C2 e − x − 2 x 3 + 3 x 2 − 9 x + 7.5

73

110
Example

¾ y′′ = 9 x + 2 x − 1
2

D 2 = 0 ⇒ r1 = r2 = 0 ⇒ yh = C1 x + C2

y p = x 2 ( Ax 2 + Bx + C )

¾ y′′ − y ′ = x

D2 − D = 0
D ( D − 1) = 0 ⇒ r1 = 0 and r2 = 1 ⇒ yh = C1 + C2 e x
y p = x( Ax + B )

¾ y′′ − 5 y = 3e − 2 x + 1
x

D2 − 5 = 0
( D − 5 )( D + 5 ) = 0 ⇒ r1 = 5 and r2 = − 5
yh = C1e 5x
+ C2 e − 5x

y p = Ae x + Bx + C

¾ y′′ − 4 y′ + 3 y = e +2
3x

D 2 − 4D + 3 = 0
( D − 3)( D − 1) = 0 ⇒ r1 = 3 and r2 = 1 ⇒ yh = C1e3 x + C2 e x
y p = Axe3 x + B

111
74
¾ y′′ + y = 6e + 6 cos( x )
x

D 2 + 1 = 0 ⇒ r1 = j and r2 = − j ⇒ α = 0 , β = 1
yh = C1 cos( x) + C2 sin( x)

y p = Ae 3 x + x(B cos( x) + C sin( x) )

¾ y′′ − 2 y′ + y = xe
x

D 2 − 2D + 1 = 0
( D − 1) 2 = 0 ⇒ r1 = r2 = 1 ⇒ yh = (C1 x + C2 )e x

y p = ( Ax + B )( x 2 e x )

¾ y′′ + y = x sin( 2 x )
2

D 2 + 1 = 0 ⇒ r1 = j and r2 = − j ⇒ α = 0 , β = 1
yh = C1 cos( x) + C2 sin( x)

y p = (Ax 2 + Bx + C ) (cos(2 x) + sin( 2 x) )

Notes:

To find the roots of an equation x n + a1 x n−1 + a2 x n−2 + ... + an−1 x + an = 0


¾ r is a root of f ( x) if f ( r ) = 0 .

¾ r is a repeated root of f ( x) if f ′(r ) = 0 .

¾ If r is a root then r must be a factor of an .

¾ If r is a root then f ( x) is divided by ( x − r ) .

112
75
Example

¾ x + 4 x − 3 x − 18 = 0
3 2

Factors of 18 are: (± 1, ± 2, ± 3, ± 6, ± 9, ± 18)


f (1) = (1) 3 + 4(1) 2 − 3(1) − 18 = −16 ≠ 0
f (−1) = (−1) 3 + 4(−1) 2 − 3(−1) − 18 = −12 ≠ 0
f (2) = (2) 3 + 4( 2) 2 − 3(2) − 18 = 0 ⇒ r1 = 2 .
f ′( x) = 3 x 2 + 8 x − 3
f ′( 2) = 3(2) 2 + 8( 2) − 3 = 25 ≠ 0 ⇒ r1 = 2 is not a repeated root.

x2 + 6x +9
x −2 x3 + 4 x 2 − 3x − 18
m x3 ± 2 x 2
6x 2 − 3x
m 6x2 ± 12 x
9 x − 18
m 9 x ± 18
0 0

x2 + 6x + 9 = 0 ⇒ ( x + 3)2 = 0 ⇒ r2 = r3 = −3 .

Higher Order Differential Equation


A general differential equation can be put in the form

an y ( n ) + an−1 y ( n−1) + ... + a1 y′ + a0 y = F ( x)

113
76
Homogeneous Higher Order Differential Equation
It is homogeneous if F ( x) = 0

Example
y′′′ − 6 y′′ + 11 y′ − 6 y = 0
D 3 − 6 D 2 + 11D − 6 = 0
Factors of 6 are: (± 1, ± 2, ± 3, ± 6 ) .
f (1) = (1) 3 − 6(1) 2 + 11(1) − 6 = 0 ⇒ r1 = 1.
f ′( D) = 3D 2 − 12 D + 11
f ′(1) = 3(1) 2 − 12(1) + 11 = 2 ≠ 0 ⇒ r1 = 1 is not a repeated root.

D 2 − 5D +6
D −1 D3 − 6D 2 + 11D − 6
m D3 ± D 2
− 5D 2 + 11D
± 5D 2 m 5D
6D − 6
m 6D ± 6
0 0

D 2 − 5D + 6 = 0
( D − 2)( D − 3) = 0 ⇒ r2 = 2 and r3 = 3

yh = C1e + C2 e + C3 e
r 1x r 2x r 3x

yh = C1e x + C2 e 2 x + C3e 3 x

114
77
Example

y′′′ − 6 y′′ + 2 y′ + 36 y = 0 ⇒ D 3 − 6 D 2 + 2 D + 36 = 0
Factors of 36 are: (± 1, ± 2, ± 3, . . .)
f (1) = (1) 3 − 6(1) 2 + 2(1) + 36 = 33 ≠ 0
f (−1) = (−1) 3 − 6(−1) 2 + 2(−1) + 36 = 27 ≠ 0
f (2) = (2) 3 − 6(2) 2 + 2(2) + 36 = 24 ≠ 0
f (−2) = (−2) 3 − 6(−2) 2 + 2(−2) + 36 = 0 ⇒ r1 = −2
f ′( D) = 3D 2 − 12 D + 2
f ′(−2) = 3(−2) 2 − 12(−2) + 2 = 38 ≠ 0 ⇒ r1 = −2 is not a repeated root.
D 2 − 8D + 18
D +2 D 3 − 6D + 2 D + 36
2

m D3 m 2D 2
− 8D 2 + 2 D
± 8D 2 ± 16 D
18D + 36
m 18D m 36
0 0
D 2 − 8 D + 18 = 0
− B m B 2 − 4 AC 8 m (8) 2 − 4(1)(18) 8 m 64 − 72
r2,3 = = =
2A 2(1) 2
r2,3 = 4 m j 2 ⇒ r2 = 4 + j 2 & r3 = 4 − j 2

⇒ α =4 & β= 2
yh = C1e + eαx (C2 cos(β x ) + C3 sin (β x ))
r 1x

( ( )
yh = C1e −2 x + e 4 x C2 cos 2 x + C3 sin 2 x ( ))

115
78
Example
y′′′ + 3 y′′ + 3 y′ + y = 0
D 3 + 3D 2 + 3D + 1 = 0
Factors of 1 are: ± 1

f (1) = (1) 3 + 3(1) 2 + 3(1) + 1 = 8 ≠ 0


f (−1) = (−1) 3 + 3(−1) 2 + 3(−1) + 1 = 0 ⇒ r1 = −1
f ′( D) = 3D 2 + 6 D + 3
f ′(−1) = 3(−1) 2 + 6(−1) + 3 = 0 ⇒ r2 = −1
f ′′( D) = 6 D + 6
f ′′(−1) = 6( −1) + 6 = 0 ⇒ r3 = −1

yh = C1e + C2 e + C3e
r 1x r 2x r 3x

yh = C1e − x + C2 xe − x + C3 x 2 e − x

Example

y ( 4 ) + 8 y′′ + 16 y = 0
D 4 + 8 D 2 + 16 = 0
(D 2
+ 4) = 0
2

r12, 2 = −4 ⇒ r1, 2 = ± j 2 ⇒ α1 = 0 & β 1= 2


r32, 4 = −4 ⇒ r3, 4 = ± j 2 ⇒ α 2 = 0 & β 2= 2
y h = eα1x (C1 cos(β1 x ) + C2 sin (β1 x )) + eα 2 x (C3 cos(β 2 x ) + C4 sin (β 2 x ))
yh = (C1 cos(2 x ) + C2 sin (2 x )) + x(C3 cos(2 x ) + C4 sin (2 x ))

116
79
Example

y ( 4 ) + 8 y′′′ + 24 y′′ + 32 y′ + 16 y = 0
D 4 + 8 D 3 + 24 D 2 + 32 D + 16 = 0
Factors of 16 are: (± 1, ± 2, ± 4, ± 8, ± 16 )
f (−1) = (−1) 4 + 8(−1) 3 + 24(−1) 2 + 32(−1) + 16 = 1 ≠ 0
f (−2) = (−2) 4 + 8( −2) 3 + 24(−2) 2 + 32(−2) + 16 = 0 ⇒ r1 = −2
f ′( D) = 4 D 3 + 24 D 2 + 48 D + 32
f ′( −2) = 4( −2) 3 + 24(−2) 2 + 48(−2) + 32 = 0 ⇒ r2 = −2
f ′′( D ) = 12 D 2 + 48 D + 48
f ′′(−2) = 12(−2) 2 + 48(−2) + 48 = 0 ⇒ r3 = −2
f ′′′( D) = 24 D + 48
f ′′′(−2) = 24(−2) + 48 = 0 ⇒ r4 = −2
yh = C1e + C2 e + C3 e + C4 e
r 1x r 2x r 3x r 4x

yh = C1e −2 x + C2 xe −2 x + C3 x 2 e −2 x + C4 x 3e −2 x

Non-homogeneous Higher Order Differential Equation


A differential equation that has the form

an y ( n ) + an−1 y ( n−1) + ... + a1 y′ + a0 y = F ( x)


The solution is
y = yh + y p

117
80
Example
y′′′ + y′ = sec(x)
First of all we find the homogeneous solution, i.e.,
y′′′ + y′ = 0
D3 + D = 0
D ( D 2 + 1) = 0 ⇒ r1 = 0 ,
⇒ r2,3 = ± j ⇒ α = 0 & β =1

yh = C1e + eαx (C2 sin (β x ) + C3 cos(β x ))


r 1x

yh = C1 + C2 sin ( x ) + C3 cos( x )

Now, we find the particular solution with F ( x ) = sec( x )

y p = v1u1 + v2u 2 + v3u3


u1 = 1, u 2 = sin( x) , u3 = cos( x)
D1 D D3
v1 = ∫ dx , v2 = ∫ 2 dx , v3 = ∫ dx
Det Det Det
u1 u2 u3 0 u 2 u3
Det = u1′ u′2 u3′ , D1 = 0 u2′ u3′ ,
u1′′ u2′′ u3′′ F ( x) u2′′ u3′′
u1 0 u3 u1 u2 0
D2 = u1′ 0 u3′ , D3 = u1′ u2′ 0
u1′′ F ( x) u3′′ u1′′ u2′′ F ( x)

11881
1 sin( x) cos( x)
cos( x) − sin( x)
Det = 0 cos( x) − sin( x) = +1
− sin( x) − cos( x)
0 − sin( x) − cos( x)

Det = − cos 2 ( x) − sin 2 ( x) = −(cos 2 ( x) + sin 2 ( x) ) = −1

0 sin( x) cos( x)
sin( x) cos( x)
D1 = 0 − sin( x) = + sec( x)
cos( x)
cos( x) − sin( x)
sec( x) − sin( x) − cos( x)

= sec( x)(− sin 2 ( x) − cos 2 ( x) ) = sec( x) × (−1) = − sec( x)

1 0 cos( x)
0 − sin( x)
D2 = 0 0 − sin( x) = +1
sec( x) − cos( x)
0 sec( x) − cos( x)
= sin( x) × sec( x) = tan( x)

1 sin( x) 0
cos( x) 0
D3 = 0 cos( x) 0 = +1
− sin( x) sec( x)
0 − sin( x) sec( x)
= cos( x) × sec( x) = 1

D1 sec( x) + tan( x)
v1 = ∫ dx = ∫ sec( x)dx = ∫ sec( x) × dx
D sec( x) + tan( x)
sec 2 ( x) + sec( x) tan( x)
=∫ dx = ln sec( x) + tan( x)
sec( x) + tan( x)

119
82
D2 sin( x)
v2 = ∫ dx = − ∫ tan( x)dx = − ∫ dx = ln cos( x)
D cos( x)
D3
v3 = ∫ dx = − ∫ dx = − x
D
y p = v1u1 + v2u 2 + v3u3

= ln sec( x) + tan( x) + (ln cos( x) )sin( x) − x cos( x)

The general (complete) solution is


y = yh + y p

= C1 + C2 sin ( x ) + C3 cos( x ) + ln sec( x) + tan( x) + (ln cos( x) )sin( x) − x cos( x)

Example

y′′′ − y′ = 4 x 3 + 6 x 2
The homogeneous solution is found by solving y′′′ − y′ = 0

D3 − D = 0 ⇒ D ( D 2 − 1) = 0
D ( D − 1)( D + 1) = 0 ⇒ r1 = 0 , r2 = 1 & r3 = −1

yh = C1 + C2 e x + C3e − x

To find the particular solution, let

y p = x(Ax 3 + Bx 2 + Cx + D ) = Ax 4 + Bx 3 + Cx 2 + Dx

y′p = 4 Ax 3 + 3Bx 2 + 2Cx + D ⇒ y′p′ = 12 Ax 2 + 6 Bx + 2C


y′p′′ = 24 Ax + 6 B

120
83
(24 Ax + 6 B ) − (4 Ax 3 + 3Bx 2 + 2Cx + D ) = 4 x 3 + 6 x 2
− 4A = 4 ⇒ A = −1
− 3B = 6 ⇒ B = −2
24 A − 2C = 0 ⇒ 24(−1) − 2C = 0 ⇒ C = −12
6B − D = 0 ⇒ 6(−2) − D = 0 ⇒ D = −12
⇒ y p = − x 4 − 2 x 3 − 12 x 2 − 12 x

The general solution is

y = yh + y p = C1 + C2 e x + C3e − x − x 4 − 2 x 3 − 12 x 2 − 12 x

Example

y ( 4 ) − 8 y′′ + 16 y = −18 sin( x)


The homogeneous solution is found using

y ( 4 ) − 8 y′′ + 16 y = 0 ⇒ D 4 − 8 D 2 + 16 = 0

(D 2
− 4) = 0
2
⇒ r1, 2 = ±2 & r3, 4 = ±2

yh = C1e 2 x + C2 e −2 x + C3 xe 2 x + C4 xe −2 x

To find the particular solution, let


y p = A cos( x) + B sin( x) ⇒ y′p = − A sin( x) + B cos( x)
y′p′ = − A cos( x) − B sin( x) ⇒ y′p′′ = A sin( x) − B cos( x)

y (p4 ) = A cos( x) + B sin( x)

121
84
( A cos( x) + B sin( x) ) − 8(− A cos( x) − B sin( x) )
+ 16( A cos( x) + B sin( x) ) = −18 sin( x)
( A + 8 A + 16 A) cos( x) + (B + 8B + 16 B )sin( x) = −18 sin( x)
⇒ 25 A = 0 ⇒ A=0
− 18
⇒ 25B = −18 ⇒ B =
25
18
⇒ yp = − sin( x)
25
18
y = yh + y p = C1e 2 x + C2 e −2 x + C3 xe 2 x + C4 xe −2 x − sin( x)
25

Exercises
Find the solution of the following Differential Equations
1) y′′ + y = 3 x 2 2) y′′ + 2 y′ + y = x 2
3) y′′ + 2 y′ + 3 y = 27 x 4) y′′ + y = −30 sin(4 x)
5) y′′ + y = 6 sin( x) 6) y′′ + 4 y′ + 3 y = sin( x) + 2 cos( x)
7) y′′ + 4 y′ + 4 y = 18 cosh( x) 8) y′′ − 2 y′ + 2 y = 2e x cos( x)
9) y ( 4 ) − 5 y′′ + 4 y = 10 cos( x) 10) y′′ + y′ − 2 y = 3e x
11) y′′ + y = x 2 + x 12) y′′ − y = e x
13) y′′ − 2 y′ + y = e x 14) y′′ + y′ + y = x 4 + 4 x 3 + 12 x 2
15) y′′′ + 2 y′′ − y′ − 2 y = 1 − 4 x 3 16) y′′ − 2 y′ + 2 y = 2e x cos( x)

122

85
Unit Step Function
The unit step function u a (t ) can be 1
defined as
⎧0 t<a a
ua (t ) = ⎨
⎩1 t>a

1
⎧0 t<0
u0 (t ) = ⎨
⎩1 t >0

Example
Express the following functions in terms of the unit step function

⎧0 t<a
⎧8 t<2 ⎪
(a) f (t ) = ⎨ (b) f (t ) = ⎨ K a<t <b
⎩6 t>2 ⎪0
⎩ t >b
Solution
⎧0 t<2 ⎧0 t<2
(a) f (t ) = 8 + ⎨ = 8 − 2⎨ = 8 − 2u2 (t )
⎩− 2 t>2 ⎩1 t>2

(b) f (t ) = K [u a (t ) − ub (t )]

⎧0 t<a ⎧0 t <b
where u a (t ) = ⎨ and ub (t ) = ⎨
⎩1 t>a ⎩1 t >b

123

You might also like