ODE Notes1

You might also like

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

Differential Equations (MTH401) VU

3 Separable Equations
The differential equation of the form
dy
= f ( x, y )
dx
is called separable if it can be written in the form
dy
= h( x) g ( y )
dx
3.1 Solution steps of Separable Equations
To solve a separable equation, we perform the following steps:
1. We solve the equation g ( y ) = 0 to find the constant solutions of the equation.
2. For non-constant solutions we write the equation in the form.
dy
= h( x) dx
g ( y)
⌠ 1
Then integrate 

dy = ∫ h( x) dx
⌡ g ( y)
to obtain a solution of the form
G ( y ) = H ( x) + C
3. We list the entire constant and the non-constant solutions to avoid repetition..
4. If you are given an IVP, use the initial condition to find the particular solution.
Note that:
(a) No need to use two constants of integration because C1 − C 2 = C .
(b) The constants of integration may be relabeled in a convenient way.
(c) Since a particular solution may coincide with a constant solution, step 3 is
important.

Example 1:
dy y 2 − 1
Find the particular solution of = , y (1) = 2
dx x
Solution:

1. By solving the equation: y 2 − 1 = 0 ,We obtain the constant solutions: y = ±1


dy dx
2. Rewrite the equation as =
y 2 −1 x
Resolving into partial fractions and integrating, we obtain
1⌠ 1 1 
dy = ⌠
1
  −   dx
2 ⌡  y − 1 y + 1 ⌡x

© Copyright Virtual University of Pakistan 6


Differential Equations (MTH401) VU

Integration of rational functions, we get


1 | y −1 |
ln = ln | x | +C
2 | y +1|
3. The solutions to the given differential equation are
1 | y −1 |
 ln = ln | x | +C
2 | y +1|
 y = ±1
4. Since the constant solutions do not satisfy the initial condition, we plug in the
condition
y = 2 When x = 1 in the solution found in step 2 to find the value of C .

1 1
ln  = C
2  3
The above implicit solution can be rewritten in an explicit form as:
3 + x2
y=
3 − x2
Example 2:
dy 1
Solve the differential equation = 1+ 2
dt y
Solution:
1
1. We find roots of the equation to find constant solutions; 1 + =0
y2
No constant solutions exist because the equation has no real roots.
2. For non-constant solutions, we separate the variables and integrate
⌠ dy
 = ∫ dt
⌡ 1 + 1/ y
2

1 y2 1
Since = 2 = 1− 2
1 + 1/ y 2
y +1 y +1
⌠ dy
Thus  = y − tan −1 ( y )
⌡ 1 + 1/ y
2

−1
So that y − tan ( y ) = t + C
It is not easy to find the solution in an explicit form i.e. y as a function of t.
3. Since no constant solutions, all solutions are given by the implicit equation
found in step 2.
Example 3:
dy
Solve the initial value problem = 1 + t 2 + y 2 + t 2 y 2 , y( 0 ) = 1
dt

© Copyright Virtual University of Pakistan 7


Differential Equations (MTH401) VU

Solution:
1. Since 1 + t + y + t y = (1 + t )(1 + y )
2 2 2 2 2 2

The equation is separable & has no constant solutions because no real roots of
1+ y2 = 0.
2. For non-constant solutions we separate the variables and integrate.
dy
= (1 + t 2 ) dt
1+ y 2

⌠ dy
 = ∫ (1 + t 2 )dt
⌡ 1+ y
2

−1 t3
tan ( y ) = t + + C
3
Which can be written as
 t3 
y = tan  t + + C 
 3 
3. Since no constant solutions, all solutions are given by the implicit or explicit
equation.

4. The initial condition y (0) = 1 gives


π
C = tan −1 (1) =
4
The particular solution to the initial value problem is
−1 t3 π
tan ( y ) = t + +
3 4
 t3 π 
or in the explicit form y = tan  t + + 
 3 4
Example 4:
Solve (1 + x )dy − ydx = 0
Solution:
Dividing with (1 + x ) y , we can write the given equation as

dy y
=
dx (1 + x )
1. The only constant solution is y = 0
2. For non-constant solution we separate the variables

© Copyright Virtual University of Pakistan 8


Differential Equations (MTH401) VU

dy dx
=
y 1+ x
Integrating both sides, we have
⌠ dy ⌠ dx
 =
⌡ y ⌡ 1+ x

ln y = ln 1 + x + c1
ln|1+ x|+c1 ln|1+ x| c1
y=e =e .e

or y = |1+ x | e
c1
== ± e
c1
(1 + x )
c
y = C (1 + x ) , C = ± e 1

If we use ln | c | instead of c1 then the solution can be written as


ln | y |= ln | 1 + x | + ln | c |
or ln | y |= ln c(1 + x )
So that y = c(1 + x ) .
3. The solutions to the given equation are
y = c(1 + x )
y = 0
Example 5

( )
Solve xy 4 dx + y 2 + 2 e −3 x dy = 0 .

dy   y4 
Solution: The differential equation can be written as =  − xe 3x   2 
dx    y + 2 
y4
1. Since ⇒ y = 0 . Therefore, the only constant solution is y = 0.
y2 + 2
2. We separate the variables
y2 + 2
xe 3 x dx + 4
(
dy = 0 or xe 3 x dx + y − 2 + 2 y − 4 dy = 0 )
y
Integrating, with use integration by parts by parts on the first term, yields
1 3x 1 3x 2
xe − e − y −1 − y −3 = c1
3 9 3

© Copyright Virtual University of Pakistan 9


Differential Equations (MTH401) VU

9 6
e 3 x (3 x − 1) = + + c where 9c1 = c
y y3
9 6
e 3 x (3 x − 1) =+ +c
3. All the solutions are: y y3
y = 0

Example 6: Solve the initial value problems

dy dy
= ( y − 1) , y (0) = 1 = ( y − 1) , y (0) = 1.01
2 2
(a) (b)
dx dx
and compare the solutions.
Solutions:
1. Since ( y − 1) 2 = 0 ⇒ y = 1 . Therefore, the only constant solution is y = 0 .
2. We separate the variables
dy
= dx or ( y-1) dy = dx
−2

( y − 1) 2

Integrating both sides we have

∫ ( y − 1) dy = ∫ dx
−2

( y − 1)− 2 + 1 = x + c
− 2 +1
1
or − = x+c
y −1
3. All the solutions of the equation are
1
− = x+c
y −1
y = 1
4. We plug in the conditions to find particular solutions of both the problems

(a) y (0 ) = 1 ⇒ y = 1 when x = 0 . So we have


1 1
− = 0 + c ⇒ c = − ⇒ c = −∞
1−1 0
The particular solution is

© Copyright Virtual University of Pakistan 10


Differential Equations (MTH401) VU

1
− = −∞ ⇒ y − 1 = 0
y −1

So that the solution is y = 1 , which is same as constant solution.


(b) y (0 ) = 1.01 ⇒ y = 1.01 when x = 0 . So we have
1
− = 0 + c ⇒ c = −100
1.01 − 1
So that solution of the problem is
1 1
− = x − 100 ⇒ y = 1 +
y −1 100 − x
5. Comparison: A radical change in the solutions of the differential equation has
Occurred corresponding to a very small change in the condition!!

Example 7:
Solve the initial value problems

dy dy
= ( y − 1) + 0.01, = ( y − 1) − 0.01, y (0) = 1.
2
y (0) = 1
2
(a) (b)
dx dx

Solution:

(a) First consider the problem

dy
= ( y − 1) + 0.01, y (0) = 1
2

dx

We separate the variables to find the non-constant solutions

dy
= dx
( )
0.01 + ( y − 1)
2 2

Integrate both sides

⌠ d ( y − 1)
 = ∫ dx
⌡ ( )
0.01 + ( y − 1)
2 2

1 y −1
So that tan −1 = x+c
0.01 0.01

© Copyright Virtual University of Pakistan 11


Differential Equations (MTH401) VU

 y −1 
tan −1   = 0.01( x + c )
 0.01 

y −1
0.01
[
= tan 0.01( x + c ) ]
or y = 1 + 0.01 tan 0.01( x + c )[ ]
Applying y (0 ) = 1 ⇒ y = 1 when x = 0 , we have

tan −1 (0 ) = 0.01(0 + c ) ⇒ 0 = c
Thus the solution of the problem is

y = 1 + 0.01 tan 0.01 x ( )


(b) Now consider the problem
dy
= ( y − 1) − 0.01, y (0) = 1.
2

dx
We separate the variables to find the non-constant solutions
dy
= dx
( )
2
( y − 1) −
2
0.01


 d ( y − 1)
 = ∫ dx
( )
2

( y − 1)
2
⌡ − 0.01

1 y − 1 − 0.01
ln = x+c
2 0.01 y − 1 + 0.01

Applying the condition y (0 ) = 1 ⇒ y = 1 when x = 0

1 − 0.01
ln =c⇒c=0
2 0.01 0.01

y − 1 − 0.01
ln = 2 0.01 x
y − 1 + 0.01

y − 1 − 0.01 e2 0.01 x
=
y − 1 + 0.01 1

© Copyright Virtual University of Pakistan 12


Differential Equations (MTH401) VU

Simplification:
a c a+b c+d
By using the property = ⇒ =
b d a −b c −d

y − 1 − 0.01 + y − 1 + 0.01 e 2 0.01x + 1


=
y − 1 − 0.01 − y + 1 − 0.01 e 2 0.01x − 1

2y − 2 e2 0.01 + 1
=
−2 0.01 e2 0.01 − 1

y −1 e 2 0.01 + 1
=
− 0.01 e 2 0.01 − 1
 e 2 0.01 + 1 
y − 1 = − 0.01 
 e 2 0.01 − 1 
 
 e 2 0.01 + 1 
y =1− 0.01 
 e 2 0.01 − 1 
 
Comparison:

The solutions of both the problems are

(a) y = 1 + 0.01 tan 0.01 x( )


 e 2 0.01 + 1 
(b) y = 1 − 0.01 
 e 2 0.01 − 1 
 
Again a radical change has occurred corresponding to a very small in the differential
equation!
3.2 Exercise
Solve the given differential equation by separation of variables.

2
dy  2 y + 3 
1. = 
dx  4 x + 5 

© Copyright Virtual University of Pakistan 13


Differential Equations (MTH401) VU

2. sec 2 xdy + csc ydx = 0

(
3. e y sin 2 xdx + cos x e 2 y − y dy = 0 )

dy xy + 3x − y − 3
4. =
dx xy − 2 x + 4 y − 8

dy xy + 2 y − x − 2
5. =
dx xy − 3 y + x − 3

6. y (4 − x 2 )2 dy = (4 + y 2 )2 dx
1 1

7. (x + x ) dy
dx
= y+ y

Solve the given differential equation subject to the indicated initial condition.

8. (e −y
)
+ 1 sin xdx = (1 + cos x )dy , y (0 ) = 0

9. (1 + x )dy + x(1 + 4 y )dx = 0 ,


4 2
y (1) = 0

( )
1
10. ydy = 4 x y 2 + 1 2 dx , y (0 ) = 1

© Copyright Virtual University of Pakistan 14


Differential Equations (MTH401) VU

4 Homogeneous Differential Equations


A differential equation of the form
dy
= f ( x, y )
dx
Is said to be homogeneous if the function f ( x, y ) is homogeneous, which means

f (tx, ty ) = t n f ( x, y ) For some real number n, for any number t .

Example 1
Determine whether the following functions are homogeneous

 xy
 f ( x, y ) = 2
 x + y2
(
 g ( x, y ) = ln − 3x 2 y /( x 3 + 4 xy 2 ) )
Solution:
The functions f ( x, y ) is homogeneous because
t 2 xy xy
f (tx, ty ) = 2 2 = = f ( x, y )
t (x + y 2 ) x 2 + y 2
Similarly, for the function g ( x, y ) we see that
 − 3t 3 x 2 y   − 3x 2 y 
g (tx, ty ) = ln 3 3 2 
 = ln 3  = g ( x, y )
2 
 t ( x + 4 xy )   x + 4 xy 
Therefore, the second function is also homogeneous.
Hence the differential equations

 dy
 dx = f ( x, y )
 dy
 = g ( x, y )
 dx

Are homogeneous differential equations

© Copyright Virtual University of Pakistan 15


Differential Equations (MTH401) VU

4.1 Method of Solution


dy
To solve the homogeneous differential equation = f ( x, y ) .We use the substitution
dx
y
v= .If f ( x, y ) is homogeneous of degree zero, then we have
x
f ( x, y ) = f (1, v) = F (v)
dv
+ v = f (1, v)
Since y ′ = xv ′ + v , the differential equation becomes x
dx
This is a separable equation. We solve and go back to old variable y through y = xv .

Summary:
1. Identify the equation as homogeneous by checking f (tx, ty ) = t f ( x, y ) ;
n

y
2. Write out the substitution v = ;
x
3. Through easy differentiation, find the new equation satisfied by the new function v ;

dv
x + v = f (1, v)
dx
4. Solve the new equation (which is always separable) to find v ;
5. Go back to the old function y through the substitution y = vx ;
6. If we have an IVP, we need to use the initial condition to find the constant of
integration.
Caution:
q Since we have to solve a separable equation, we must be careful about the
constant solutions.
q If the substitution y = vx does not reduce the equation to separable form then the
equation is not homogeneous or something is wrong along the way.
dy − 2 x + 5 y
Example 2 Solve the differential equation =
dx 2x + y
Solution:
− 2x + 5 y
Step 1. It is easy to check that the function f ( x, y ) = is a homogeneous
2x + y
function.
y
Step 2. To solve the differential equation we substitute v =
x

© Copyright Virtual University of Pakistan 16


Differential Equations (MTH401) VU

− 2 x + 5 xv − 2 + 5v
Step 3. Differentiating w.r.t x , we obtain xv′ + v = =
2 x + xv 2+v
dv 1  − 2 + 5v 
which gives =  − v
dx x  2 + v 
This is a separable. At this stage please refer to the Caution!
Step 4. Solving by separation of variables all solutions are implicitly given by

− 4 ln(| v − 2 |) + 3 ln | v − 1 |= ln(| x |) + C
Step 5. Going back to the function y through the substitution y = vx , we get

− 4 ln | y − 2 x | +3 ln | y − x | = C
y − 2x y−x
−4ln + 3ln = ln x + c
x x
−4 3
y − 2x y−x
ln + ln = ln x + ln c1 , c = ln c1
x x
( y − 2 x ) −4 ( y − x )3
ln + ln = ln c1 x
x −4 x3
( y − 2 x ) −4 ( y − x ) 3
ln . = ln c1 x
x −4 x3
( y − 2 x ) −4 ( y − x ) 3
. = c1 x
x −4 x3
x( y − 2 x) −4 ( y − x)3 = c1 x
( y − 2 x) −4 ( y − x )3 = c1

Note that the implicit equation can be rewritten as


( y − x) 3 = C1 ( y − 2 x) 4

4.2 Equations reducible to homogenous form


dy a x + b1 y + c1
The differential equation = 1
dx a 2 x + b2 y + c 2
is not homogenous. However, it can be reduced to a homogenous form as detailed below

© Copyright Virtual University of Pakistan 17


Differential Equations (MTH401) VU

4.2.1 Case 1
a1 b1
=
a2 b2

We use the substitution z = a1 x + b1 y which reduces the equation to a separable


equation in the variables x and z . Solving the resulting separable equation and
replacing z with a1 x + b1 y , we obtain the solution of the given differential equation.

4.2.2 Case 2
a1 b1

a2 b2
In this case we substitute x = X + h, y =Y + k
Where h and k are constants to be determined. Then the equation becomes

dY a X + b1Y + a1 h + b1 k + c1
= 1
dX a 2 X + b2Y + a 2 h + b2 k + c 2

We choose h and k such that

a1 h + b1k + c1 = 0 

a2 h + b2 k + c2 = 0
This reduces the equation to
dY a X + b1Y
= 1
dX a 2 X + b2Y

Which is homogenous differential equation in X and Y , and can be solved accordingly.


After having solved the last equation we come back to the old variables x and y .

Example 3
dy 2x + 3y − 1
Solve the differential equation =−
dx 2x + 3y + 2
Solution:
a1 b dy 1  dz 
Since = 1 = 1 , we substitute z = 2 x + 3 y , so that =  − 2
a2 b2 dx 3  dx 

© Copyright Virtual University of Pakistan 18


Differential Equations (MTH401) VU

1  dz  z −1 dz − z + 7
Thus the equation becomes  − 2 = − i.e. =
3  dx  z+2 dx z+2

 z+2 
This is a variable separable form, and can be written as  dz = dx
− z + 7

Integrating both sides we get − z − 9 ln ( z − 7 ) = x + A

Simplifying and replacing z with 2 x + 3 y , we obtain − ln(2 x + 3 y − 7 ) = 3 x + 3 y + A


9

or (2 x + 3 y − 7 )−9 = ce 3( x + y ) , c = eA

dy ( x + 2 y − 4)
Example 4 Solve the differential equation =
dx 2 x + y − 5
Solution: By substitution x = X + h, y = Y + k , the given differential equation
dY ( X + 2Y ) + (h + 2k − 4 )
reduces to =
dX (2 X + Y ) + (2h + k − 5)

We choose h and k such that h + 2k − 4 = 0, 2h + k − 5 = 0


Solving these equations we have h = 2 , k = 1 . Therefore, we have
dY X + 2Y
=
dX 2 X + Y
This is a homogenous equation. We substitute Y = VX to obtain
dV 1 − V 2  2 +V  dX
X = or 1 − V 2  dV =
dX 2 + V X
Resolving into partial fractions and integrating both sides we obtain
⌠ 3 1  ⌠ dX or − 3 ln (1 − V ) + 1 ln (1 + V ) = ln X + ln A
  2(1 − V ) + 2(1 + V )  dV = 
⌡ X
⌡  2 2

Simplifying and removing ( ln ) from both sides, we get (1 − V )3 / (1 + V ) = CX −2 ,


C = A −2

© Copyright Virtual University of Pakistan 19


Differential Equations (MTH401) VU

3 1
− ln (1 − V ) + ln (1 + V ) = ln X + ln A
2 2
+ ln (1 + V )
−3 1
ln(1 − V ) 2 2
= ln XA

(1 + V )
−3 1
ln(1 − V ) 2 2
= ln XA

(1 + V )
−3 1
(1 − V ) 2 2
= XA
taking power "− 2" on both sides
(1 − V ) 3 (1 + V ) = X −2 A−2
−1

Y
put V =
X
−1
Y 3 Y 
(1 − ) 1 +  = X −2 A−2
X  X
3 −1
 X −Y   X + Y  −2 −2
    =X A
 X   X 
(X −Y) 3
X −3+1 = X −2 A−2
X +Y
say , c = A−2
( X − Y )3
=c
X +Y
put X = x − 2, Y = y − 1
( x + y − 1)3 / x + y − 3 = c

Y
Now substituting V = , X = x − 2 , Y = y − 1 and simplifying, we obtain
X
(x − y − 1)3 / (x + y − 3) = C .This is solution of the given differential equation, an
implicit one.
4.3 Exercise
Solve the following Differential Equations

1. ( x 4 + y 4 )dx − 2 x 3 ydy = 0

dy y x 2
2. = + +1
dx x y 2

 −y

3.  x 2 e x
+ y 2 dx = xydy
 

© Copyright Virtual University of Pakistan 20


Differential Equations (MTH401) VU

 x 
4. ydx +  y cos − x dy = 0
 y 

( )
5. x 3 + y 2 x 2 + y 2 dx − xy x 2 + y 2 dy = 0

Solve the initial value problems

6. (3x 2 + 9 xy + 5 y 2 )dx − (6 x 2 + 4 xy )dy = 0, y ( 2) = − 6

(
7. x + y 2 − xy )dydx = y, 1
y  = 1
 2

8. (x + ye y / x )dx − xe y / x dy = 0, y (1) = 0

dy y y
9. − = cosh , y (1) = 0
dx x x

© Copyright Virtual University of Pakistan 21


Differential Equations (MTH401) VU

5 Exact Differential Equations


dy
Let us first rewrite the given differential equation = f ( x, y )
dx
into the alternative form
M ( x, y )
M ( x, y )dx + N ( x, y )dy = 0 where f ( x, y ) = −
N ( x, y )
This equation is an exact differential equation if the following condition is satisfied
∂M ∂N
=
∂y ∂x
This condition of exactness insures the existence of a function F ( x, y ) such that
∂F ∂F
= M ( x, y ) , = N ( x, y )
∂x ∂y
5.1 Method of Solution
If the given equation is exact then the solution procedure consists of the following steps:
∂M ∂N
Step 1. Check that the equation is exact by verifying the condition =
∂y ∂x
∂F
Step 2. Write down the system = M ( x, y ) , ∂F = N ( x, y )
∂x ∂y

Step 3. Integrate either the 1st equation w. r. to x or 2nd w. r. to y. If we choose the 1st

equation then F ( x, y ) = ∫ M ( x, y )dx + θ ( y ) .The function θ ( y ) is an arbitrary


function of y , integration w.r.to x ; y being constant.
Step 4. Use second equation in step 2 and the equation in step 3 to find θ ′( y ) .

∂F ∂
=
∂y ∂y
(∫ M ( x, y)dx )+ θ ′( y) = N ( x, y)

∂y ∫
θ ′( y ) = N ( x, y ) − M ( x, y )dx

Step 5. Integrate to find θ ( y ) and write down the function F (x, y);

Step 6. All the solutions are given by the implicit equation

F ( x, y ) = C
Step 7. If you are given an IVP, plug in the initial condition to find the constant C.

© Copyright Virtual University of Pakistan 22


Differential Equations (MTH401) VU

Caution: x should disappear from θ ′( y ) . Otherwise something is wrong!


( )
Example 1 Solve 3 x 2 y + 2 dx + x 3 + y dy = 0 ( )
∂M ∂N
Solution: Here M = 3 x 2 y + 2 and N = x 3 + y ⇒ = 3x 2 , = 3x 2
∂y ∂x

∂M ∂N
∴ = . Hence the equation is exact. The LHS of the equation must be an exact
∂y ∂x

∂f ∂f
differential i.e. a function f ( x, y ) such that = 3x 2 y + 2 = M and = x3 + y = N
∂x ∂y

Integrating 1st of these equations w. r. t. x, have f ( x, y ) = x 3 y + 2 x + h( y ),

where h( y ) is the constant of integration. Differentiating the above equation w. r. t. y and

∂f
using 2nd, we obtain = x 3 + h ′( y ) = x 3 + y = N
∂y

y2
Comparing h ′( y ) = y is independent of x or integrating, we have h( y ) =
2

y2
Thus f ( x, y ) = x y + 2 x +
3
.Hence the general solution of the given equation is given
2

y2
by f ( x, y ) = c i.e. x 3 y + 2 x + = c .Note that we could start with the 2nd equation
2

∂f
= x 3 + y = N to reach on the above solution of the given equation!
∂y

Example 2 Solve the initial value problem

(2 y sin x cos x + y 2
) ( )
sin x dx + sin 2 x − 2 y cos x dy = 0. , y (0) = 3.

Solution: Here M = 2 y sin x cos x + y 2 sin x and N = sin 2 x − 2 y cos x

∂M ∂N
= 2 sin x cos x + 2 y sin x, = 2 sin x cos x + 2 y sin x,
∂y ∂x

© Copyright Virtual University of Pakistan 23


Differential Equations (MTH401) VU

∂M ∂N
This implies = Thus given equation is exact.Hence there exists a function
∂y ∂x

∂f ∂f
f ( x, y ) such that = 2 y sin x cos x + y 2 sin x = M and = sin 2 x − 2 y cos x = N
∂x ∂y

Integrating 1st of these w. r. t. x, we have f ( x, y ) = y sin 2 x − y 2 cos x + h( y ),

∂f
Differentiating this equation w. r. t. y substituting in =N
∂y

sin 2 x − 2 y cos x + h ′( y ) = sin 2 x − 2 y cos x And h ′( y ) = 0 or h( y ) = c1

Hence the general solution of the given equation is f ( x, y ) = c 2

i.e. y sin 2 x − y 2 cos x = C , where C = c1 − c 2 . Now applying the initial condition that

when x = 0, y = 3, we have y 2 cos x − y sin 2 x = 9 is the required solution.

( ) (
Example 3: Solve the DE e 2 y − y cos xy dx + 2 xe 2 y − x cos x y + 2 y dy = 0 )
Solution:The equation is neither separable nor homogenous.

M (x, y ) = e 2 y − y cos xy  ∂M ∂N
As  and = 2e 2 y + xy sin xy − cos xy =
N ( x, y ) = 2 xe 2 y − x cos xy + 2 y  ∂y ∂x
Hence the given equation is exact and a function f ( x, y ) exist for which

∂f ∂f ∂f
M ( x, y ) = and N ( x, y ) = which means that = e 2 y − y cos xy and
∂x ∂y ∂x
∂f
= 2 xe 2 y − x cos xy + 2 y .Let us start with the second equation i.e.
∂y
∂f
= 2 xe 2 y − x cos xy + 2 y .Integrating both sides w.r.to y , we obtain
∂y

f ( x, y ) = 2 x ∫ e
2y
dy − x ∫ cos xydy + 2 ∫ ydy . Note that while integrating w.r.to y , x
is treated as constant. Therefore f ( x, y ) = xe − sin xy + y + h(x ) ,
2y 2

∂f
h is an arbitrary function of x . From this equation we obtain and equate it to M
∂x

© Copyright Virtual University of Pakistan 24


Differential Equations (MTH401) VU

∂f
= e 2 y − y cos xy + h′( x ) = e 2 y − y cos xy .So that h ′( x ) = 0 ⇒ h( x ) = C
∂x

Hence one-parameter family of solution is given by xe 2 y − sin xy + y 2 + c = 0


Example 4 Solve 2 xy (
dx + x 2 − 1 dy = 0 )
∂M ∂N
Solution: Clearly M ( x, y ) = 2 xy and N ( x, y ) = x 2 − 1 ⇒ = 2x =
∂y ∂x

∂f ∂f
The equation is exact and a function f (x, y ) such that = 2 xy and = x2 −1
∂x ∂y

We integrate first of these equations to obtain. f ( x, y ) = x y + g ( y )


2

∂f
Here g ( y ) is an arbitrary function y . We find and equate it to N ( x, y )
∂y
∂f
= x 2 + g ′( y ) = x 2 − 1 ⇒ g ′( y ) = −1 ⇒ g ( y ) = − y
∂y

Constant of integration need not to be included as the solution is given by f ( x, y ) = c

Hence a one-parameter family of solutions is given by x2 y − y = c


Example 5 Solve the initial value problem

(cos x sin x − xy )dx + y(1 − x )dy = 0 , y ( 0 ) = 2


2 2

M ( x, y ) = cos x. sin x − x y 2 ∂M ∂N


Solution: As  ⇒ = −2 xy =
 N ( x, y ) = (
y 1− x2 )
∂y ∂x

Therefore the equation is exact and a function f (x, y ) such that

∂f ∂f
= cos x . sin x − x y 2 and = y (1 − x 2 ) .Now integrating 2nd of these equations
∂x ∂y

w.r.t. ‘ y ’ keeping ‘ x ’constant, we obtain f ( x, y ) =


y2
2
( )
1 − x 2 + h( x )

Differentiate w.r.t. ‘ x ’ and equate the result to M ( x, y )

© Copyright Virtual University of Pakistan 25


Differential Equations (MTH401) VU

∂f
= − xy 2 + h′( x ) = cos x sin x − xy 2 ⇒ h ′(x ) = cos x sin x
∂x
1
Integrating w.r.to x , we obtain h(x ) = − ∫ (cos x )(− sin x )dx = − cos 2 x
2
Thus a one parameter family solutions of the given differential equation is

y2
2
( 1
) ( )
1 − x 2 − cos 2 x = c1 ⇒ y 1 − x − cos x = c ,where 2c1 has been
2
2 2 2

replaced by C . The initial condition y = 2 when x = 0 demand, that 4(1) − cos 2 (0) = c so
that c = 3 . Thus the solution of the initial value problem is ( )
y 2 1 − x 2 − cos 2 x = 3
5.2 Exercise
Determine whether the given equations is exact. If so, please solve.

1. (sin y − y sin x )dx + (cos x + x cos y )dy = 0

 y
2. 1 + ln x + dx = (1 − ln x )dy
 x

3. (y ln y − e )dx +  1y + ln y dy = 0


− xy

 

 1  dy y
4.  2 y − + cos 3 x  + 2 − 4 x 3 + 3 y sin 3x = 0
 x  dx x

1 1 y   x 
5.  + 2 − 2 dx +  ye y + 2
2 
dy = 0
x x x +y   x + y 2 

6. Solve the given differential equations subject to indicated initial conditions.

7. (e x
) ( )
+ y dx + 2 + x + ye y dy = 0, y (0) = 1

 3 y 2 − x 2  dy x
8.  5
 + 4 = 0, y (1) = 1
 y  dx 2 y

 1  dy
9.  + cos x − 2 xy  = y ( y + sin x), y(0) = 1
1+ y
2
 dx

© Copyright Virtual University of Pakistan 26


Differential Equations (MTH401) VU

10. Find the value of k, so that the given differential equation is exact.
( 2 xy3 − y sin xy + ky 4 ) dx − ( 20 x3 + x sin xy ) dy = 0
( ) ( )
11. 6 xy 3 + cos y dx − kx 2 y 2 − x sin y dy = 0

© Copyright Virtual University of Pakistan 27


Differential Equations (MTH401) VU

6 Integrating Factor Technique


If the equation M ( x, y ) dx + N ( x, y )dy = 0 is not exact, then we must have
∂M ∂N
≠ .Therefore, we look for a function u (x, y) such that the equation
∂y ∂x
u ( x, y ) M ( x, y )dx + u ( x, y ) N ( x, y ) dy = 0 becomes exact. The function u (x, y)
(if it exists) is called the integrating factor (IF) and it satisfies the equation due to the
condition of exactness.
∂M ∂u ∂N ∂u
u+ M = u+ N
∂y ∂y ∂x ∂x
This is a partial differential equation and is very difficult to solve. Consequently, the
determination of the integrating factor is extremely difficult except for some special
cases:
Example Show that 1 /( x 2 + y 2 ) is an integrating factor for the equation

(x 2
)
+ y 2 − x dx − ydy = 0, and then solve the equation.

∂M ∂N ∂M ∂N
Solution: Since M = x 2 + y 2 − x, N =− y ⇒ = 2 y, =0 ⇒ ≠
∂y ∂x ∂y ∂x

and the equation is not exact. However, if the equation is multiplied by 1 /( x 2 + y 2 ) then

 x  y
the equation becomes 1 − 2 dx − 2
2 
dy = 0
 x +y  x + y2

x y ∂M 2 xy ∂N
Now M = 1 − and N =− ⇒ = =
2
x +y 2 2
x +y 2 ∂y (x2 + y2 )
2 ∂x

So that this new equation is exact. The equation can be solved. However, it is simpler to
observe that the given equation can also written

dx −
xdx + ydy
=0 or
1
[ ] 
dx − d ln( x 2 + y 2 ) = 0 or d  x −
(
ln x 2 + y 2 
=0
)
x2 + y2 2  2 

Hence, by integration, we have x − ln x 2 + y 2 = k

6.1 Case 1
When an integrating factor u (x), a function of x only. This happens if the expression

© Copyright Virtual University of Pakistan 28


Differential Equations (MTH401) VU

∂M ∂N

∂y ∂x
is a function of x only. Then the integrating factor u ( x, y ) is given by
N
 ∂M ∂N 
⌠ − 
 ∂ y ∂ x
u = exp  dx 
 N 
 ⌡ 
 
6.2 Case 2
When an integrating factor u ( y ) , a function of y only. This happens if the expression
∂N ∂M

∂x ∂y
is a function of y only. Then IF u ( x, y ) is given b
M
 ∂N ∂M 
⌠ − 
 ∂x ∂y
u = exp  dy 
 M 
⌡ 
 
6.3 Case 3
1
If the given equation is homogeneous and xM + yN ≠ 0 Then u =
xM + yN
6.4 Case 4
If the given equation is of the form yf ( xy )dx + xg ( xy )dy = 0
and xM − yN ≠ 0 Then u =
1
xM − yN

Once the IF is found, we multiply the old equation by u to get a new one, which is exact.
Solve the exact equation and write the solution.
Advice: If possible, we should check whether or not the new equation is exact?
Summary:
Step 1. Write the given equation in the form
M ( x, y )dx + N ( x, y )dy = 0
provided the equation is not already in this form and determine M and N .
Step 2. Check for exactness of the equation by finding whether or not

© Copyright Virtual University of Pakistan 29


Differential Equations (MTH401) VU

∂M ∂N
=
∂y ∂x
Step 3. (a) If the equation is not exact, then evaluate
∂M ∂N

∂y ∂x
N
If this expression is a function of x only, then
 ∂M ∂N 
⌠ − 
∂y ∂x 
u ( x) = exp  dx
 N 
⌡ 
 
Otherwise, evaluate
∂N ∂M

∂x ∂y
M
If this expression is a function of y only, then
 ∂N ∂M 
⌠ − 
 ∂x ∂y
u ( y ) = exp  dy 
 M 
⌡ 
 
In the absence of these 2 possibilities, better use some other technique. However, we
could also try cases 3 and 4 in step 4 and 5
Step 4. Test whether the equation is homogeneous and
xM + yN ≠ 0
1
If yes then u=
xM + yN

Step 5. Test whether the equation is of the form

yf ( xy )dx + xg ( xy )dy = 0
and whether xM − yN ≠ 0
1
If yes then u=
xM − yN

Step 6. Multiply old equation by u. if possible, check whether or not the new equation is
exact?
Step 7. Solve the new equation using steps described in the previous section.

© Copyright Virtual University of Pakistan 30


Differential Equations (MTH401) VU

dy 3xy + y 2
=− 2
Example 1 Solve the differential equation
dx x + xy
Solution:
1. The given differential equation can be written in form

(3 xy + y 2 )dx + ( x 2 + xy ) dy = 0
Therefore
M ( x, y ) = 3xy + y 2

N ( x, y ) = x 2 + xy

∂M ∂N
2. Now = 3x + 2 y , = 2x + y .
∂y ∂x

∂M ∂N
∴ ≠
∂y ∂x
3. To find an IF we evaluate

∂M ∂N

∂y ∂x 1
=
N x
which is a function of x only.
4.Therefore, an IF u (x) exists and is given by
⌠ 1 dx

u ( x) = e ⌡x
= e ln( x ) = x
5. Multiplying the given equation with the IF, we obtain
(3 x 2 y + xy 2 )dx + ( x 3 + x 2 y )dy = 0
which is exact. (Please check!)

6. This step consists of solving this last exact differential equation.

© Copyright Virtual University of Pakistan 31


Differential Equations (MTH401) VU

Solution of new exact equation:


∂M ∂N
1. Since = 3 x 2 + 2 xy = , the equation is exact.
∂y ∂x
2. We find F (x, y) by solving the system
 ∂F
 = 3x 2 y + xy 2
 ∂x

 ∂F = x 3 + x 2 y.
 ∂y

3. We integrate the first equation to get

x2 2
F ( x, y ) = x y +
3
y + θ ( y)
2

4. We differentiate F w. r. t. ‘y’ and use the second equation of the system in step 2 to
obtain

∂F
= x 3 + x 2 y + θ ′( y ) = x 3 + x 2 y
∂y
⇒ θ ′ = 0 , No dependence on x.
5. Integrating the last equation to obtain θ =C . Therefore, the function F ( x, y ) is
x2 2
F ( x, y ) = x 3 y +
y
2
We don't have to keep the constant C, see next step.

6. All the solutions are given by the implicit equation F ( x, y ) = C i.e.

3 x2 y 2
x y+ =C
2

Note that it can be verified that the function


1
u ( x, y ) =
2 xy (2 x + y )
is another integrating factor for the same equation as the new equation
1 1
(3 xy + y 2 ) dx + ( x 2 + xy )dy = 0
2 xy (2 x + y ) 2 xy (2 x + y )

© Copyright Virtual University of Pakistan 32


Differential Equations (MTH401) VU

is exact. This means that we may not have uniqueness of the integrating factor.
( )
Example 2. Solve x 2 − 2 x + 2 y 2 dx + 2 xydy = 0

M = x 2 − 2x + 2 y 2 ∂M ∂N ∂M ∂N
Solution: ⇒ = 4 y, = 2y ⇒ ∴ ≠
N = 2 xy ∂y ∂x ∂y ∂x

M y − Nx 4y − 2y 1
The equation is not exact .Here = =
N 2 xy x

 1 
Therefore, I.F. is given by u = exp ∫ dx  ⇒ u = x
 x 

Multiplying the equation by I.F = x, we have

(x 3
)
− 2 x 2 + 2 xy 2 dx + 2 x 2 ydy = 0 .This equation is exact. The required Solution is

x 4 2x3
− + x 2 y 2 = c0 ⇒ 3 x 4 − 8 x 3 + 12 x 2 y 2 = c
4 3

x 
Example 3 Solve dx +  − sin y dy = 0
y 

Solution: Here

x
M = 1, N= − sin y
y
∂M ∂N 1
= 0, =
∂y ∂x y
∂M ∂N
∴ ≠
∂y ∂x

The equation is not exact.

Now

1
−0
Nx − M y y 1
= =
M 1 y

© Copyright Virtual University of Pakistan 33


Differential Equations (MTH401) VU

dy
Therefore, the IF is u ( y ) = exp ∫ =y
y

Multiplying the equation by y, we have

ydx + ( x − y sin y ) dy = 0

or ydx + xdy − y sin ydy = 0

or d ( xy ) − y sin ydy = 0

Integrating, we have

xy + y cos y − sin y = c

Which is the required solution

Example 4

Solve (x 2
) ( )
y − 2 xy 2 dx − x 3 − 3 x 2 y dy = 0

Solution: Comparing with

Mdx + Ndy = 0

we see that

M = x 2 y − 2 xy 2 and N = − ( x3 − 3 x 2 y )
Since both M and N are homogeneous. Therefore, the given equation is homogeneous.
Now

xM + yN = x 3 y − 2 x 2 y 2 − x 3 y + 3 x 2 y 2 = x 2 y 2 ≠ 0
Hence, the factor u is given by

1 1
u= Qu =
x2 y2 xM + yN
Multiplying the given equation with the integrating factor u , we obtain.

© Copyright Virtual University of Pakistan 34


Differential Equations (MTH401) VU

 1 2  x 3
 − dx −  2 − dy = 0
 y x y y 

Now
1 2 −x 3
M = − and N= +
y x y2 y
and therefore
∂M 1 ∂N
=− 2 =
∂y y ∂x

Therefore, the new equation is exact and solution of this new equation is given by
x
− 2 ln | x | +3 ln | y |= C
y

Example 5

Solve ( ) ( )
y xy + 2 x 2 y 2 dx + x xy − x 2 y 2 dy = 0
Solution:
The given equation is of the form
yf ( xy )dx + xg ( xy )dy = 0
Now comparing with

Mdx + Ndy = 0
We see that

(
M = y xy + 2 x 2 y 2 ) and (
N = x xy − x 2 y 2 )
Further

xM − yN = x 2 y 2 + 2 x 3 y 3 − x 2 y 2 + x 3 y 3
= 3x 3 y 3 ≠ 0
Therefore, the integrating factor u is

© Copyright Virtual University of Pakistan 35


Differential Equations (MTH401) VU

1 1
u= , Qu =
3x3 y 3 xM − yN
Now multiplying the given equation by the integrating factor, we obtain

1 1 2 1 1 1
 2 + dx +  2 − dy = 0
3 x y x  3  xy y

Therefore, solutions of the given differential equation are given by

1
− + 2 ln | x | − ln | y |= C
xy

where 3C0 =C

6.5 Exercise
Solve by finding an I.F
1. xdy − ydx = ( x 2 + y 2 ) dx

y − sin x
2. dy + dx = 0
x
3. (y + 2 y )dx + (xy + 2 y − 4 x )dy = 0
4 3 4

4. (x + y )dx + 2 xydy = 0
2 2

5. (4 x + 3 y )dx + 2 xydy = 0
2

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


2 4 3 3

dy
7. = e2x + y − 1
dx
8. (3xy + y )dx + (x + xy )dy = 0
2 2

9. ydx + (2 xy − e )dy = 0
−2 y

10. ( x + 2 ) sin ydx + x cos ydy = 0

© Copyright Virtual University of Pakistan 36


Differential Equations (MTH401) VU

7 First Order Linear Equations


The differential equation of the form:
dy
a ( x) + b( x ) y = c ( x )
dx
is a linear differential equation of first order. The equation can be rewritten in the
following famous form.
dy
+ p ( x) y = q ( x)
dx
where p (x) and q (x) are continuous functions.

7.1 Method of solution


The general solution of the first order linear differential equation is given by
∫ u ( x)q ( x)dx + C
y=
u ( x)
Where u ( x ) = exp (∫ p ( x ) dx )
The function u (x ) is called the integrating factor. If it is an IVP then use it to find the
constant C.

Summary:

1. Identify that the equation is 1st order linear equation. Rewrite it in the form

dy
+ p ( x) y = q ( x)
dx
if the equation is not already in this form.
2. Find the integrating factor

u ( x) = e ∫
p ( x ) dx

3. Write down the general solution

y=
∫ u ( x)q( x)dx + C
u ( x)
4. If you are given an IVP, use the initial condition to find the constant C.

5. Plug in the calculated value to write the particular solution of the problem.

© Copyright Virtual University of Pakistan 37


Differential Equations (MTH401) VU

Example 1:
Solve the initial value problem
y ′ + tan( x) y = cos 2 ( x), y (0) = 2
Solution:
1.The equation is already in the standard form
dy
+ p ( x) y = q ( x)
dx
with
 p ( x) = tan x

 q(x) = cos x
2

2. Since
∫ tan x dx = − ln cos x = ln sec x

Therefore, the integrating factor is given by

u ( x) = e ∫ tan x dx = sec x

3. Further, because

∫ sec x cos x dx = ∫ cos x dx = sin x


2

So that the general solution is given by

sin x + C
y= = (sin x + C ) cos x
sec x

4. We use the initial condition y (0) = 2 to find the value of the constant C
y ( 0) = C = 2

5. Therefore the solution of the initial value problem is

y = (sin x + 2 ) cos x

© Copyright Virtual University of Pakistan 38


Differential Equations (MTH401) VU

dy 2t 2
Example 2: Solve the IVP − y = , y (0) = 0.4
dt 1 + t 2 1+ t 2
Solution:
1.The given equation is a 1st order linear and is already in the requisite form
dy
+ p( x) y = q( x)
dx
 2t
 p(t ) = − 1 + t 2
with  2
q(t ) =
 1+ t2
⌠ 2t 
  − 1 + t 2 dt = − ln | 1 + t |
2
2. Since
⌡ 
Therefore, the integrating factor is given by
⌠ 2t
− dt
u (t ) = e ⌡ 1+ t 2
= (1 + t 2 ) −1
3. Hence, the general solution is given by

∫ u (t )q(t )dt + C , ⌠ 2
y=
u (t ) ∫ u(t )q(t )dt = ⌡ (1 + t 2 2
)
dt

⌠ 2 ⌠ 1+ t 2 − t 2 ⌠ 1 t2 
Now  dt = 2  (1 + t 2 ) 2 dt = 2   1 + t 2 (1 + t 2 ) 2 dt
 −
⌡ (1 + t )
2 2
⌡ ⌡ 
The first integral is clearly tan −1 t . For the 2nd we will use integration by parts
with t as first function and 2t
(1 + t 2 ) 2
as 2nd function.

⌠ 2t 2  1  ⌠ 1 t
 (1 + t 2 ) 2 dt = t  −  +  dt = − + tan −1 (t )
 1+ t  ⌡ 1+ t 1+ t
2 2 2

⌠ 2 −1 t −1 −1 t
 dt = 2 tan (t ) + − tan (t ) = tan (t ) +
⌡ (1 + t ) 1+ t 2 1+ t2
2 2

 -1 t 
The general solution is: y = (1 + t )  tan (t ) + + C
2

 1+ t 2

4. The condition y (0) = 0.4 gives C = 0.4
5. Therefore, solution to the initial value problem can be written as:
y = t + (1 + t 2 ) tan −1 (t ) + 0.4(1 + t 2 )

© Copyright Virtual University of Pakistan 39


Differential Equations (MTH401) VU

Example 3:

Find the solution to the problem

cos 2 t sin t . y′ = − cos 3 t . y + 1 , y π  = 0


4
Solution:
1. The equation is 1st order linear and is not in the standard form
dy
+ p ( x) y = q ( x)
dx
Therefore we rewrite the equation as
cos t 1
y′ + y=
sin t cos 2 t sin t
2. Hence, the integrating factor is given by
cos t



dt
sin t ln | sin t |
u (t ) = e ⌡
=e = sin t

3. Therefore, the general solution is given by


⌠ sin t 1
dt + C

y= ⌡ cos 2
t sin t
sin t
Since
⌠ sin t 1
dt = ⌠
1
dt = tan t
 
⌡ 2
cos t sin t ⌡ cos 2 t

Therefore
tan t + C 1 C
y= = + = sec t + C csc t
sin t cos t sin t

(1) The initial condition y (π / 4) = 0 implies


2 +C 2 = 0
which gives C = −1 .
(2) Therefore, the particular solution to the initial value problem is
y = sec t − csc t

Example 4 Solve ( x + 2 y ) dy
3

dx
=y

dy y
Solution: We have =
dx x + 2 y 3

© Copyright Virtual University of Pakistan 40


Differential Equations (MTH401) VU

This equation is not linear in y . Let us regard x as dependent variable and y as


dx x + 2 y 3
independent variable. The equation may be written as =
dy y
dx 1
Or − x = 2 y 2 , which is linear in .
dy y

⌠  1    1 1
IF = exp   − dy  = exp ln  =
⌡  y    y y

1 d x
Multiplying with the IF = , we get 1 dx − 12 x = 2 y ⇒   = 2y
y y dy y dy  y 

Integrating, we have
x
y
= y2 + c ⇒ (
x = y y2 + c ) is the required solution.

dy
Example 5 Solve ( x − 1) + 4(x − 1)2 y = x + 1
3
dx

Solution: The equation can be rewritten as dy + 4 y = x + 1


dx x −1 (x − 1)3
4
Here P ( x ) = . Therefore, an integrating factor of the given equation is
x −1
 4dx 
IF = exp ⌠
 
⌡ x − 1 
[ 4
]
= exp ln(x − 1) = ( x − 1)
4

dy
Multiplying the given equation by the IF,we get (x − 1) + 4(x − 1)3 y = x 2 − 1
4
dx

[ ]
3
x
y (x − 1)4 = x 2 − 1 . Integrating both sides, we obtain y ( x − 1) =
d
−x+c
4

dx 3
which is the required solution.
7.2 Exercise
Solve the following differential equations

dy  2 x + 1  −2 x
1. + y = e
dx  x 

© Copyright Virtual University of Pakistan 41


Differential Equations (MTH401) VU

dy
2. + 3 y = 3 x 2 e −3 x
dx

dy
3. x + (1 + x cot x ) y = x
dx

4. (x + 1) dy − ny = e x (x + 1)n +1
dx

5. (1 + x ) dy
2
+ 4 xy =
1
dx (1 + x ) 2 2

dr
6. + r sec θ = cos θ

dy 1 − e −2 x
7. +y= x
dx e + e −x

(
8. dx = 3e y − 2 x dy )

Solve the initial value problems

9.
dy
dx
(
= 2 y + x e 3x − e 2 x , ) y (0 ) = 2

dy
10. x(2 + x ) + 2(1 + x ) y = 1 + 3 x 2 , y (− 1) = 1
dx

© Copyright Virtual University of Pakistan 42


Differential Equations (MTH401) VU

8 Bernoulli Equations
A differential equation that can be written in the form
dy
+ p ( x ) y = q ( x) y n
dx
is called Bernoulli equation.
8.1 Method of solution
For n = 0,1 the equation reduces to 1st order linear DE and can be solved accordingly.

For n ≠ 0,1 we divide the equation with y n to write it in the form


dy
y −n + p ( x) y1−n = q ( x)
dx
and then put

v = y 1− n
Differentiating w.r.t. ‘x’, we obtain

v ′ = (1 − n) y − n y ′
Therefore the equation becomes
dv
+ (1 − n) p( x)v = (1 − n)q( x)
dx

This is a linear equation satisfied by v . Once it is solved, you will obtain the function
1
(1− n )
y=v
If n > 1 , then we add the solution y = 0 to the solutions found the above technique.
Summary
1.Identify the equation
dy
+ p ( x ) y = q ( x) y n
dx
as Bernoulli equation.
Find n. If n ≠ 0,1 divide by y n and substitute;

v = y 1− n

© Copyright Virtual University of Pakistan 43


Differential Equations (MTH401) VU

2. Through easy differentiation, find the new equation

dv
+ (1 − n) p ( x )v = (1 − n)q ( x )
dx

3. This is a linear equation. Solve the linear equation to find v.

1
(1− n )
4. Go back to the old function y through the substitution y=v .

6. If n > 1 , then include y = 0 to in the solution.

7. If you have an IVP, use the initial condition to find the particular solution.

dy
Example 1: Solve the equation = y + y3
dx
Solution:
1. The given differential can be written as
dy
− y = y3
dx
which is a Bernoulli equation with
p( x) = −1, q ( x) = 1 , n=3.
Dividing with y 3 we get

dy
y −3 − y −2 = 1
dx
Therefore we substitute

v = y 1−3 = y −2

2. Differentiating w.r.t. ‘x’ we have

dy 1  dv 
y −3 =−  
dx 2  dx 
So that the equation reduces to

© Copyright Virtual University of Pakistan 44


Differential Equations (MTH401) VU

dv
+ 2v = −2
dx

3. This is a linear equation. To solve this we find the integrating factor u (x)

u ( x) = e ∫
2 dx
= e2 x
The solution of the linear equation is given by

∫ u ( x)q( x)dx + c = ∫ e (− 2)dx + c


2x

v=
u ( x) e2x

Since ∫ e 2 x (−2)dx = −e 2 x
Therefore, the solution for v is given by

− e2 x + C
v= 2x
= Ce −2 x − 1
e
4. To go back to y we substitute v = y − 2 . Therefore the general solution of the given
DE is

( )
1

y = ± Ce −2 x − 1 2

5. Since n > 1 , we include the y = 0 in the solutions. Hence, all solutions are
−1
y = 0, y = ± (Ce −2 x − 1) 2

Example 2:
dy 1
Solve + y = xy 2
dx x
1
Solution: In the given equation we identify P( x ) = , q (x ) = x and n = 2 .
x
Thus the substitution w = y gives
−1

dw 1
− w = − x.
dx x
The integrating factor for this linear equation is

© Copyright Virtual University of Pakistan 45


Differential Equations (MTH401) VU

−⌠
dx
 − ln x
−1

= x −1
ln x
e ⌡x =e =e

Hence
d −1
dx
[
x w = −1. ]
Integrating this latter form, we get

x −1w = − x + c or w = − x 2 + cx.
−1 1
Since w = y , we obtain y = or
w
1
y=
− x 2 + cx
For n > 0 the trivial solution y = 0 is a solution of the given equation. In this example,
y = 0 is a singular solution of the given equation.
Example 3
Solve: dy xy
1 (1)
+ = xy 2
dx 1 − x 2
1
Solution: Dividing (1) by y2 , the given equation becomes
−1 1
dy x
y 2
+ y2 = x (2)
dx 1 − x 2

1 1
1 − dy dv
Put y2 = v or. y 2 =
2 dx dx
Then (2) reduces to
dv x x
+ =
dx 2 1 − x 2
v
( 2 ) (3)

This is linear in v .

−1
⌠ x  −1 ( )
2 
( )
I.F = exp  = − = − 2 4

⌡ 2(1 − x ) 
2
dx  exp  4 ln 1 x  1 x

−1
Multiplying (3) by 1 − ( x )
2 4
, we get

© Copyright Virtual University of Pakistan 46


Differential Equations (MTH401) VU

−1
(1 − ) x 2 4 dv
+
x
v=
x
(
dx 2 1 − x 2 )5/ 4
(
2 1 − x2 )
1/ 4

−1  −1 
d  −1
or
dx 
(
1− x
2
)4 v = − 2 x 1 − x
2
( )
4 
 4  

Integrating, we have

( )
3
−1
( ) −1 1− 2 4
x
v1− x 2 4
= +c
4 3/ 4

or (
v = c 1− x )
2 1/ 4

1 − x2
3
1
or y2 (
= c 1 − x2 )
1/ 4

1 − x2
3
is the required solution.
8.2 Exercise
Solve the following differential equations

dy
1. x + y = y 2 ln x
dx

dy
2. + y = xy 3
dx

dy
3. − y = ex y2
dx

4.
dy
dx
(
= y xy 3 − 1 )
dy
5. x − (1 + x ) y = xy 2
dx

© Copyright Virtual University of Pakistan 47


Differential Equations (MTH401) VU

dy
6. x2 + y 2 = xy
dx

Solve the initial-value problems

dy 1
7. x2 − 2 xy = 3 y 4 , y (1) =
dx 2

dy
8. y1 / 2 + y 3 / 2 = 1, y (0 ) = 4
dx

9. (
xy 1 + xy 2 ) dy
dx
= 1, y (1) = 0

dy y x
10. 2 = − 2, y (1) = 1
dx x y

8.3 Substitutions
q Sometimes a differential equation can be transformed by means of a substitution
into a form that could then be solved by one of the standard methods i.e. Methods
used to solve separable, homogeneous, exact, linear, and Bernoulli’s differential
equation.
q An equation may look different from any of those that we have studied in the
previous lectures, but through a sensible change of variables perhaps an
apparently difficult problem may be readily solved.
q Although no firm rules can be given on the basis of which these substitution could
be selected, a working axiom might be: Try something! It sometimes pays to be
clever.
Example 1

The differential equation y (1 + 2 xy )dx + x(1 − 2 xy )dy = 0


is not separable, not homogeneous, not exact, not linear, and not Bernoulli.
However, if we stare at the equation long enough, we might be prompted to try the
substitution

u
u = 2 xy or y=
2x
xdu − udx
Since dy =
2x 2

© Copyright Virtual University of Pakistan 48


Differential Equations (MTH401) VU

The equation becomes, after we simplify 2u 2 dx + (1 − u )xdu = 0.


−1
we obtain 2 ln x − u − ln u = c

x 1
ln =c+
2y 2 xy

x
= c1e1 / 2 xy ,
2y

x = 2c1 ye 1 / 2 xy , where e c was replaced by c1 . We can also replace 2c1 by c 2 if


desired
Note: The differential equation in the example possesses the trivial solution y = 0 , but
then this function is not included in the one-parameter family of solution.
Example 2
Solve
dy
2 xy + 2 y 2 = 3 x − 6.
dx
Solution:
dy
prompts us to try u = y
2
The presence of the term 2y
dx
du dy
Since = 2y
dx dx
du
Therefore, the equation becomes: x + 2u = 3 x − 6
dx

du 2 6
or + u = 3−
dx x x
This equation has the form of 1st order linear differential equation
dy
+ P( x ) y = Q ( x )
dx
2 6
with P( x) = and Q( x) = 3 −
x x
Therefore, the integrating factor of the equation is given by

© Copyright Virtual University of Pakistan 49


Differential Equations (MTH401) VU

⌠ 2 dx
 2
I.F = e ⌡x
= e ln x = x 2
Multiplying with the IF gives
d 2
dx
[ ]
x u = 3x 2 − 6 x

Integrating both sides, we obtain

x 2u = x 3 − 3x 2 + c or x 2 y 2 = x 3 − 3 x 2 + c.
Example 3
Solve

dy x3 y / x
x −y= e
dx y
Solution:

If we let y
u=
x
Then the given differential equation can be simplified to

ue − u du = dx
Integrating both sides, we have
− u du = dx
∫ ue ∫

Using the integration by parts on LHS, we have

− ue − u − e − u = x + c
or

u + 1 = (c1 − x )eu Where c1=-c

We then re-substitute

y
u=
x

© Copyright Virtual University of Pakistan 50


Differential Equations (MTH401) VU

and simplify to obtain

y + x = x(c1 − x ) e y / x
Example 4
Solve
2
d2y  dy 
= 2 x 
dx 2
 dx 
Solution:
If we let

u = y′
Then
du / dx = y ′′
Then, the equation reduces to
du
= 2 xu 2
dx
Which is separable form. Separating the variables, we obtain
du
2
= 2 xdx
u
Integrating both sides yields
− 2 du = 2 xdx
∫u ∫
or − u −1 = x 2 + c12
The constant is written as c12 for convenience.

Since u −1 = 1 / y ′
dy 1
Therefore =− 2
dx x + c12

dx
or dy = −
x 2 + c12

© Copyright Virtual University of Pakistan 51


Differential Equations (MTH401) VU

⌠ dx
∫ dy = −⌡ x 2 + c 2
1

1 x
y + c2 = − tan −1
c1 c1
8.4 Exercise
Solve the differential equations by using an appropriate substitution.

1.
ydx + (1 + ye x )dy = 0

2.
(2 + e −x / y
)dx + 2(1 − x / y ) dy = 0
3. dy
2 x csc 2 y = 2 x − ln (tan y )
dx
4. dy
+ 1 = sin x e −( x + y )
dx
5. dy
y + 2 x ln x = xe y
dx
6. dy
x2 + 2 xy = x 4 y 2 + 1
dx
7. dy
xe y − 2e y = x 2
dx

© Copyright Virtual University of Pakistan 52


Differential Equations (MTH401) VU

9 Solved Problems
x2 + y 2
Example 1: y' =
xy
dy x2 + y 2
Solution: =
dx xy
dy dw
put y = wx then = w+ x
dx dx
dw x 2 + w2 x 2 1 + w2
w+ x = =
dx xxw w
dw 1
w+ x = +w
dx w
dx
wdw =
x
Integrating
w2
= ln x + ln c
2
y2
2
= ln | xc |
2x
y 2 = 2 x 2 ln | xc |

© Copyright Virtual University of Pakistan 53


Differential Equations (MTH401) VU

dy (2 xy - y )
Example 2: =
dx x
dy (2 xy - y )
Solution: =
dx x
put y = wx
dw (2 xwx - xw)
w+ x =
dx x
dw
w+ x = 2 w -w
dx
dw
x = 2 w - 2w
dx
dw dx
=
2( w - w) x
dw dx
∫ 2( w - w)
=∫
x
dw dx
∫ 2 w (1- w ) = ∫ x
put w =t
1 dx
We get ∫ dt = ∫
1- t x
-ln |1- t |= ln | x | + ln | c |
-ln |1- t |= ln | xc |
(1- t ) -1 = xc
(1- w ) -1 = xc
(1- y/x ) -1 =xc

© Copyright Virtual University of Pakistan 54


Differential Equations (MTH401) VU

Example 3: (2 y 2 x − 3) dx + (2 yx 2 + 4) dy = 0
Solution:(2 y 2 x - 3) dx + (2 yx 2 + 4)dy = 0
Here M = (2 y 2 x - 3) and N = (2 yx 2 + 4)
∂M ∂N
= 4 xy =
∂y ∂x
∂f ∂f
= (2 y 2 x - 3) and = (2 yx 2 + 4)
∂x ∂y
Integrate w.r.t. ' x '
f ( x, y ) = x 2 y 2 - 3 x + h( y )
Differentiate w.r.t. ' y '
¶ f
= 2 x 2 y + h '( y ) = 2 x 2 y + 4 = N
¶ y
h '( y ) = 4
Integrate w.r.t. 'y'
h(y)=4y+c
x 2 y 2 -3x+4y=C1
2
dy 2 xye( x / y )
Example 4: = 2 2 2
dx y + y 2e( x / y ) + 2 x 2 e( x / y )
2 2
dx y 2 + y 2e( x / y ) + 2 x 2e ( x / y )
Solution: = 2
dy 2 xye ( x / y )
put x / y = w
After subsitution
2
dw 1 + e w
y = 2
dy 2 we w
2
dy 2we w
= 2 dw
y 1 + ew
Integrating
2
ln | y |= ln |1 + e w | + ln c
2
ln | y |= ln | c(1 + e w ) |
2
y = c (1 + e ( x / y ) )

© Copyright Virtual University of Pakistan 55


Differential Equations (MTH401) VU

dy
Example 14 : 2 y + x2 + y 2 + x = 0
dx
dy
Solution : 2 y + x2 + y 2 + x = 0
dx
put x 2 + y 2 = u
du
- 2x + u + x = 0
dx
du
+u = x
dx
I .F = Exp ( ∫ dx) = e x
du
e x
+ ue x = xe x
dx
d x
(e u ) = xe x
dx
Integrating
e xu = xe x - e x + c

© Copyright Virtual University of Pakistan 65


Differential Equations (MTH401) VU

Example 15 : y '+ 1 = e -( x + y ) sin x


Solution : y '+ 1 = e -( x + y ) sin x
put x + y = u
du
= e-u sin x
dx
1
-u
du = sin xdx
e
eu du = sin xdx
Integrate
eu = -cos x + c
u = ln | - cos x + c |
x + y = ln | - cos x + c |

© Copyright Virtual University of Pakistan 66


Differential Equations (MTH401) VU

Example 16 : x 4 y 2 y '+ x3 y 3 = 2 x 3 - 3
Solution : x 4 y 2 y '+ x3 y 3 = 2 x 3 - 3
put x 3 y 3 = u
dy du
3x 2 y 3 + 3x3 y 2 =
dx dx
dy du
3x3 y 2 = - 3x2 y 3
dx dx
dy x du
x4 y 2 = - x3 y3
dx 3 dx
x du
= 2 x3 - 3
3 dx
du
= 6x2 - 9 / x
dx
Integrate
u = 2 x 3 - 9 ln x + c
x 3 y 3 = 2 x 3 - 9 ln x + c

© Copyright Virtual University of Pakistan 67


Differential Equations (MTH401) VU

Example 17:Solve cos( x + y ) dy = dx


Solution:cos( x + y )dy = dx
dy dv
put x + y = v or 1 + = , we get
dx dx
dv
cos v[ -1] = 1
dx
cos v 1
dx = dv = [1- ]dv
1 + cos v 1 + cos v
1 v
dx = [1- sec 2 ]dv
2 2
Integrate
v
x + c = v - tan
2
x+ y
x + c = v - tan
2

© Copyright Virtual University of Pakistan 68


Differential Equations (MTH401) VU

13 Higher Order Linear Differential Equations

13.1 Preliminary theory


q A differential equation of the form

dny d n −1 y dy
a n ( x) + a n −1 ( x) + L + a1 ( x) + a 0 ( x ) y = g ( x)
n n −1 dx
dx dx

or a n ( x) y ( n) + a n −1 ( x) y ( n −1) + L + a1 ( x) y ′ + a 0 ( x) y = g ( x)

where a 0 ( x ), a1 ( x ), K , a n ( x ), g ( x ) are functions of x and a n ( x) ≠ 0 , is


called a linear differential equation with variable coefficients.
q However, we shall first study the differential equations with constant coefficients
i.e. equations of the type

dny d n −1 y dy
an + a n −1 + L + a1 + a0 y = g ( x)
n n −1 dx
dx dx

where a 0 , a1 , K , a n are real constants. This equation is non-homogeneous


differential equation and
q If g ( x) = 0 then the differential equation becomes

dny d n −1 y dy
an + a n −1 + L + a1 + a0 y = 0
n n −1 dx
dx dx
which is known as the associated homogeneous differential equation.
13.2 Initial -Value Problem
For a linear nth-order differential equation, the problem:

dny d n −1 y dy
Solve: a n ( x) + a n −1 ( x) + L + a1 ( x) + a0 ( x ) y = g ( x)
dx n dx n −1 dx

Subject to: y ( x0 ) = y 0 , y / ( x0 ) = y0/ ,... y n −1 ( x0 ) = y0n −1

y0 , y0 ,K, y0n−1 being arbitrary constants, is called an initial-value problem (IVP).


/

n −1 n −1
The specified values y ( x0 ) = y 0 , y ( x0 ) = y 0 ,K, y ( x0 ) = y 0
/ /
are called initial-
conditions.
For n = 2 the initial-value problem reduces to

d2y dy
Solve: a2 ( x) + a1 ( x) + a0 ( x ) y = g ( x)
dx 2 dx

© Copyright Virtual University of Pakistan 94


Differential Equations (MTH401) VU

Subject to: y ( x 0 ) = y 0 , …, y / ( x0 ) = y 0/
13.2.1 Solution of IVP
A function satisfying the differential equation on I whose graph passes through ( x 0 , y 0 )
such that the slope of the curve at the point is the number y 0/ is called solution of the
initial value problem.
13.3 Theorem ( Existence and Uniqueness of Solutions)
Let a n ( x), a n −1 ( x),..., a1 ( x), a0 ( x) and g (x) be continuous on an interval I and let
a n ( x) ≠ 0, x ∈ I . If x = x0 ∈ I , then a solution y (x) of the initial-value problem exist
on I and is unique.
Example 1

Consider the function y = 3e 2 x + e −2 x − 3 x


This is a solution to the following initial value problem

y // − 4 y = 12 x, y (0) = 4, y / (0) = 1

d2y
Since = 12e 2 x + 4e −2 x
dx 2
d2y
and 2
− 4 y = 12e 2 x + 4e − 2 x − 12e 2 x − 4e −2 x + 12 x = 12 x
dx
Further y (0) = 3 + 1 − 0 = 4 and y ′ ( 0) = 6 − 2 − 3 = 1

Hence y = 3e 2 x + e −2 x − 3 x
is a solution of the initial value problem. We observe that
q The equation is linear differential equation.
q The coefficients being constant are continuous.
q The function g ( x) = 12 x being polynomial is continuous.
q The leading coefficient a 2 ( x) = 1 ≠ 0 for all values of x. Hence the function
y = 3e 2 x + e −2 x − 3 x is the unique solution.
Example 2
Consider the initial-value problem

3 y /// + 5 y // − y / + 7 y = 0,

y (1) = 0, y / (1) = 0, y // (1) = 0


Clearly the problem possesses the trivial solution y = 0 .

© Copyright Virtual University of Pakistan 95


Differential Equations (MTH401) VU

Since
q The equation is homogeneous linear differential equation.
q The coefficients of the equation are constants.
q Being constant the coefficient are continuous.
q The leading coefficient a3 = 3 ≠ 0 .
Hence y = 0 is the only solution of the initial value problem.

Note: If a n = 0 ?

If a n ( x) = 0 in the differential equation

dny d n−1 y dy
a n ( x) + a n−1 ( x) + L + a1 ( x) + a 0 ( x ) y = g ( x)
n n −1 dx
dx dx
for some x ∈ I then
Solution of initial-value problem may not be unique.
q
Solution of initial-value problem may not even exist.
q
Example 4
Consider the function

y = cx 2 + x + 3
and the initial-value problem

x 2 y // − 2 xy / + 2 y = 6

y (0) = 3, y / (0) = 1
Then y ′ = 2cx + 1 and y ′′ = 2c
Therefore x 2 y // − 2 xy / + 2 y = x 2 (2c) − 2 x(2cx + 1) + 2(cx 2 + x + 3)

= 2cx 2 − 4cx 2 − 2 x + 2cx 2 + 2 x + 6


= 6.
Also y (0) = 3 ⇒ c(0) + 0 + 3 = 3

and y / (0) = 1 ⇒ 2c(0) + 1 = 1


So that for any choice of c , the function ' y ' satisfies the differential equation and the
initial conditions. Hence the solution of the initial value problem is not unique.
Note that
q The equation is linear differential equation.
q The coefficients being polynomials are continuous everywhere.
q The function g (x) being constant is constant everywhere.

© Copyright Virtual University of Pakistan 96


Differential Equations (MTH401) VU

q The leading coefficient a 2 ( x) = x 2 = 0 at x = 0 ∈ (−∞, ∞) .


Hence a 2 ( x) = 0 brought non-uniqueness in the solution

13.4 Boundary-value problem (BVP)

For a 2nd order linear differential equation, the problem


d2y dy
Solve: a 2 ( x) + a1 ( x) + a0 ( x) y = g ( x)
dx 2 dx
Subject to: y (a) = y 0 , y (b) = y1
is called a boundary-value problem. The specified values y (a ) = y 0 , and y (b) = y1 are
called boundary conditions.

13.4.1 Solution of BVP

A solution of the boundary value problem is a function satisfying the differential equation
on some interval I , containing a and b , whose graph passes through two points (a, y 0 )
and (b, y1 ) .
Example 5
Consider the function

y = 3x 2 − 6 x + 3
We can prove that this function is a solution of the boundary-value problem
x 2 y // − 2 xy / + 2 y = 6,
y (1) = 0, y ( 2) = 3

dy d2y
Since = 6 x − 6, =6
dx dx 2

2 d2y dy
Therefore x 2
− 2x + 2 y = 6 x 2 − 12 x 2 + 12 x + 6 x 2 − 12 x + 6 = 6
dx dx
Also y (1) = 3 − 6 + 3 = 0, y (2) = 12 − 12 + 3 = 3
Therefore, the function ' y ' satisfies both the differential equation and the boundary
conditions. Hence y is a solution of the boundary value problem.
.

© Copyright Virtual University of Pakistan 97


Differential Equations (MTH401) VU

13.4.2 Possible Boundary Conditions


For a 2nd order linear non-homogeneous differential equation
d2y dy
a 2 ( x) 2
+ a1 ( x) + a 0 ( x) y = g ( x)
dx dx
all the possible pairs of boundary conditions are
y (a) = y 0 , y ( b ) = y1 ,

y / ( a) = y 0/ , y (b) = y1 ,

y (a) = y 0 , y / (b) = y /1 ,

y / ( a) = y 0/ , y / (b) = y1/

where y 0 , y 0/ , y1 and y1/ denote the arbitrary constants.


In General:
All the four pairs of conditions mentioned above are just special cases of the general
boundary conditions

α1 y ( a ) + β1 y / ( a ) = γ 1
α 2 y (b) + β 2 y / (b) = γ 2

where α 1 , α 2 , β1 , β 2 ∈ {0,1}
Note that
A boundary value problem may have
q Several solutions.
q A unique solution, or
q No solution at all.
Example 1
Consider the function
y = c1 cos 4 x + c 2 sin 4 x
and the boundary value problem

y // + 16 y = 0, y (0) = 0, y (π / 2) = 0
Then
y / = −4c1 sin 4 x + 4c 2 cos 4 x
y // = −16(c1 cos 4 x + c 2 sin 4 x)
y // = −16 y
y // + 16 y = 0

© Copyright Virtual University of Pakistan 98


Differential Equations (MTH401) VU

Therefore, the function


y = c1 cos 4 x + c 2 sin 4 x
satisfies the differential equation
y // + 16 y = 0 .
Now apply the boundary conditions
Applying y (0) = 0
We obtain
0 = c1 cos 0 + c 2 sin 0
⇒ c1 = 0
So that
y = c 2 sin 4 x .
But when we apply the 2nd condition y (π / 2) = 0 , we have
0 = c 2 sin 2π
Since sin 2π = 0 , the condition is satisfied for any choice of c 2 , solution of the problem is
the one-parameter family of functions
y = c2 sin 4 x
Hence, there are an infinite number of solutions of the boundary value problem.
Example 2
π 
Solve the boundary value problem y // + 16 y = 0 , y (0) = 0, y  = 0,
8
Solution:
As verified in the previous example that the function
y = c1 cos 4 x + c2 sin 4 x
satisfies the differential equation

y // + 16 y = 0
We now apply the boundary conditions
y (0) = 0 ⇒ 0 = c1 + 0
and y (π / 8) = 0 ⇒ 0 = 0 + c2
So that c1 = 0 = c 2
Hence
y=0

© Copyright Virtual University of Pakistan 99


Differential Equations (MTH401) VU

is the only solution of the boundary-value problem.


Example 3
Solve the differential equation y // + 16 y = 0 subject to the boundary conditions
y (0) = 0, y (π / 2) = 1 .

Solution:As verified in an earlier example that the function y = c1 cos 4 x + c 2 sin 4 x

satisfies the differential equation y // + 16 y = 0 .


We now apply the boundary conditions
y (0) = 0 ⇒ 0 = c1 + 0
Therefore c1 = 0
So that y = c 2 sin 4 x

However y (π / 2) = 1 ⇒ c 2 sin 2π = 1
or 1 = c 2 .0 ⇒ 1 = 0
This is a clear contradiction. Therefore, the boundary value problem has no solution.
13.5 Linear Dependence
A set of functions

{ f1 ( x), f 2 ( x),K, f n ( x)}


is said to be linearly dependent on an interval I if constants c1 , c 2 ,K, cn not all zero,
such that
c1 f1 ( x) + c 2 f 2 ( x) + L. + c n f n ( x) = 0, x∈I

13.6 Linear Independence


A set of functions { f1 ( x), f 2 ( x), K , f n ( x)} is said to be linearly independent on an
interval I if c1 f1 ( x) + c 2 f 2 ( x) + L + c n f n ( x) = 0, x ∈ I ,only when
c1 = c 2 = L = c n = 0.
13.6.1 Case of two functions
If n = 2 then the set of functions becomes { f1 ( x), f 2 ( x)}
If we suppose that c1 f1 ( x) + c 2 f 2 ( x) = 0
Also that the functions are linearly dependent on an interval I then either c1 ≠ 0 or
c2 ≠ 0 .

© Copyright Virtual University of Pakistan 100


Differential Equations (MTH401) VU

c2
Let us assume that c1 ≠ 0 , then f1 ( x) = − f 2 ( x ) .Hence f1 ( x) is the constant multiple
c1
of f 2 ( x) .Conversely, if we suppose f1 ( x) = c 2 f 2 ( x)
Then (−1) f1 ( x) + c2 f 2 ( x) = 0 , x∈I
So that the functions are linearly dependent because c1 = −1 .
Hence, we conclude that:
q Any two functions f1 ( x) and f 2 ( x) are linearly dependent on an interval I if and
only if one is the constant multiple of the other.
q Any two functions are linearly independent when neither is a constant multiple of
the other on an interval I.
q In general a set of n functions { f1 ( x), f 2 ( x), K , f n ( x)} is linearly dependent if at
least one of them can be expressed as a linear combination of the remaining.
Example 1
The functions
f1 ( x) = sin 2 x, x ∈ (−∞, ∞)
f 2 ( x) = sin x cos x, x ∈ (−∞ , ∞)
1
If we choose c1 = and c 2 = −1 then
2
1
c1 sin 2 x + c 2 sin x cos x = (2 sin x cos x ) − sin x cos x = 0
2
Hence, the two functions f1 ( x) and f 2 ( x ) are linearly dependent.
Example 2
Consider the functions

f1 ( x) = cos 2 x , f 2 ( x) = sin 2 x, x ∈ (−π / 2, π / 2) ,

f 3 ( x ) = sec 2 x , f 4 ( x) = tan 2 x, x ∈ (−π / 2, π / 2)


If we choose c1 = c 2 = 1, c 3 = −1, c 4 = 1 , then

c1 f1 ( x) + c2 f 2 ( x) + c3 f 3 ( x) + c4 f 4 ( x)
= c1 cos 2 x + c2 sin 2 x + c3 sec 2 x + c4 tan 2 x
= cos 2 x + sin 2 x + −1 − tan 2 x + tan 2 x
= 1 −1 + 0 = 0
Therefore, the given functions are linearly dependent.
Note that

© Copyright Virtual University of Pakistan 101


Differential Equations (MTH401) VU

The function f 3 ( x) can be written as a linear combination of other three functions


f1 ( x), f 2 ( x ) and f 4 ( x) because sec 2 x = cos 2 x + sin 2 x + tan 2 x .
Example 3
Consider the functions
f 1 ( x ) = 1 + x, x ∈ (−∞ , ∞ )
f 2 ( x ) = x, x ∈ (−∞, ∞)
f 3 ( x) = x 2 , x ∈ (−∞, ∞)
Then
c1 f1 ( x) + c 2 f 2 ( x) + c3 f 3 ( x) = 0
means that

c1 (1 + x) + c 2 x + c3 x 2 =0

or c1 + (c1 + c 2 ) x + c3 x 2 =0

Equating coefficients of x and x 2 constant terms we obtain


c1 = 0 = c3

c1 + c 2 = 0
Therefore c1 = c 2 = c3 = 0

Hence, the three functions f1 ( x), f 2 ( x) and f 3 ( x) are linearly independent.

13.7 Wronskian
Suppose that the function f 1 ( x), f 2 ( x), K , f n ( x) possesses at least n − 1 derivatives then
the determinant

f1 f 2 KKK fn
f1/ f 2/ KKK f n/
M M M
f1n−1 f 2n −1 KKK f nn −1

is called Wronskian of the functions f 1 ( x), f 2 ( x), K , f n ( x) and is denoted by


W ( f1 ( x), f1 ( x), K, f1 ( x) ) .

13.8 Theorem (Criterion for Linearly Independent Functions)


Suppose the functions f 1 ( x), f 2 ( x), K , f n ( x) possess at least n-1 derivatives on an
interval I . If

© Copyright Virtual University of Pakistan 102


Differential Equations (MTH401) VU

W ( f1 ( x), f 2 ( x), K, f n ( x)) ≠ 0

for at least one point in I , then functions f 1 ( x), f 2 ( x), K , f n ( x) are linearly independent
on the interval I .
Note that this is only a sufficient condition for linear independence of a set of functions.
In other words:
If f 1 ( x), f 2 ( x), K , f n ( x) possesses at least n − 1 derivatives on an interval and are
linearly dependent on I , then W ( f1 ( x), f 2 ( x), K , f n ( x)) = 0, x∈I
However, the converse is not true. i.e. a Vanishing Wronskian does not guarantee linear
dependence of functions.
Example 1
The functions
f1 ( x ) = sin 2 x
f 2 ( x ) = 1 − cos 2 x
are linearly dependent because
1
sin 2 x = (1 − cos 2 x )
2
We observe that for all x ∈ (−∞, ∞)

sin 2 x 1 − cos 2 x
W ( f1 ( x ), f 2 ( x )) =
2 sin x cos x 2 sin 2 x

= 2 sin 2 x sin 2 x − 2 sin x cos x


+ 2 sin x cos x cos 2 x
= sin 2 x [2 sin 2 x − 1 + cos 2 x]
= sin 2 x [2 sin 2 x − 1 + cos 2 x − sin 2 x]
= sin 2 x [sin 2 x + cos 2 x − 1]
=0
Example 2
Consider the functions
m1x m x
f1 ( x ) = e , f 2 (x ) = e 2 , m1 ≠ m2
The functions are linearly independent because
c1 f1 ( x) + c2 f 2 ( x) = 0
if and only if c1 = 0 = c 2 as m1 ≠ m2

© Copyright Virtual University of Pakistan 103


Differential Equations (MTH401) VU

Now for all x ∈ R

( )
W e m1 x , e m2 x =
e m1 x e m2 x
m1e m1 x m 2 e m2 x
= (m2 − m1 )e (m1 + m2 )x
≠0
Thus f1 and f 2 are linearly independent of any interval on x-axis.
Example 3
If α and β are real numbers, β ≠ 0 , then the functions

y1 = eαx cos βx and y 2 = eαx sin βx


are linearly independent on any interval of the x-axis because
(
W eαx cos βx, eαx sin βx )
eαx cos βx eαx sin βx
=
− βeαx sin βx + αeαx cos βx βeαx cos βx + αeαx sin βx

(
= βe 2αx cos 2 βx + sin 2 βx = βe 2αx ≠ 0.)
Example 4
The functions
f 1 (x ) = e x , f 2 ( x ) = xe x , and f 3 ( x ) = x 2 e x
are linearly independent on any interval of the x-axis because for all x ∈ R , we have
ex xe x x 2e x
(
W e x , xe x , x 2 e x ) = ex xe x + e x x 2 e x + 2 xe x
ex xe x + 2e x x 2 e x + 4 xe x + 2e x

= 2e 3 x ≠ 0
13.9 Exercise
1. Given that

y = c1e x + c 2 e − x
is a two-parameter family of solutions of the differential equation
y ′′ − y = 0

© Copyright Virtual University of Pakistan 104


Differential Equations (MTH401) VU

on (− ∞, ∞ ) , find a member of the family satisfying the boundary conditions


y (0 ) = 0, y ′(1) = 1 .
2. Given that
y = c1 + c 2 cos x + c3 sin x
is a three-parameter family of solutions of the differential equation
y ′′′ + y ′ = 0
on the interval (− ∞, ∞ ) , find a member of the family satisfying the initial
conditions y (π ) = 0, y ′(π ) = 2, y ′′(π ) = −1 .
3. Given that
y = c1 x + c2 x ln x
is a two-parameter family of solutions of the differential equation
x y ′′ − xy ′ + y = 0 on (− ∞, ∞ ) . Find a member of the family satisfying the initial
2

conditions
y (1) = 3, y ′(1) = −1.
Determine whether the functions in problems 4-7 are linearly independent or
dependent on (− ∞, ∞ ) .
4. f 1 ( x ) = x, f 2 (x ) = x 2 , f 3 (x ) = 4 x − 3 x 2
5. f1 (x ) = 0, f 2 (x ) = x, f 3 ( x ) = e x
6. f 1 ( x ) = cos 2 x, f 2 ( x ) = 1, f 3 (x ) = cos 2 x
7. f1 ( x ) = e x , f 2 (x ) = e − x , f 3 ( x ) = sinh x
Show by computing the Wronskian that the given functions are linearly independent
on the indicated interval.
8. tan x, cot x; (- ∞, ∞ )
9. e x , e -x , e 4x ; (− ∞, ∞ )
10. x, x ln x, x 2 ln x; (0, ∞ )

© Copyright Virtual University of Pakistan 105


Differential Equations (MTH401) VU

14 Solutions of Higher Order Linear Equations

14.1 Preliminary Theory


q In order to solve an nth order non-homogeneous linear differential equation
dny d n −1 y dy
a n ( x ) n + a n −1 ( x ) n −1 + L + a1 ( x ) + a 0 ( x ) y = g ( x )
dx dx dx
we first solve the associated homogeneous differential equation
dny d n −1 y dy
a n ( x ) n + a n −1 ( x ) n −1 + L + a1 ( x ) + a 0 ( x ) y = 0
dx dx dx
q Therefore, we first concentrate upon the preliminary theory and the methods of
solving the homogeneous linear differential equation.
q We recall that a function y = f (x) that satisfies the associated homogeneous
equation
dny d n −1 y dy
a n (x ) n
+ a n −1 ( x ) n −1
+ L + a1 ( x ) + a 0 ( x ) y = 0
dx dx dx
is called solution of the differential equation.

14.2 Superposition Principle


Suppose that y1 , y 2 ,K , y n are solutions on an interval I of the homogeneous linear
differential equation
dny d n −1 y dy
a n (x ) n
+ a n −1 ( x ) n −1
+ L + a1 ( x ) + a 0 ( x ) y = 0
dx dx dx
Then
y = c1 y1 ( x ) + c 2 y 2 ( x ) + L + c n y n (x ),
c1 , c 2 , K , cn being arbitrary constants is also a solution of the differential equation.
Note that
q A constant multiple y = c1 y1 (x ) of a solution y1 ( x ) of the homogeneous linear
differential equation is also a solution of the equation.
q The homogeneous linear differential equations always possess the trivial solution
y = 0.
q The superposition principle is a property of linear differential equations and it
does not hold in case of non-linear differential equations.
Example 1 The functions y1 = e x , y 2 = c 2 x , and y3 = e 3 x all satisfy the homogeneous
differential equation

© Copyright Virtual University of Pakistan 106


Differential Equations (MTH401) VU

d3y d2y dy
3
− 6 2
+ 11 − 6 y = 0
dx dx dx
on (− ∞, ∞ ) . Thus y1 , y 2 and y3 are all solutions of the differential equation
Now suppose that
y = c1e x + c 2 e 2 x + c3 e 3 x .
Then
dy
= c1e x + 2c 2 e 2 x + 3c3 e 3 x .
dx
d2y
2
= c1e x + 4c 2 e 2 x + 9c3 e 3 x .
dx
d3y
3
= c1e x + 8c 2 e 2 x + 27c3 e 3 x .
dx
Therefore

d3y d2y dy
−6 + 11 − 6y
3
dx 2 dx
( ) ( )
dx
= c1 e x − 6e + 11e x − 6e x + c 2 8e 2 x − 24e 2 x + 22e 2 x − 6e 2 x
x

(
+ c3 27e 3 x − 54e 3 x + 33e 3 x − 6e 3 x )
= c1 (12 − 12 )e x + c 2 (30 − 30 )e 2 x + c3 (60 − 60 )e 3 x
=0
Thus
y = c1e x + c 2 e 2 x + c3 e 3 x .
is also a solution of the differential equation.
Example 2 The function y = x 2 is a solution of the homogeneous linear equation

x 2 y ′′ − 3 xy ′ + 4 y = 0 on (0, ∞ ) .
Now consider y = cx 2 ⇒ y ′ = 2cx and y ′′ = 2c

So that x 2 y ′′ − 3xy ′ + 4 y = 2cx 2 − 6cx 2 + 4cx 2 = 0

Hence the function y = cx 2 is also a solution of the given differential equation.


The Wronskian
Suppose that y1 , y 2 are 2 solutions, on an interval I , of the second order homogeneous
linear differential equation

© Copyright Virtual University of Pakistan 107


Differential Equations (MTH401) VU

d2y dy
a2 2
+ a1 + a0 y = 0
dx dx
Then either W ( y1 , y 2 ) = 0, x∈I
or W ( y1 , y 2 ) ≠ 0, x∈I
To verify this we write the equation as
d 2 y Pdy
+ + Qy = 0
dx 2 dx
y1 y2
Now W ( y1 , y 2 ) = = y1 y 2′ − y1′ y 2
y1′ y 2′
Differentiating w.r.to x , we have
dW
= y1 y 2′′ − y1′′y 2
dx
Since y1 and y 2 are solutions of the differential equation

d 2 y Pdy
+ + Qy = 0
dx 2 dx
Therefore
y1′′ + Py1′ + Qy1 = 0
y 2′′ + Py 2′ + Qy 2 = 0
Multiplying 1st equation by y 2 and 2nd by y1 the have
y1′′y 2 + Py1′ y 2 + Qy1 y 2 = 0
y1 y 2′′ + Py1 y 2′ + Qy1 y 2 = 0
Subtracting the two equations we have:
( y1 y2′′ − y2 y1′′) + P( y1 y2′ − y1′ y2 ) = 0
dW
or + PW = 0
dx
This is a linear 1st order differential equation in W , whose solution is
− Pdx
W = ce ∫
Therefore
q If c ≠ 0 then W ( y1 , y 2 ) ≠ 0, x∈I
q If c = 0 then W ( y1 , y 2 ) = 0, x∈I

© Copyright Virtual University of Pakistan 108


Differential Equations (MTH401) VU

Hence Wronskian of y1 and y 2 is either identically zero or is never zero on I .


In general
If y1 , y 2 , K , y n are n solutions, on an interval I , of the homogeneous nth order linear
differential equation with constants coefficients

dny d n−1 y dy
an + a n−1 + L + a1 + a0 y = 0
n n −1 dx
dx dx
Then
Either W ( y1 , y 2 , K , y n ) = 0, x∈I
or W ( y1 , y 2 , K , y n ) ≠ 0, x∈I

14.3 Linear Independence of Solutions


Suppose that

y1 , y 2 , K, y n
are n solutions, on an interval I , of the homogeneous linear nth-order differential
equation
dny d n−1 y dy
a n (x ) n
+ a n −1 ( x ) n −1
+ L + a1 ( x ) + a 0 (x ) y = 0
dx dx dx
Then the set of solutions is linearly independent on I if and only if
W ( y1, y 2 , K, y n ) ≠ 0

In other words
The solutions
y1 , y 2 , K , y n
are linearly dependent if and only if

W ( y1, y 2 , K , y n ) = 0, x∈I

14.4 Fundamental Set of Solutions


A set
{y1 , y 2 ,K, y n }
of n linearly independent solutions, on interval I , of the homogeneous linear nth-order
differential equation
dny d n−1 y dy
a n (x ) n
+ a n −1 ( x ) n −1
+ L + a1 ( x ) + a 0 (x ) y = 0
dx dx dx

© Copyright Virtual University of Pakistan 109


Differential Equations (MTH401) VU

is said to be a fundamental set of solutions on the interval I .


14.4.1 Existence of a Fundamental Set
There always exists a fundamental set of solutions for a linear nth-order homogeneous
differential equation
dny d n−1 y dy
a n (x ) n
+ a n −1 ( x ) n −1
+ L + a1 ( x ) + a 0 (x ) y = 0
dx dx dx
on an interval I.
14.5 General Solution-Homogeneous Equations
Suppose that
{y1 , y 2 ,K, y n }
is a fundamental set of solutions, on an interval I, of the homogeneous linear nth-order
differential equation
dny d n−1 y dy
a n (x ) n + a n−1 ( x ) n−1 + L + a1 ( x ) + a0 ( x ) y = 0
dx dx dx
Then the general solution of the equation on the interval I is defined to be
y = c1 y1 ( x ) + c 2 y 2 ( x ) + L + c n y n ( x )

Here c1 , c 2 ,K, c n are arbitrary constants.

Example 1 The functions y1 = e 3 x and y 2 = e − 3 x

are solutions of the differential equation y ′′ − 9 y = 0

e3x e − 3x
Since W  e 3 x , e − 3 x  = = −6 ≠ 0, x∈I
  3e 3x − 3e − 3 x

Therefore y1 and y 2 from a fundamental set of solutions on (− ∞, ∞ ) . Hence general


solution of the differential equation on the (− ∞, ∞ ) is
y = c1e 3 x + c2 e −3 x
Example 2

Consider the function y = 4 sinh 3 x − 5e − 3 x

Then y ′ = 12 cosh 3x + 15e − 3x , y ′′ = 36 sinh 3x − 45e − 3 x

⇒ y′′ = 9 4 sinh 3 x − 5e− 3 x  or y′′ = 9 y ,


 
Therefore y ′′ − 9 y = 0

© Copyright Virtual University of Pakistan 110


Differential Equations (MTH401) VU

Hence y = 4 sinh 3 x − 5e −3 x
is a particular solution of differential equation.
y ′′ − 9 y = 0

The general solution of the differential equation is

y = c1e 3 x + c 2 e − 3x
Choosing c1 = 2, c 2 = −7

We obtain y = 2e 3 x − 7e − 3 x

y = 2e 3 x − 2e − 3 x − 5e − 3 x

 e 3 x − e − 3x 
y = 4  − 5e − 3 x
 2 
 

y = 4 sinh 3 x − 5e − 3x
Hence, the particular solution has been obtained from the general solution.
Example 3
d3y d2y dy
Consider the differential equation 3
− 6 2
+ 11 − 6 y = 0
dx dx dx

and suppose that y1 = e x , y 2 = e 2 x and y 3 = e 3 x

dy1 d 2 y1 d 3 y1
Then = ex = =
dx dx 2 dx 3

d 3 y1 d 2 y1 dy1
Therefore −6 + 11 − 6 y1 = e x − 6e x + 11e x − 6e x
3 2 dx
dx dx

d 3 y1 d 2 y1 dy
or −6 + 11 1 − 6 y1 = 12e x − 12e x = 0
dx 3 dx 2 dx

Thus the function y1 is a solution of the differential equation. Similarly, we can verify
that the other two functions i.e. y 2 and y 3 also satisfy the differential equation.
Now for all x ∈ R

© Copyright Virtual University of Pakistan 111


Differential Equations (MTH401) VU

ex e2x e3x
W  e x , e 2 x , e 3 x  = e x 2e 2 x 3e 3 x = 2e 6 x ≠ 0 x∈I
 
ex 4e 2 x 9e 3 x

Therefore y1 , y 2, and y3 form a fundamental solution of the differential equation on


x 2x 3x
(− ∞, ∞ ) . We conclude that y = c1e + c2 e + c3e
is the general solution of the differential equation on the interval (− ∞, ∞ ) .

14.6 Non-Homogeneous Equations


A function y p that satisfies the non-homogeneous differential equation

d ny d n −1y dy
a ( x) +a
n −1
( x) + L + a1 ( x ) + a0 (x ) y = g (x )
dx n − 1
n
dx n dx
and is free of parameters is called the particular solution of the differential equation
Example 1 Suppose that y p = 3 ⇒ y ′p′ = 0

y ′p′ + 9 y p = 0 + 9(3)
So that
= 27
Therefore y p = 3 is a particular solution of the differential equation y ′p′ + 9 y p = 27

Example 2 Suppose that y p = x 3 − x ⇒ y ′p = 3 x 2 − 1, y ′p′ = 6 x

Therefore x 2 y ′p′ + 2 xy ′p − 8 y p = x 2 (6 x ) + 2 x 3x 2 − 1 − 8 x 3 − x  = 4 x 3 + 6 x


   

Therefore y = x 3 − x is a particular solution of the differential equation


p

x 2 y ′′ + 2 xy ′ − 8 y = 4 x 3 + 6 x

14.7 Complementary Function


The general solution y = c1 y + c y + L + c y
c 1 2 2 n n
of the homogeneous linear differential equation
dny d n −1 y dy
a n ( x ) n + a n−1 ( x ) n−1 + L + a1 ( x ) + a 0 ( x ) y = 0
dx dx dx
is known as the complementary function for the non-homogeneous linear differential
equation.

© Copyright Virtual University of Pakistan 112


Differential Equations (MTH401) VU

dny d n−1 y dy
an (x ) n
+ a n −1 ( x ) n −1
+ L + a1 ( x ) + a0 ( x ) y = g ( x )
dx dx dx

14.8 General Solution of Non-Homogeneous Equations


Suppose that
q The particular solution of the non-homogeneous equation
dny d n−1 y dy
(
an x ) n
(
+ a n −1 x ) n −1
+ L + a1 ( x ) + a0 ( x ) y = g ( x )
dx dx dx
is y p .
q The complementary function of the non-homogeneous differential equation
dny d n−1 y dy
a n ( x ) n + a n −1 ( x ) n−1 + L + a1 ( x ) + a0 ( x ) y = 0
dx dx dx
is
y c = c1 y1 + c2 y 2 + L + c n y n .
q Then general solution of the non-homogeneous equation on the interval I is
given by
y = yc + y p
or
y = c1 y1 ( x ) + c 2 y 2 ( x ) + L + cn y n ( x ) + y p ( x ) = y c (x ) + y p ( x )
Hence General Solution = Complementary solution + any particular solution.
11 1
Example Suppose that y =− − x
p 12 2
1
Then y ′p = − , y ′p′ = 0 = y ′p′′
2

∴d
3
yp d 2 yp dy p 11 11
3
−6 2
+ 11 − 6yp = 0 − 0 − + + 3 x = 3x
dx dx dx 2 2
11 1
Hence y =− − x is a particular solution of the non-homogeneous equation
p 12 2

d3y d2y dy
−6 + 11 − 6 y = 3x
dx 3 dx 2 dx

Now consider y c = c1e x + c 2 e 2 x + c3 e 3 x


Then

© Copyright Virtual University of Pakistan 113


Differential Equations (MTH401) VU

dy c
= c1e x + 2c2 e 2 x + 3c3 e 3 x
dx
d 2 yc
= c1e x + 4c 2 e 2 x + 9c3 e 3 x
2
dx
d 3 yc
= c1e x + 8c2 e 2 x + 27c3e 3 x
3
dx
Since,

d 3 yc d 2 yc dy c
−6 + 11 − 6 yc
dx 3 dx 2 dx

(
= c1e x + 8c2 e 2 x + 27c3e3 x − 6 c1e x + 4c2e 2 x + 9c3e3 x )
( ) (
+ 11 c1e x + 2c2 e 2 x + 3c3e3 x − 6 c1e x + c2 e 2 x + c3e3 x )
= 12c1e x − 12c1e x + 30c2e 2 x − 30c2e 2 x + 60c3e3 x − 60c3e3 x
=0
Thus y c is general solution of associated homogeneous differential equation

d3y d2y dy
3
− 6 2 + 11 − 6 y = 0
dx dx dx
Hence general solution of the non-homogeneous equation is
11 1
y = y + y = c1e x + c 2 e 2 x + c3 e 3 x − − x
c p 12 2
14.9 Superposition Principle for Non-homogeneous Equations
Suppose that y p , y p , K , y p denote the particular solutions of the k differential
1 2 k
equation a n (x ) y (n ) + a n −1 ( x ) y ( n −1) + L + a1 ( x ) y ′ + a 0 ( x ) y = g (x ),
i
i = 1,2,K k , on an interval I . Then y p = y p ( x ) + y p ( x ) + L + y p ( x)
1 2 k
is a particular solution of
n  n − 1
   
a (x )y  
+a ( x )y  
+ L + a1 ( x ) y ′ + a 0 (x ) y = g ( x ) + g 2 ( x ) + L + g ( x )
n n −1 1 k
Example
Consider the differential equation

y′′ − 3 y′ + 4 y = −16 x 2 + 24 x − 8 + 2e2 x + 2 xe x − e x


Suppose that

y p1 = −4 x 2 , y p2 = e 2 x , y p3 = xe x

© Copyright Virtual University of Pakistan 114


Differential Equations (MTH401) VU

Then y ′p′1 − 3 y ′p1 + 4 y p1 = −8 + 24 x − 16 x 2

Therefore y = −4 x 2
p
1

is a particular solution of the non-homogenous differential equation


y ′′ − 3 y ′ + 4 y = −16 x 2 + 24 x − 8
Similarly, it can be verified that

y = e 2 x and y = xe x
p p
2 3
are particular solutions of the equations:
y ′′ − 3 y ′ + 4 y = 2e 2 x
and y′′-3 y′ + 4 y = 2 xe x − e x
respectively.

Hence y =y +y +y = −4 x 2 + e 2 x + xe x
p p p p
1 2 3

is a particular solution of the differential equation

y′′ − 3 y′ + 4 y = −16 x 2 + 24 x − 8 + 2e 2 x + 2 xe x − e x

14.10 Exercise

Verify that the given functions form a fundamental set of solutions of the differential
equation on the indicated interval. Form the general solution.

11. y ′′ − y ′ − 12 y = 0; e −3 x , e 4 x , (− ∞, ∞ )

12. y′′ − 2 y′ + 5 y = 0; e x cos 2 x, e x sin 2 x, (− ∞, ∞ )

13. x 2 y′′ + xy′ + y = 0; cos (ln x ), sin (ln x ), (0, ∞ )


14. 4 y ′′ − 4 y ′ + y = 0; e x / 2 , xe x / 2 , (− ∞, ∞ )

15. x 2 y ′′ − 6 xy ′ + 12 y = 0; x 3 , x 4 (0, ∞ )
16. y ′′ − 4 y = 0; cosh 2 x, sinh 2 x, (− ∞, ∞ )

© Copyright Virtual University of Pakistan 115


Differential Equations (MTH401) VU

Verify that the given two-parameter family of functions is the general solution of the non-
homogeneous differential equation on the indicated interval.

17. y ′′ + y = sec x, y = c1 cos x + c 2 sin x + x sin x + (cos x ) ln (cos x ) , (− π / 2,π / 2) .

18. y′′ − 4 y′ + 4 y = 2e 2 x + 4 x − 12 , y = c1e 2 x + c2 xe 2 x + x 2e 2 x + x − 2

19. y ′′ − 7 y ′ + 10 y = 24e x , y = c1e 2 x + c 2 e 5 x + 6e x , (− ∞,∞ )


1 2 1
20. x 2 y ′′ + 5 xy ′ + y = x 2 − x, y = c1 x −1 / 2 + c 2 x −1 + x − x, (0,∞ )
15 6

© Copyright Virtual University of Pakistan 116


Differential Equations (MTH401) VU

16 Homogeneous Linear Equations with Constant Coefficients


dy
We know that the linear first order differential equation + my = 0
dx
m being a constant, has the exponential solution on (− ∞, ∞ ) as y = c1e − mx .
The question?
q The question is whether or not the exponential solutions of the higher-order
differential equations
a n y ( n) + a n −1 y ( n −1) + L + a 2 y // + a1 y / + a0 y = 0,
exist on (− ∞, ∞ ) .
q In fact all the solutions of this equation are exponential functions or constructed
out of exponential functions.
Recall that the linear differential of order n is an equation of the form

dny d n −1 y dy
a n ( x) + a n −1 ( x) + L + a1 ( x) + a 0 ( x ) y = g ( x)
n n −1 dx
dx dx
16.1 Method of Solution
d2y dy
Taking n = 2 , the nth-order differential equation becomes a 2 2
+ a1 + a0 y = 0
dx dx
d2y dy
This equation can be written as a 2
+ b + cy = 0
dx dx

We now try a solution of the exponential form y = e mx ⇒ y ′ = me mx and y ′′ = m 2 e mx

Substituting in the differential equation, we have e mx (am 2 + bm + c) = 0

Since e
mx
≠ 0, x ∈ (− ∞, ∞ ) , therefore am 2 + bm + c = 0
This algebraic equation is known as the Auxiliary equation (AE).The solution of the
auxiliary equation determines the solutions of the differential equation.
16.1.1 Case 1 (Distinct Real Roots)
If the auxiliary equation has distinct real roots m1 and m 2 then we have the following two
m x m x
solutions of the differential equation. y1 = e 1 and y 2 = e 2
These solutions are linearly independent because
y y2
/ = (m2 − m1 )e
( m1 + m 2 ) x
W ( y1 , y 2 ) = 1/
y1 y2

Since m1 ≠ m2 and e (m1 + m2 )x ≠ 0 , therefore W ( y1 , y 2 ) ≠ 0 x ∈ (− ∞, ∞ ) .

© Copyright Virtual University of Pakistan 124


Differential Equations (MTH401) VU

Hence
q y1 and y 2 form a fundamental set of solutions of the differential equation.
q The general solution of the differential equation on (− ∞, ∞ ) is

y = c1e m1 x + c2 e m 2 x
16.1.2 Case 2 (Repeated Roots)
If the auxiliary equation has real and equal roots i.e. m = m1 , m2 with m1 = m2

Then we obtain only one exponential solution y = c1e mx


b c
To construct a second solution we rewrite the equation in the form y ′′ + y′ + y = 0
a a
Comparing with y ′′ + Py ′ + Qy = 0
b
We make the identification P =
a
b
⌠ e − ∫ Pdx ⌠ −ax
e
Thus a second solution is given by y 2 = y1  dx = e 
mx
dx
 y12  e 2 mx
⌡ ⌡
Since the auxiliary equation is a quadratic algebraic equation and has equal roots
Therefore, Disc. = b 2 − 4ac = 0

− b ± b 2 − 4ac
We know from the quadratic formula m =
2a

b e 2mx
we have 2m = − .Therefore y 2 = e mx
a e 2 mx ∫
dx = xe mx

Hence the general solution is y = c1e mx + c 2 xe mx = (c1 + c 2 x)e mx


16.1.3 Case 3 (Complex Roots)
If the auxiliary equation has complex roots α ± iβ then, with m1 = α + iβ and
m2 = α − iβ , where α >0 and β >0 are real, the general solution of the differential
equation is y = c1e (α + iβ ) x + c2 e (α − iβ ) x
First we choose the following two pairs of values of c1 and c 2 , c1 = c 2 = 1

y = e (α + iβ ) x + e (α − iβ ) x
c1 = 1,c 2 = −1 ,then we have 1 .We know by the Euler’s Formula
y 2 = e (α + iβ ) x − e (α − iβ ) x
that e iθ = cos θ + i sin θ , θ ∈R .

© Copyright Virtual University of Pakistan 125


Differential Equations (MTH401) VU

Using this formula, we can simplify the solutions y1 and y 2 as

y1 = eαx (e iβx + e −iβx ) = 2eαx cos βx


y 2 = eαx (eiβx − e − iβx ) = 2ieαx sin βx

We can drop constant to write. y1 = eαx cos βx , y 2 = eαx sin βx

( )
The Wronskian: W e αx cos βx , e αx sin βx = βe 2αx ≠ 0 x

Therefore, eαx cos( β x), eαx sin( β x) form a fundamental set of solutions of the
differential equation on (− ∞, ∞ ) .Hence general solution of the differential equation is

y = c1eαx cos βx + c 2 eαx sin βx ⇒ y = eαx (c1 cos βx + c 2 sin βx)


Example: Solve 2 y ′′ − 5 y ′ − 3 y = 0
Solution: The given differential equation is 2 y ′′ − 5 y ′ − 3 y = 0

Put y = e mx ⇒ y ′ = me mx , y ′′ = m 2 e mx .Substituting in the give differential equation,


( )
we have 2m 2 − 5m − 3 e mx = 0 . Since e mx ≠ 0 x , the auxiliary equation is
1
2 m 2 − 5m − 3 = 0 as e mx ≠ 0 ⇒ (2m + 1)(m − 3) = 0 ⇒ m = − , 3
2
1
Therefore, the auxiliary equation has distinct real roots m1 = − and m 2 = 3
2

Hence the general solution of the differential equation is y = c1e ( −1 / 2) x + c 2 e 3 x


Example 2 Solve y ′′ − 10 y ′ + 25 y = 0

Solution: We put y = e mx ⇒ y ′ = me mx , y ′′ = m 2 e mx

Substituting in the given differential equation, we have (m 2 − 10m + 25)e mx = 0

Since e mx ≠ 0 x , the auxiliary equation is m 2 − 10m + 25 = 0

(m − 5)2 = 0 ⇒ m = 5, 5 .Thus the auxiliary equation has repeated real roots i.e
m1 = 5 = m2 . Hence general solution of the differential equation is

y = c1e 5 x + c2 xe 5 x ⇒ y = (c1 + c2 x)e 5 x


y ′′ − 4 y ′ + 13 y = 0
Example 3 Solve the initial value problem:
y (0 ) = -1, y ′(0 ) = 2
Solution: Given that the differential equation y ′′ − 4 y ′ + 13 y = 0

Put y = e mx ⇒ y ′ = me mx , y ′′ = m 2 e mx

© Copyright Virtual University of Pakistan 126


Differential Equations (MTH401) VU

Substituting in the given differential equation, we have: (m 2 − 4m + 13)e mx = 0

Since e mx ≠ 0 x , the auxiliary equation is m 2 − 4m + 13 = 0


4 ± 16 − 52
By quadratic formula, the solution of the auxiliary equation is m = = 2 ± 3i
2
Thus the auxiliary equation has complex roots m1 = 2 + 3i, m2 = 2 − 3i

Hence general solution of the differential equation is y = e 2 x (c1 cos 3 x + c 2 sin 3 x )

Example 4 Solve the differential equations (a) y′′ + k 2 y = 0 , (b) y′′ − k 2 y = 0

Solution First consider the differential equation y ′′ + k 2 y = 0 ,

Put y = e mx ⇒ y ′ = me mx and y ′′ = m 2 e mx .
(
Substituting in the given differential equation, we have: m 2 + k 2 e mx = 0 )
Since e mx ≠ 0 x , the auxiliary equation is m 2 + k 2 = 0 ⇒ m = ± ki ,
Therefore, the auxiliary equation has complex roots m1 = 0 + ki , m2 = 0 − ki
Hence general solution of the differential equation is y = c1 cos kx + c 2 sin kx

d2y
Next consider the differential equation 2
−k2y = 0
dx
(
Substituting values y and y ′′, we have. m 2 − k 2 e mx = 0 )
Since e mx ≠ 0, the auxiliary equation is m 2 − k 2 = 0 ⇒ m = ± k
Thus the auxiliary equation has distinct real roots m1 = + k , m2 = − k
kx − kx
Hence the general solution is y = c1e +c 2 e .

16.2 Higher Order Equations


If we consider nth order homogeneous linear differential equation

dny d n −1 y dy
an + an −1 + K + a1 + a0 y = 0
n n −1 dx
dx dx
Then, the auxiliary equation is an nth degree polynomial equation

a n m n + a n −1m n −1 + K + a1m + a 0 = 0
16.2.1 Case 1 (Real distinct roots)
If the roots m1 , m2 , K , mn of the auxiliary equation are all real and distinct, then the
general solution of the equation is y = c1e m1 x + c 2 e m 2 x + K + c n e m n x

© Copyright Virtual University of Pakistan 127


Differential Equations (MTH401) VU

16.2.2 Case 2 (Real & repeated roots)


We suppose that m1 is a root of multiplicity n of the auxiliary equation, then it can be
shown that

e m1 x , xe m1 x , K, x n −1e m1 x
are n linearly independent solutions of the differential equation. Hence general solution
of the differential equation is

y = c1e m1 x + c2 xe m1 x + K + cn x n −1e m1 x
16.2.3 Case 3 (Complex roots)
Suppose that coefficients of the auxiliary equation are real.
q We fix n at 6, all roots of the auxiliary are complex, namely
α1 ± iβ1 , α 2 ± i β 2 , α 3 ± iβ 3
§ Then the general solution of the differential equation
y = eα1 x (c1 cos β1 x + c2 sin β1 x) + eα 2 x (c3 cos β 2 x + c4 sin β 2 x)
+ eα3 x (c5 cos β3 x + c6 sin β 3 x )
q If n = 6 , two roots of the auxiliary equation are real and equal and the remaining
4 are complex, namely α 1 ± iβ 1 , α 2 ± iβ 2
Then the general solution is
y = eα1x (c1 cos β 1 x + c 2 sin β1 x) + eα 2 x (c3 cos β 2 x + c 4 sin β 2 x) + c5 e m1x + c 6 xe m1x
q If m1 = α + iβ is a complex root of multiplicity k of the auxiliary equation. Then
its conjugate m2 = α − iβ is also a root of multiplicity k . Thus from Case 2 , the
differential equation has 2k solutions
e (α + iβ )x , xe (α + iβ )x , x 2 e (α + iβ )x , K , x k −1e (α + iβ )x
e (α − iβ )x , xe (α − iβ )x , x 2 e (α − iβ )x , K , x k −1e (α − iβ )x
q By using the Euler’s formula, we conclude that the general solution of the
differential equation is a linear combination of the linearly independent solutions
eαx cos βx, xeαx cos βx, x 2 eαx cos βx, K, x k −1eαx cos βx
eαx sin βx, xeαx sin βx, x 2 eαx sin βx, K , x k −1eαx sin βx
q Thus if k = 3 then
( ) (
y = eαx [ c1 + c 2 x + c3 x 2 cos βx + d1 + d 2 x + d 3 x 2 sin βx] )
16.3 Solving the Auxiliary Equation
Recall that the auxiliary equation of nth degree differential equation is nth degree
polynomial equation
q Solving the auxiliary equation could be difficult
Pn (m) = 0, n > 2

© Copyright Virtual University of Pakistan 128


Differential Equations (MTH401) VU

q One way to solve this polynomial equation is to guess a root m1 . Then m − m1 is a


factor of the polynomial Pn (m) .

q Dividing with m − m1 synthetically or otherwise, we find the factorization


Pn (m) = (m − m1 ) Q(m)
q We then try to find roots of the quotient i.e. roots of the polynomial equation
Q ( m) = 0
p
q Note that if m1 = is a rational real root of the equation
q
Pn (m) = 0, n > 2
then p is a factor of a0 and q of a n .
q By using this fact we can construct a list of all possible rational roots of the
auxiliary equation and test each of them by synthetic division.
Example 1 Solve the differential equation y ′′′ + 3 y ′′ − 4 y = 0

Solution:Given the differential equation y ′′′ + 3 y ′′ − 4 y = 0 . Put y = e mx

⇒ y / = me mx , y // = m 2 e mx and y /// = m 3e mx
Substituting this in the given differential equation, we have

(m 3 + 3m 2 − 4)e mx = 0

Since e mx ≠ 0 ⇒ m 3 + 3m 2 − 4 = 0

So that the auxiliary equation is m 3 + 3m 2 − 4 = 0


Solution of the AE

If we take m = 1 then we see that m 3 + 3m 2 − 4 = 1 + 3 − 4 = 0


Therefore m = 1 satisfies the auxiliary equations so that m-1 is a factor of the polynomial

(
m 3 + 3m 2 − 4 . By synthetic division, we can writ m 3 + 3m 2 − 4 = (m − 1) m 2 + 4m + 4 )
So, m 3 + 3m 2 − 4 = (m − 1)( m + 2) 2 =0 ⇒ (m − 1)( m + 2) 2 = 0 ⇒ m = 1,−2,−2

Hence solution of the differential equation is y = c1e x + c2 e −2 x + c3 xe −2 x


Example 2
Solve 3 y /// + 5 y // + 10 y / − 4 y = 0
Solution: Given the differential equation 3 y /// + 5 y // + 10 y / − 4 y = 0

Put y = e mx ⇒ y / = me mx , y // = m 2 e mx and y /// = m 3 e mx

© Copyright Virtual University of Pakistan 129


Differential Equations (MTH401) VU

Therefore the auxiliary equation is 3m 3 + 5m 2 + 10m − 4 = 0


Solution of the auxiliary equation:
a) ao = −4 and all its factors are:
p: ± 1, ± 2, ± 4
b) a n = 3 and all its factors are:
q: ± 1, ± 3
c) List of possible rational roots of the auxiliary equation is
p −1 1 − 2 2 − 4 4
: - 1, 1, - 2, 2, - 4, 4, , , , , ,
q 3 3 3 3 3 3
d) Testing each of these successively by synthetic division we find
1 3 5 10 −4
 1 2 4
3
3 6 12 0

Consequently a root of the auxiliary equation is m = 1 3


The coefficients of the quotient are 3 6 12

(
Thus we can write the auxiliary equation as: (m − 1 3) 3m 2 + 6m + 12 = 0 )
1
m− =0 or 3m 2 + 6m + 12 = 0 ⇒ m = 1 3 or m = −1 ± i 3
3

(
Hence solution of the given DE is: y = c1e (1 / 3) x + e − x c2 cos 3 x + c3 sin 3 x )
d4y d 2y
Example 3 Solve the differential equation +2 +y=0
dx 4 dx 2

d4y d 2y
Solution: Given the differential equation +2 + y = 0.
dx 4 dx 2

Put y = e mx ⇒ y ′ = me mx , y ′′ = m 2 e mx

(
Substituting in the differential equation, we obtain m 4 + 2m 2 + 1 e mx = 0 )
Since e mx ≠ 0 , the auxiliary equation is m 4 + 2m 2 + 1 = 0 ⇒ (m 2 + 1) 2 = 0
⇒ m = ±i, ± i ⇒ m1 = m3 = i and m2 = m4 = − i
Thus i is a root of the auxiliary equation of multiplicity 2 and so is − i .
Now α = 0 and β = 1 .Hence the general solution of the differential equation is

y = e 0 x [(c1 + c 2 x) cos x + (d1 + d 2 x) sin x ] ⇒ y = c1 cos x + d1 sin x + c 2 x cos x + d 2 x sin x

© Copyright Virtual University of Pakistan 130


Differential Equations (MTH401) VU

Exercise
Find the general solution of the given differential equations.
1. y // − 8 y = 0
2. y // − 3 y / + 2 y = 0

3. y // + 4 y / − y = 0

4. 2 y // − 3 y / + 4 y = 0
5. 4 y /// + 4 y // + y / = 0
6. y /// + 5 y // = 0

7. y /// + 3 y // − 4 y / − 12 y = 0
Solve the given differential equations subject to the indicated initial conditions.
8. y /// + 2 y // − 5 y / − 6 y = 0, y (0) = y / (0) = 0, y // (0) = 1

d4y
9. 4
= 0 , y (0) = 2, y / (0) = 3, y // (0) = 4, y /// (0) = 5
dx

d4y
10. − y = 0 , y (0) = y / (0) = y // (0) = 0, y /// (0) = 1
4
dx

© Copyright Virtual University of Pakistan 131


Differential Equations (MTH401) VU

17 Method of Undetermined Coefficients(Superposition Approach)


Recall
1. That a non-homogeneous linear differential equation of order n is an equation of the
form
dny d n−1 y dy
a n n + a n −1 n −1 + L + a1 + a 0 y = g ( x)
dx dx dx
The coefficients a 0 , a1 , K, a n can be functions of x . However, we will discuss
equations with constant coefficients.
2. That to obtain the general solution of a non-homogeneous linear differential equation
we must find:

q The complementary function y , which is general solution of the associated


c
homogeneous differential equation.
q Any particular solution y of the non-homogeneous differential equation.
p
3. That the general solution of the non-homogeneous linear differential equation is given
by
General solution = Complementary function + Particular Integral
Finding
Complementary function has been discussed in the previous lecture. In the next three
lectures we will discuss methods for finding a particular integral for the non-
homogeneous equation, namely
q The method of undetermined coefficients-superposition approach
q The method undetermined coefficients-annihilator operator approach.
q The method of variation of parameters.
The Method of Undetermined Coefficient
The method of undetermined coefficients developed here is limited to non-homogeneous
linear differential equations
q That have constant coefficients, and
q Where the function g (x) has a specific form.
17.1 The form of Input function g (x)
The input function g (x) can have one of the following forms:
q A constant function k.
q A polynomial function
x
q An exponential function e
q The trigonometric functions sin( β x), cos(β x)
q Finite sums and products of these functions.

© Copyright Virtual University of Pakistan 132


Differential Equations (MTH401) VU

Otherwise, we cannot apply the method of undetermined coefficients.


17.2 Solution Steps
Consist of performing the following steps.
Step 1 Determine the form of the input function g (x) .
Step 2 Assume the general form of y according to the form of g (x)
p

Step 3 Substitute in the given non-homogeneous differential equation.


Step 4 Simplify and equate coefficients of like terms from both sides.
Step 5 Solve the resulting equations to find the unknown coefficients.
Step 6 Substitute the calculated values of coefficients in assumed y
p
17.2.1 Restriction on Input function g
The input function g is restricted to have one of the above stated forms because of the
reason:
q The derivatives of sums and products of polynomials, exponentials etc are again
sums and products of similar kind of functions.
The expression ay + by + cy has to be identically equal to the input
// /
q
p p p
function g (x) .
Therefore, to make an educated guess, y p is assured to have the same form as g .
Caution!
q In addition to the form of the input function g (x) , the educated guess for y must
p
take into consideration the functions that make up the complementary function y
c
.
q No function in the assumed y must be a solution of the associated homogeneous
p
differential equation. This means that the assumed y p should not contain terms
that duplicate terms in y .
c
Taking for granted that no function in the assumed y p is duplicated by a function in y ,
c
some forms of g and the corresponding forms of y p are given in the following table.

© Copyright Virtual University of Pakistan 133


Differential Equations (MTH401) VU

17.3 Trial particular solutions

Number The input function g (x) The assumed particular solution y


p

1 Any constant e.g. 1 A

2 5x + 7 Ax + B

3 3x 2 − 2 Ax 2 + Bx + c

4 x3 − x + 1 Ax 3 + Bx 2 + Cx + D

5 sin 4 x A cos 4 x + B sin 4 x

6 cos 4 x A cos 4 x + B sin 4 x

7 e5x Ae 5 x

8 (9 x − 2)e 5 x ( Ax + B )e 5 x

9 x 2e5x ( Ax 2 + Bx + C )e 5 x

10 e 3 x sin 4 x A e 3 x cos 4 x + B e 3x sin 4 x

11 5 x 2 sin 4 x ( A1 x 2 + B1 x + C1 ) cos 4 x + ( A2 x2 + B2 x + C2 )sin 4 x

12 xe 3x cos 4 x ( Ax + B )e 3 x cos 4 x + (Cx + D)e 3 x sin 4 x

17.4 Input function g (x ) as a sum


Suppose that
q The input function g ( x ) consists of a sum of m terms of the kind listed in the
above table i.e.
g ( x ) = g1 (x ) + g 2 ( x ) + L + g m ( x ).
q The trial forms corresponding to g1 ( x ), g 2 (x ), K, g m ( x ) be y p1 , y p 2 , K , y p m .

© Copyright Virtual University of Pakistan 134


Differential Equations (MTH401) VU

Then the particular solution of the given non-homogeneous differential equation is


y p = y p1 + y p 2 + L + y p m

In other words, the form of y p is a linear combination of all the linearly independent
functions generated by repeated differentiation of the input function g (x) .

Example 1 Solve y // + 4 y / − 2 y = 2 x 2 − 3 x + 6
Solution:
Complementary function: To find y , we first solve the associated homogeneous
c
equation y + 4 y − 2 y = 0
// /

We put y = e mx , y ′ = me mx , y ′′ = m 2 e mx
Then the associated homogeneous equation gives

(m 2 + 4m − 2)e mx = 0

Therefore, the auxiliary equation is m 2 + 4m − 2 = 0 as e mx ≠ 0, x

Using the quadratic formula, roots of the auxiliary equation are m = −2 ± 6


Thus we have real and distinct roots of the auxiliary equation
m1 = −2 − 6 and m 2 = −2 + 6 .

− (2 + 6 ) x (−2 + 6 ) x
Hence the complementary function is y = c1e + c2 e
c
Next we find a particular solution of the non-homogeneous differential equation.

Particular Integral Since the input function g ( x) = 2 x 2 − 3 x + 6

is a quadratic polynomial. Therefore, we assume that y p = Ax 2 + Bx + C

⇒ y p = 2 Ax + B and y p = 2 A
/ //

⇒ y p + 4 y p − 2 y p = 2 A + 8 Ax + 4 B − 2 Ax 2 − 2 Bx − 2C
// /

Substituting in the given equation, we have


2 A + 8 Ax + 4 B − 2 Ax 2 − 2 Bx − 2C = 2 x 2 − 3 x + 6
Or − 2 Ax 2 + (8 A − 2 B ) x + (2 A + 4 B − 2C ) = 2 x 2 − 3 x + 6
Equating the coefficients of the like powers of x , we have
- 2A = 2 , 8A - 2B = - 3 , 2A + 4B - 2C = 6
Solving this system of equations leads to the values
A = −1, B = − 5 2, C = −9. Thus a particular solution of the given equation is

© Copyright Virtual University of Pakistan 135


Differential Equations (MTH401) VU

5
y p = −x 2 − x − 9 .Hence, the general solution of the given non-homogeneous
2
differential equation is given by y = y + y p
c

x − 9 + c1e − (2 + 6 ) x + c2 e (−2 + 6 ) x
5
⇒ y = −x2 −
2
Example 2 Solve the differential equation y // − y / + y = 2 sin 3 x
Solution: Complementary function: To find y , we solve the associated homogeneous
c
differential equation y − y + y = 0 .Put y = e
// / mx ⇒ y′ = me mx , y′′ = m 2e mx
.Substitute in the given differential equation to obtain the auxiliary equation
1± i 3
m2 − m + 1 = 0 ⇒ m =
2
Hence, the auxiliary equation has complex roots. Hence the complementary function is

(1 / 2) x  3 3 
y =e  c1 cos x + c 2 sin x 
c 2 2
 
Particular Integral Since successive differentiation of g ( x) = sin 3 x produce
sin 3 x and cos 3x .Therefore, we include both of these terms in the assumed particular
solution, see table
y = A cos 3 x + B sin 3 x. ⇒ y ′ = −3 A sin 3 x + 3B cos 3 x. y ′′ = −9 A cos 3 x − 9 B sin 3 x.
p p p

∴ y p − y p + y p = (−8 A − 3B ) cos 3 x + (3 A − 8 B ) sin 3 x.


// /

Substituting in the given differential equation:


(−8 A − 3B ) cos 3 x + (3 A − 8 B ) sin 3 x = 0 cos 3 x + 2 sin 3 x.
From the resulting equations − 8 A − 3B = 0, 3 A − 8 B = 2
Solving these equations, we obtain A = 6 / 73, B = −16 / 73
6 16
A particular solution of the equation is y = cos 3 x − sin 3x
p 73 73
Hence the general solution of the given non-homogeneous differential equation is

(1 / 2) x  3 3  6 16
 + cos 3 x − sin 3x
y=e  c cos x + c sin x
2  73
1 2
 2 73

Example 3 Solve y // − 2 y / − 3 y = 4 x − 5 + 6 xe 2 x
Solution: Complementary function

© Copyright Virtual University of Pakistan 136


Differential Equations (MTH401) VU

To find y , we solve the associated homogeneous equation y // − 2 y / − 3 y = 0


c

Put y = e mx ⇒ y′ = me mx , y′′ = m 2e mx
Substitute in the given differential equation to obtain the auxiliary equation
m 2 − 2m − 3 = 0
⇒ m = −1, 3
⇒ (m + 1)( m − 3) = 0
Therefore, the auxiliary equation has real distinct root m1 = −1, m = 3
2

Thus the complementary function is y = c1e − x + c e 3 x .


c 2
Particular integral

Since g ( x) = (4 x − 5) + 6 xe 2 x = g1 ( x) + g 2 ( x)
Corresponding to g 1 ( x) : y = Ax + B
p
1

Corresponding to g 2 ( x ) : y = (Cx + D)e 2 x


p
2

The superposition principle suggests that we assume a particular solution

y p = y p + y p ⇒ y p = Ax + B + (Cx + D ) e 2 x ⇒ y ′p = A + 2(Cx + D) e 2 x + Ce 2 x
1 2

⇒ y ′p′ = 4(Cx + D ) e 2 x + 4Ce 2 x .Substituting in the given:

y p // − 2 y p / − 3 y p = 4Cxe 2 x + 4 De 2 x + 4Ce 2 x − 2 A − 4Cxe 2 x



− 4 De 2 x − 2Ce 2 x − 3 Ax − 3B − 3Cxe 2 x − 3De 2 x
Simplifying and grouping like terms

y p // − 2 y p / − 3 y p = −3 Ax − 2 A − 3B − 3Cxe 2 x + (2C − 3D )e 2 x = 4 x − 5 + 6 xe 2 x .

Substituting in the non-homogeneous differential equation, we have

− 3 Ax − 2 A − 3B − 3Cxe 2 x + (2C − 3D )e 2 x = 4 x − 5 + 6 xe 2 x + 0e 2 x

Now equating constant terms and coefficients of x , xe 2 x and e 2 x , we obtain


− 2 A − 3 B = −5 , − 3 A = 4 , − 3C = 6 , 2C − 3D = 0
A = − 4 3, B = 23 9
Solving these algebraic equations, we find
C = −2, D = -4 3
Thus, a particular solution of the non-homogeneous equation is
y p = −(4 3) x + (23 9) − 2 xe 2 x − (4 3)e 2 x

© Copyright Virtual University of Pakistan 137

You might also like