Vous êtes sur la page 1sur 30

PBC Lecture Notes Series: Differential Equations / Dr.

Abhijit Kar Gupta 1

Ordinary Differential Equations


(Combined Lectures, 1st Ed.)
Lecture Notes prepared by-
Dr. Abhijit Kar Gupta
Physics Department, Panskura Banamali College
Panskura R.S., East Midnapore, WB, India, Pin-code: 721152
E-mail: kg.abhi@gmail.com

Lecture-1

Books to be consulted:

1. Differential Equations with Applications and Historical Notes


- George F. Simmons (Tata McGraw-Hill)
2. Differential and Integral Calculus I & II
- N. Piskunov (MIR Pub., Moscow)
3. Introduction to Mathematical Physics
- Charlie Harper (PHI)
4. Mathematical Physics
- H. K. Dass (S. Chand & Company Ltd.)

We start from Definition:

A differential equation is one which connects the independent variable x , unknown


dy d 2 y dny
function y = f (x) and its derivatives , ,…… .
dx dx 2 dx n
 dy d 2 y 
In general, F  x, y, , 2 ......  = 0 …………………….. (1)
 dx dx 
Example:
d2y dy
2
+k − c = 0 ……………………………………………….(2)
dx dx
In Physics:
d 2x dx
m 2
= mg − k ………………………………………………(3)
dt dt
A body of mass m is falling under gravity through a medium where it offers a force of
resistance proportional to the speed of the body. One has to solve the equation to know
the instantaneous position and velocity of the body.

• TYPE of differential equation:


PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 2

If the function y = f (x) is a function of one independent variable x , then the differential
equation is called ORDINARY.

• ORDER of differential equation:

The order of a differential equation is the order of the highest derivative which appears in the
equation.
dy
For example, the equations (2) and (3) are 2nd order and an equation like − 5 xy 2 + 10 = 0 is
dx
1st order equation.

TO SOLVE:

We have to find out the form of y = f (x) from any given differential equation. We can
easily check the correctness of a solution if we put back the relation y = f (x) into the
corresponding differential equation and arrive at an identity (both sides equal).

Example:

Consider the equation for a simple harmonic motion (SHM),


d2y
2
+ ω 2 y = 0 . [an ordinary 2nd order differential equation]
dx

The functions y = A sin ωx and y = B cos ωx will satisfy the equation, where A and B
are constants. Therefore, these are two solutions of the SHM equation which we obtain
by trial. In general, the function y = A sin ωx + B cos ωx will also satisfy the equation and
thus a general solution.

Solutions of First Order Differential Equations

• Equations with separated variables (or separable variables):

Let us consider
dy
= f 1 ( x) f 2 ( y ) ……………………………(1)
dx
To solve the above equation,
1
dy = f1 ( x)dx …………………………(2)
f 2 ( y)
L.H.S. of equation (2) is a function of y only and the R.H.S. is a function of x alone.
Thus the variables x and y are separated. Hence, to get the solution, we integrate on
both sides of (2) and obtain,
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 3

1
∫f
2 ( y)
dy = ∫ f1 ( x)dx + c.

The equation (2) can also be written in the following form:


M ( x)dx + N ( y )dy = 0 .
st
Therefore, any 1 order equation of the above form is also having separated variables.

Example:

dy x
#1. + =0
dx y
The above can be written in the form
xdx + ydy = 0.
x2 y2
∴ We get after integrating, + =c.
2 2
#2. Example from Physics: Radioactive Decay

If m is the mass of a radioactive substance (Radium) at any time t , then the rate of
change of the mass (rate of decay) is as follows:
dm
= − km ,
dt
where k is a constant. To solve we separate the variables t and m .

dm
= − kdt .
m
Integrating on both sides,
ln m = − kt + ln c
Or, m = ce − kt .
Boundary Condition:
At the start of the decay process, t = 0 , the mass of the radioactive substance was
m = m0 .
∴ m = m0 e − kt ⇒ This is Radioactive decay law.
m0

Lecture-2

Homogeneous Function:
Let us have a function f ( x, y ) . If we replace x by λx and y by λy ,
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 4

i.e., x → λx and y → λy and we get the following identity


f ( λ x , λ y ) = λ n f ( x, y )
Then the function f ( x, y ) is called a Homogeneous function of degree n .

Examples:
#1. f ( x, y ) = xy − y 2
f (λx, λy ) = λ2 xy − λ2 y 2 = λ2 ( xy − y 2 ) = λ2 f ( x, y )
This is a homogeneous function of degree 2.
x2 − y2
#2. f ( x, y ) =
xy
λ2 ( x 2 − y 2 ) x2 − y2
f ( λx, λy ) = = = λ 0 f ( x, y )
λ xy
2
xy
This is a homogeneous function of degree zero.

Homogeneous Equation:
dy
An equation of the type = f ( x, y ) , where f ( x, y ) is a homogeneous function in x
dx
and y with degree zero is called a homogeneous equation.

Solution of 1st Order Ordinary Homogeneous differential


equation

# <Example>
dy xy
= 2 …………………………..(1)
dx x − y 2
The right hand side of equation (1) is a homogeneous function of degree zero which can
be verified by putting x → λx and y → λy .
Therefore, the given equation is a homogeneous equation.
The function can be rearranged to write:
xy y/x
f ( x, y ) = 2 = .
x −y 2
1− y2 / x2
Let us substitute u = y / x .
dy du
∴ y = ux ⇒ =u+x .
dx dx
du u
Equation (1) now becomes u + x =
dx 1 − u 2
du u u3
⇒ x = − u =
dx 1 − u 2 1− u2
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 5

1− u2 dx
⇒ 3
du = [The variables are now separated]
u x
Integrating both sides,
 1 1 dx
∫  u 3
− du = ∫
u x
1
⇒ − − ln u = ln x + ln c
2u 2

1
⇒ ln(cux) = −
2u 2
1
⇒ ln(cy) = − 2 [since, y = ux ]
2u
⇒ x = y − 2 ln(cy ) This is the solution.

Some 1st Order Inhomogeneous differential equations can be


reduced to Homogeneous equations.

# <Example>
dy x + y − 3
= …………………………(1)
dx x − y − 1
x+ y −3
Here it can be checked that the function f ( x, y ) = is not a homogeneous
x − y −1
function because of the constants.
If we substitute x = x1 + h and y = y1 + k then
dy1 x1 + h + y1 + k − 3 x + y1 + (h + k − 3)
= = 1 = f ( x1 , y1 ) .
dx1 x1 + h − y1 − k − 1 x1 − y1 + (h − k − 1)
f ( x1 , y1 ) will be homogeneous if
h + k − 3 = 0 ……………….(i) and
h − k − 1 = 0 ……………… (ii)
Solving (i) and (ii) we get h = 2 , k = 1 .
Now we have to solve
dy1 x1 + y1 1 + y1 / x1
= = ……………………….(2)
dx1 x1 − y1 1 − y1 / x1
We substitute u = y1 / x1 .
⇒ y1 = ux1
dy du
∴ 1 = u + x1
dx1 dx1
Hence, the equation (1) becomes
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 6

du 1 + u du 1 + u 2
u + x1 = ⇒ x1 =
dx1 1 − u dx1 1 − u
1− u dx
⇒ du = 1 [The variables are now separated]
1+ u 2
x1
Integrating both sides,
 1 u  dx1
∫ 1 + u 2 − 1 + u 2 du = ∫ x1
1
( )
⇒ tan −1 u − ln 1 + u 2 = ln x1 + ln c
2
⇒ tan −1 u = ln | cx1 1 + u 2 |
−1
⇒ cx1 1 + u 2 = e tan u
y −1
Putting back u = 1 , c x12 + y12 = e tan y1 / x1
x1
Now replacing x1 = x − h = x − 2 and y1 = y − k = y − 1 , we get the final solution:
 y −1 
tan −1  
 x−2 
c ( x − 2) + ( y − 1) = e
2 2
.

General Prescription:
• Any 1st order Homogeneous diff. equation can be reduced to an
equation with separated variables and then it can be solved by
integration.
• If any 1st order Non-Homogeneous equation can be reduced to
Homogeneous one then the previous step can be followed.

Lecture-3

First Order Linear Equations of the following type:

dy dy
+ P ( x) y = Q ( x) Linear in the unknown function y and its derivative .
dx dx

Method of separation of variables

We ask the solution in the form y = u ( x)v( x)


# <Example>
dy  2 
−  y = ( x + 1) …………………………..(1)
3

dx  x + 1 
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 7

 2 
 and Q( x) = (x + 1)
3
Here P ( x) = −
 x + 1
dy dv du
Let us put y = uv. ∴ We then have =u +v .
dx dx dx
Equation (1) reduces to
dv du  2 
u +v − uv = ( x + 1)
3

dx dx  x + 1 
 dv 2  du
⇒ u − v + v = ( x + 1) 3 ………………………………(2)
 dx x + 1  dx
Suppose we choose the function v such that the term
dv  2 
− v = 0 .
dx  x + 1 
dv  2 
∴ = dx ⇒ ln | v |= 2 ln | x + 1 | + ln c ⇒ v = c( x + 1) .
2

v  x +1
Putting the above expression of v in (2) we get the following equation in u :
du
c( x + 1) 2 = ( x + 1) 3
dx
du 1
⇒ = ( x + 1) 2
dx c
( x + 1) 2
Integrating, u = A′ + B ′ , where A′ and B ′ are constants.
2
∴ The complete solution (complete integral) of the given equation (1) will be of the form
( x + 1) 4
y=A + B( x + 1) 2 . Solution.
2

Note:

If in the linear equation (1) the functions P( x) and Q( x) are just constants then the
solution is easy to find.
dy
+ ay = b , where a and b are constants.
dx
dy
Then = − ay + b The variables are readily separable.
dx
dy 1
⇒ = dx ⇒ − ln | −ay + b |= x + c1
− ay + b a
− ( ax + c2 )
⇒ − ay + b = e [ c 2 = c1 .a ]
b 1
∴ y = ce − ax + [ c = − e − c2 ]
a a

First Order Nonlinear Equations: Bernoulli’s Equation


PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 8

dy
+ P ( x) y = Q ( x) y n
dx
Equation of the above type is called Bernoulli’s equation.
Dividing both sides by y n we get,
dy
y −n + P( x) y − n +1 = Q( x) This is a nonlinear equation.
dx
The above can be converted into a linear equation if we substitute

z = y − n +1

dz dy
We have = (−n + 1) y − n
dx dx
1 dz dz
∴ + P( x) z = Q( x) ⇒ + (−n + 1) P( x) z = (−n + 1)Q( x) .
(−n + 1) dx dx
So, the above equation is a linear equation again.
Now we substitute
z = uv
as before and proceed to find solution.

# <Example>

dy
+ xy = x 3 y 3 ………………….(1)
dx
Dividing both sides by y 3 , we have
dy
y −3 + xy − 2 = x 3 ………………(2)
dx
Substitute z = y −2 to have
dz dy
= −2 y −3 …………………..(3)
dx dx
Put (3) in (2),
dz
− 2 xz = −2 x 3 ……………..(4)
dx
The above is a linear equation where P( x) = −2 x , Q( x) = −2 x 3 .
To find the complete integral we substitute
z = uv .
dz dv du
∴ =u +v
dx dx dx
dz
Put the expressions of z and back in (4),
dx
dv du
u +v − 2 xuv = −2 x 3
dx dx
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 9

 dv  du
⇒ u − 2 xv  + v = −2 x 3 .
 dx  dx
Now v can be chosen such that the expression in the bracket may be zero.

dv dv
Therefore, − 2 xv = 0 ⇒ = 2 xdx
dx v
2
Or, ln | v |= x 2 ⇒ v = e x .

du
To find u , we have now v = −2 x 3 .
dx
2 du
∴ ex = −2 x 3
dx
du 2
⇒ = −2e − x x 3
dx
⇒ u = −2 ∫ e − x x 3 dx + c
2

Integrating by parts we find:


2 2
u = x 3e − x + e − x + c
2
∴ z = uv = x 2 + 1 + ce x
2
⇒ y −2 = x 2 + 1 + ce x . Solution.

Lecture-4

Exact Differential Equations

Any 1st order differential equation can be written in the following form:

M ( x, y )dx + N ( x, y )dy = 0 ……………………….(1)


where M ( x, y ) and N ( x, y ) are differentiable functions of x and y .
We can say, the equation (1) is exact if it can be written in the form:
df ( x, y ) = 0 ……………………….(2)
Equation (2) can be integrated easily and the complete integral (solution) is
f ( x, y ) = C ,
where C is an integration constant.

# <Example>
dy x
+ =0
dx y
The above can be written in the form
xdx + ydy = 0
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 10

1
⇒ d (x2 + y 2 ) = 0
2
⇒ d (x 2 + y 2 ) = 0
∴ x2 + y2 = C Soln.

• Condition for Exactness:


∂f ∂f
M ( x, y )dx + N ( x, y )dy = df ( x, y ) = dx + dy
∂x ∂y
Then
∂f
M = …………………….(A)
∂x
∂f
N= ……………………..(B)
∂y
Differentiating (A) with respect to y and (B) with respect to x , we obtain
∂M ∂ 2 f
=
∂y ∂y∂x
∂N ∂ 2 f
= .
∂x ∂x∂y
Assuming continuity of the second derivative we can write,

∂M ∂N
=
∂y ∂x

The above is a necessary condition for the equation (1) to be exact differential one.

To find a solution:

From the relation (A) we can write,


f = ∫ M ( x, y )dx + φ ( y ) , after Integrating.
Here φ ( y ) is an integration constant which is a function of y only.
Again differentiating the above we get,
∂f ∂M
=∫ dx + φ ′( y ) = N ( x, y ) [ from the relation (B)]
∂y ∂y
Then we proceed to find φ ( y ) .

# <Example>
To examine if the following equation is exact and then solve:
2x  y 2 − 3x 2 
dx +  dy = 0 …………………………..(1)
y3  y4 
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 11

2x
M =
y3
y 2 − 3x 2
N=
y4
We have
∂M 6x
= − 4 and
∂y y
∂N 6x
=− 4 (provided y ≠ 0 )
∂x y
The given equation (1) is thus an exact differential equation. This means df ( x, y ) = 0.
To find the complete integral:
∂f 2 x
Let us take M = = .
∂x y 3
Integrating both sides,
2x
f = ∫ 3 dx + φ ( y )
y
x2
∴ f = 3 + φ ( y ) …………………………..(2)
y
Differentiating (2) on both sides w.r.t. y and noting that
∂f y 2 − 3x 2
=N=
∂y y4
We find
3x 2 y 2 − 3x 2
− + φ ′( y ) = .
y4 y4
1 1
∴ φ ′( y ) = 2 ⇒ φ ( y ) = − + c1
y y
So, we now have from (2),
x2 1 1
f ( x, y ) = 3 − +
y y c1
Thus the complete integral of the given equation is
f ( x, y ) = constant
x2 1
⇒ 3 − =C.
y y

Home Work Problems:

Check if the following equations are exact. In that case find the solutions,

(
#1. 2 + x 2 ) dy
dx
+ 2 xy = 0
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 12

dy
#2. sin 2 x + 2 y cos 2 x = 0
dx
dy
#3. (x + y ) + y − x = 0 with boundary condition y (1) = 0
dx
#4. (2 + x 2 y ) + xy 2 = 0 with boundary condition y (1) = 2 .
dy
dx

Lecture-5

Integrating Factor

If the equation
M ( x, y )dx + N ( x, y )dy = 0 ……………….(1)
is not an exact differential equation then we can sometimes choose a function µ ( x, y )
such that after w multiply the original equation by this, the equation is converted into an
exact differential one.
The function µ ( x, y ) is called the Integrating factor of the given equation.

After multiplying by the integrating factor:


µMdx + µNdy = 0 ……………….(2)
Equation (2) will be exact when we have

(µM ) = ∂ (µN )
∂y ∂x
∂M ∂µ ∂N ∂µ
⇒ µ +M =µ +N
∂y ∂y ∂x ∂x
∂µ ∂µ  ∂N ∂M 
⇒ M −N = µ  − 
∂y ∂x  ∂x ∂y 
1 ∂µ 1 ∂µ  ∂N ∂M 
⇒ M −N = − 
µ ∂y µ ∂x  ∂x ∂y 
∂ ln µ ∂ ln µ  ∂N ∂M 
⇒ M −N =  −  …………………(3)
∂y ∂x  ∂x ∂y 
Therefore, the integrating factor µ ( x, y ) has to satisfy the above relation.
• In a special case, if µ is a function of y only then we can write

d ln µ  ∂N ∂M  d ln µ 1  ∂N ∂M 
M =  −  ⇒ =  − 
dy  ∂x ∂y  dy M  ∂x ∂y 
Similarly, if µ is a function of x only then we can write

d ln µ  ∂N ∂M  d ln µ 1  ∂N ∂M 
−N =  −  ⇒ = −  −  .
dx  ∂x ∂y  dx N  ∂x ∂y 
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 13

# <Example>
To solve the following equation:
( )
y + xy 2 dx − xdy = 0 ……………(1)
Here,
M = y + xy 2 , N = − x
∂M ∂N
∴ = 1 + 2 xy , = −1
∂y ∂x
∂M ∂N
Thus ≠ . Therefore, the given equation is not exact differential equation.
∂y ∂x
Here we have
 ∂N ∂M 
 −  = −1 − 1 − 2 xy = −2(1 + 2 xy )
 ∂x ∂y 
Also it is seen that

1  ∂N ∂M  − 2(1 + xy ) 2
 −  = = − which is a function of y only.
M  ∂x ∂y  y + xy 2
y
Thus we conclude that the possible integrating factor may be a function of y only.
Therefore,
d ln µ 2
=−
dy y
⇒ ln µ = −2 ln y , after integrating
1
⇒ µ = 2 , so this is the choice of integrating factor.
y
Multiplying the original equation (1) by this integrating factor,
1  x
 + x dx − 2 dy = 0 ……………….(2)
y  y
∂M ∂N 1
Now it can be verified that = =− 2 .
∂y ∂x y
Therefore, the equation (2) is exact differential equation.
Equation (2) can be rewritten as
 x x2 
d  +  = 0
y 2 
x x2
∴ + = C , C is integration constant.
y 2
2x
∴ y=− 2 Solution.
x + 2C
∂f ∂f
[Equation (2) can also be solved formally assuming M = and N = etc.]
∂x ∂y
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 14

Special Case:

If the 1st order equation can be written in the form:


dy
+ P ( x) y = Q ( x)
dx
Then the Integrating factor can be shown to be

e∫
P ( x ) dx

# <Example>

dy
+ 2y = x
dx
Integrating factor: e 2 x

dy
∴ e2x + 2e 2 x y = xe 2 x
dx

d
dx
(ye 2 x ) = xe 2 x
⇒ ye 2 x = ∫ xe 2 x dx
1 2x 1 2x
⇒ ye 2 x = xe − e + c.
2 4

Lecture-6

Second-Order Differential Equations

We consider differential equations of the following type:


d2y dy
2
+ p + qy = f ( x)
dx dx

• The equation is LINEAR as this is first degree in y and its derivatives.


• The equation has constant coefficients: p and q .
• The equation will be called HOMOGENEOUS when f ( x) = 0 . Otherwise, it is
called non-homogeneous equation.

d2y dy
Solutions for Homogeneous Equation: 2
+ p + qy = 0
dx dx
(i) If y1 and y 2 are two particular solutions then ( y1 + y 2 ) is also a solution. This
can be easily verified by putting the solutions back in the equations.
(ii) If y1 is a solution and C is a constant then Cy1 is also a solution.
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 15

(iii) If y1 and y 2 are two independent solutions then y = C1 y1 + C 2 y 2 is a general


solution, where C1 and C 2 are constants.

Note:
To find out the general solution of the Homogeneous equation what we have to do is to
find two linearly independent solutions and then the general solution can be constructed
by combining the.
What do you mean by ‘linearly independent’?
If y1 ( x) and y 2 ( x) are two solutions and we have
y1 ( x)
= φ ( x) , [some function of x ]
y 2 ( x)
then the solutions are linearly independent. Otherwise, if
y1 ( x)
= Constant (independent of x ), the solutions are dependent.
y 2 ( x)

Method of Trial:
d2y dy
Homogeneous equation: 2
+ p + qy = 0 ……………..(1)
dx dx
Let us look for the particular solutions in the form:
y = e kx , where k = Constant.
Then
dy
= ke kx
dx
d2y
2
= k 2 e kx
dx
Substituting the above two in equation (1), we get
e kx (k 2 + pk + q ) = 0 .
Since e kx ≠ 0 ,
k 2 + pk + q = 0 …………….(2)
Equation (2) is called auxiliary equation.
The solutions of the quadratic equation:
p p2 p p2
k1 = − + − q , k2 = − − −q
2 4 2 4

The following cases are possible:

(I) k1 and k 2 are real numbers and k1 ≠ k 2


(II) k1 and k 2 are complex numbers
(III) k1 and k 2 are real numbers and k1 = k 2 .
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 16

Case-I
Two unequal real roots k1 ≠ k2

We have two independent particular solutions:


y1 = e k1x and y1 = e k 2 x
The complete integral or general solution can be written as
y = c1e k1 x + c2e k 2 x

# Example:
y ′′ + y ′ − 2 y = 0
The auxiliary equation is
k2 + k −2 = 0
Two roots are
k1 = 1 , k 2 = −2
∴ The complete integral is
y = c1e x + c 2 e −2 x

Case-II
Two complex roots

They come in pairs (complex conjugates)


k 1 = α + iβ , k 2 = α − iβ
p p2
Here α = − and β = q − .
2 4
Two particular solutions are
y1 = e (α +iβ ) x and y 2 = e (α −iβ ) x
Splitting the Real and Imaginary parts,
y1 = eαx (cos β x + i sin βx ) = eαx cos β x + ie αx sin βx
y 2 = eαx (cos βx − i sin β x ) = e αx cos β x − ie αx sin βx

Now it can be shown that each real and imaginary part can be a particular solution of the
original equation:
y1 = eαx cos βx (real part)
y 2 = eαx sin β x (imaginary part)

Also we see that y1 y 2 = cot βx ≠ constant.


Thus we can say we have two independent particular solutions y1 and y 2 .
Hence, the general solution is
y = c1 y1 + c 2 y 2
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 17

= eαx (c1 cos βx + c 2 sin βx ) .


# Example:
y ′′ + 9 y = 0
The auxiliary equation is
k2 +9 = 0
Two roots are
k1 = 3i , k 2 = −3i
Here α = 0 and β = 3
The general solution is
y = c1 cos 3 x + c 2 sin 3 x .

Case-III
Two roots are real and equal k1 = k 2 = k

One particular solution is y1 = e kx .


To find another particular solution independent of the above we take, y2 = xekx .
Now we can check that y1 and y2 both satisfy the differential equation and they are
linearly independent.

∴ The general solution is


y = c1e kx + c2 xekx
= e kx (c1 + c2 x) .

# Example:
y′′ − 4 y′ + 4 y = 0
The auxiliary equation is
k 2 − 4k + 4 = 0
Two roots are
k1 = k 2 = 2
The complete integral (general solution) is then
y = c1e 2 x + c2 xe2 z .

Lecture-7

Solutions for NonHomogeneous Equation:


d2y dy
2
+ p + qy = f ( x) …………………..(1)
dx dx
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 18

The general solution of the nonhomogeneous equation (1) is written as sum of


• The general solution of the corresponding homogeneous part y
• Particular solution of the nonhomogeneous equation (1), y *

The sum y = y + y * is the general solution of the equation (1),

A General Method for finding particular solution of a nonhomogeneous equation

Let the right hand side of equation (1) is of the following form:

f ( x) = Pn ( x)eαx

Where Pn ( x) is a polynomial of degree n .

Case-I
The number α is not a root of the auxiliary equation k 2 + pk + q = 0 of the
corresponding homogeneous equation:
d2y dy
2
+ p + qy = 0 …………………..(2)
dx dx
Then we can seek the particular solution in the form
y * = Qn ( x)eαx , ………………………...(3)
where Qn ( x) is a polynomial of degree n .
Substituting (3) in (2) and equating the coefficients of the same degrees on both sides, we
can determine the unknown coefficients in
Qn ( x) = a 0 + a1 x + a 2 x 2 + ............... + a n x n .

Case-II
When the number α is a simple (single) root of the auxiliary equation, we seek the
particular solution of the form:
y * = xQn ( x)eαx .

Case-III
When the number α is a double root of the auxiliary equation, we seek the particular
solution of the form:
y * = x 2 Q n ( x ) e αx .

Examples:

#1. Find the general solution of the equation


y // + 4 y / + 3 y = x …………….(1)
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 19

Soln.
The corresponding homogeneous equation of the given nonhomogeneous 2nd order
differential equation (1) is
y ′′ + 4 y ′ + 3 y = 0 ……………………….(2)
Considering the trial solution y = e kx we get the auxiliary equation:
k 2 + 4k + 3 = 0

The two roots are k1 = −1 , k 2 = −3 .


Therefore, the general solution for the homogeneous equation (2) is
y = c1e − x + c 2 e −3 x .

To find the particular solution of the given nonhomogeneous equation (1), we consider
f ( x) = x.e 0. x [ This is of the form P1 ( x)e αx with α = 0 ]
Here we seek the particular solution of the form
y * = Q1 ( x)e 0. x
Thus we take
y * = (a 0 + a1 x)
/ //
∴ y * = a1 , y* = 0 .
Substituting the above in (1) we find
4a1 + 3(a 0 + a1 x) = x .
Equating the coefficients of identical powers of x on both sides, we get
3a1 = 1
3a 0 + 4a1 = 0
We obtain
1 4
a1 = , a 0 = −
3 9
1 4
∴ y* = x −
3 9
Thus the general solution of the given nonhomogeneous equation is
y = y + y*
1 4
⇒ y = c1e − x + c 2 e −3 x + x − .
3 9

• Home Work problem:

Find the general solution of the equation


y // + 9 y = ( x 2 + 1)e 3 x

1 1 5
Ans. y = c1 cos 3x + c 2 sin 3x +  x 2 − x + e 3 x .
 18 27 81 
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 20

Lecture-8

Nonhomogeneous second order Linear equations with constant coefficients:

Example #1
y // − 7 y / + 6 y = ( x − 2)e x ………………………….(1)
Soln.
Auxiliary equation for the corresponding homogeneous equation y // − 7 y / + 6 y = 0 is
k 2 − 7k + 6 = 0 ……………………………………..(2)
The two roots are k1 = 1 and k 2 = 6 .
∴ The general solution of the homogeneous equation is
y = c1e x + c 2 e 6 x

Here, the right side of the given equation (1) is of the form P1 ( x)e x and the coefficient 1
in the exponential is a simple root of the auxiliary equation (2). Hence, we seek the
particular solution in the form
y * = xQ1 ( x)e x
or y * = x( Ax + B)e x
/
From above we get y * = ( Ax 2 + Bx)e x + e x (2 Ax + B )
//
y * = ( Ax 2 + Bx)e x + 2 Ae x + e x (4 Ax + 2 B)
Putting the above expressions in equation (1), we have

[( Ax ]
+ Bx) + (4 Ax + 2 B) + 2 A − 7( Ax 2 + Bx) − 7(2 Ax + B) + 6( Ax 2 + Bx) e x = ( x − 2)e x
2

⇒ (−10 Ax − 5B + 2 A)e x = ( x − 2)e x

Equating the coefficients of identical powers of x on both sides,

− 10 A = 1
− 5 B + 2 A = −2
1 9
Thus we obtain A = − , B = .
10 25
 1 9 
Therefore, the particular solution is y * = x − x + e x
 10 25 
Hence, the general solution of the given (Nonhomogeneous) equation is

 1 9 
y = c1e x + c 2 e 6 x + x − x + e x .
 10 25 

Example #2
y // + 2 y / + 5 y = 2 cos x
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 21

The corresponding auxiliary equation is k 2 + 2k + 5 = 0 .


Two roots are:
k1 = −1 + 2i , k1 = −1 − 2i
Therefore, the general solution of the corresponding homogeneous equation is
y = e − x (c1 cos 2 x + c 2 sin 2 x)
We seek the particular solution of the honhomogeneous equation in the form:
y * = A cos x + B sin x
To determine the constant coefficients A and B we find y * / and y * // and put them back
in the given equation.
We obtain
− A cos x − B sin x + 2(− A sin x + B cos x) + 5( A cos x + B sin x) = 2 cos x

Equating the coefficients of cos x and sin x , we get


− A + 2B + 5 A = 2
− B − 2 A + 5B = 0
Whence,
2 1
A= , B=
5 5
∴ The general solution of the given equation is

y = y + y*
2 1
= e − x (c1 cos 2 x + c 2 sin 2 x) + cos x + sin x .
5 5

Example from Physics: Vibrations in Mechanical Systems

d 2x
2
+ω2x = 0 Simple Harmonic Motion
dt
d 2x dx
2
+γ +ω2x = 0 Damped S.H.M.
dt dt
d 2x dx
2
+γ + ω 2 x = f (t ) Damped and forced S.H.M.
dt dt

Home Work Problems:


1. y // + 2 y / + 10 y = 0
2. y // + 4 y = 2 sin 2 x
3. y // − 2 y / + 3 y = e − x cos x
4. y // + 6 y / + 5 y = e 2 x
5. y // − 3 y / = 2 − 6 x
6. y // − 9 y = cos x.e 3 x .
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 22

Lecture-9

Some More Problems:


#1. y // + y / + 2 y = 4e x + 2 x 2
Hints:
The particular solution will have the form y * = Ae x + Bx 2 + Cx + D
#2. y // + 9 y = x 2 + sin 2 x
#3. y // + 4 y = 2 sin 2 x , with initial values: y (0) = 0 , y / (0) = 0
#4. y // + 4 y / + 5 y = x 2 + 5 , with initial values: y (0) = 0 , y / (0) = 0

Systems of Ordinary Differential Equations

In the solution of many problems it is required to find the functions y1 ( x) , y 2 ( x) …etc. of


the same argument x where the functions y1 , y 2 …satisfy a system of differential
equations as in the following:

dy1
= f1 ( x, y1 , y 2 ) ………………….(1)
dx
dy 2
= f 2 ( x, y1 , y 2 ) …………………..(2)
dx

Here, we have two coupled differential equations. The task is to find out the solutions
y1 ( x) and y 2 ( x) .

Example #1

Integrate the system:


dy
= y + z + x ……………….(1)
dx
dz
= −4 y − 3z + 2 x ………….(2)
dx
with the initial conditions y ( x = 0) = 1 , z ( x = 0) = 0 .

To find solutions:
Differentiate equation (1)
d 2 y dy dz
= + + 1 …………...(3)
dx 2 dx dx
Put back equation (2) into equation (3):
d 2 y dy
= + (−4 y − 3z + 2 x) + 1
dx 2 dx
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 23

dy  dy 
= − 4 y + 2 x + 1 − 3 − y − x  [From eqn. (1)]
dx  dx 
d2y dy
⇒ 2
+ 2 + y = 5 x + 1 …………………….(4).
dx dx

Therefore, we have got a 2nd order differential equation with constant coefficients in
above. The general solution of equation (4) is
y = (c1 + c 2 x)e − x + 5 x − 9 .

dy
Now we have, z= − y−x
dx
= (c 2 − 2c1 − 2c 2 x)e − x − 6 x + 14 .
We use the initial conditions to find out the arbitrary constants c1 and c 2 .
We find c1 = 10 and c 2 = 6 .
Thus we get the following solutions which satisfy the given set of equations and the
initial conditions:
y = (10 + 6 x)e − x + 5 x − 9
z = (−14 − 12 x)e − x − 6 x + 14 .

Example #2

Integrate the system:

dx
= y + z ……………….(1)
dt
dy
= x + z ……………….(2)
dt
dz
= x + y ……………….(3)
dt
To find solutions:

Differentiating the first equation with respect to t , we find


d 2 x dy dz
= + = ( x + z) + ( x + y) = 2 x + y + z
dt 2 dt dt

Eliminating the variables y and z , we get


d 2 x dx
− − 2x = 0 .
dt 2 dt
So we get a 2nd order homogeneous equation, the general solution of which is
x = c1e −t + c 2 e 2t .
From the above we find
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 24

dx
= −c1e −t + 2c 2 e 2t
dt
dx
∴ y= − z = − c1e −t + 2c 2 e 2t − z
dt
Now we put the above relation into equation (3) and get

dz
= x+ y
dt
= (c1e −t + c 2 e 2t ) + (− c1e −t + 2c 2 e 2t ) − z
dz
∴ + z = 3c 2 e 2t
dt
The above is a first order differential equation of z . The solution is
z = c3 e − t + c 2 e 2t .
Therefore,
y = −c1e − t + 2c 2 e 2t − c3 e −t + c 2 e 2t
= − (c1 + c3 )e −t + c 2 e 2t .

Lecture-10

Physical Interpretation:

Let us consider the vibration in a Mechanical System.


Example: Oscillation of a spring

Let us consider the spring is loaded with a mass M .


• If k be the spring constant the a force − ky tends to return the load to equilibrium
position. [ Restoring Force]
• The motion of the load M is restricted by a force operating in a direction
dy
opposite to that of the motion. The force is proportional to velocity: − λ .
dt
[Resistance force or Damping force]
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 25

We can write the differential equation of the motion of the load on the spring. By
Newton’s 2nd law we have
d2y dy
M 2 = −ky − λ .
dt dt
Thus we have the following homogeneous 2nd order differential equation of the familiar
form:
y // + py / + qy = 0 ………………….(1)
λ k
Where p = , q= .
M M
If the spring-load system is further acted on by an external force f (t ) then the
corresponding differential equation can be written as
y // + py / + qy = f (t ) ………………..(2)

Equation (1) is called an equation of FREE OSCILLATIONS and equation (2) is called
an equation of FORCED OSCILLATIONS.

FREE OSCILLATIONS

y // + py / + qy = 0
Corresponding auxiliary equation is k 2 + pk + q = 0 .
Two roots are:
p p2
k1 = − + −q
2 4
p p2
k2 = − − −q
2 4

CASE-I
p2
> q (Case of over damping)
4
Then the roots k1 and k 2 are negative numbers.
The general solution: y = c1e k1t + c2e k 2 t ( k1 < 0 , k2 < 0 )
It follows that the displacement ( y ) dies down (approaches zero) as t → ∞ (long time).
This case corresponds to the fat that the forces of resistance are greater than that due to
rigidity. There is no oscillation.

CASE-II
p2
= q Then the roots are equal.
4
The general solution is
y = (c1 + c 2 t )e − p / 2.t .
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 26

Here the displacement ( y ) approaches zero as t → ∞ (long time limit) but


comparatively slower than that of case-II.

CASE-III
p = 0 (No resistance, No damping)
Equation (1) takes the form
y // + qy = 0 .
The general solution is: y = c1 cos ωt + c 2 sin ωt , where ω = q .
If we write c1 = A sin φ 0 and c 2 = A cos φ 0 , the solution becomes y = A sin(ωt + φ 0 ) . This
is a solution of Simple Harmonic motion.

CASE-IV (Damped Oscillations)


p2
p ≠ 0, <q
4
In this case the roots of the auxiliary equation are complex numbers:
k 1 = α + iβ , k 2 = α − iβ
p
Where α = − < 0, β = q − p 2 / 4 .
2
The general solution has the form:
y = e αt (c1 cos βt + c 2 sin βt )
Or y = Ae αt sin( β t + φ 0 ) .

The solution is oscillatory but damped. Oscillation is given by the sin-term. The
amplitude of oscillation falls off exponentially (finally goes down to zero) given by e αt -
term.

The envelope of the peaks falls off exponentially.


PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 27

Lecture-11

Method of Variation of Parameters:

[NOTE: This method is due to Lagrange which is particularly useful to solve 2nd order
nonhomogeneous equations with variable coefficients.]

Let us consider the general equation of the form:

y ′′ + p ( x) y ′ + q( x) y = f ( x) .

Assume the following form of the solution:


y = vy1 + v 2 y 2 , (1)
where y1 and y 2 are two independent solutions of the corresponding homogeneous
equations. The coefficients v1 and v 2 are two unknown functions. The function f ( x) is
considered to be continuous in some range.

Therefore, we can write

y1′′ + p ( x) y1′ + q ( x) y1 = 0 ………………….(2)


y 2′′ + p ( x) y 2′ + q ( x) y 2 = 0 ...……………..…(3)

Now from (1), we can have


y ′ = v1′ y1 + v1 y1′ + v ′2 y 2 + v 2 y 2′
= (v1 y1′ + v 2 y 2′ ) + (v1′ y 1 +v ′2 y 2 ) . (4)

To simplify the calculation of y ′′ , we choose v1 and v 2 so that


v1′ y1 + v 2′ y 2 = 0 . (5)
The final solution corresponding to the given equation will be subject to the condition we
choose.
The equation (4) now becomes
y ′ = v1 y1′ + v 2 y 2′ (6)

Now differentiating equation (5) once again with respect to x , we obtain

y ′′ = v1′ y1′ + v1 y1′′ + v ′2 y ′2 + v 2 y 2′′ . (7)

Substituting equations (1), (6) and (7) into the original equation, we obtain

v1′ y1′ + v1 y1′′ + v 2′ y ′2 + v 2 y 2′′ + p ( x)v1 y1′ + p ( x)v 2 y 2′ + q ( x)v1 y1 + q ( x)v 2 y 2 = f ( x)

⇒ v1 ( y1′′ + p ( x) y1′ + q ( x) y1 ) + v 2 ( y 2′′ + p ( x) y 2′ + q ( x) y 2 ) + v1′ y1′ + v 2′ y 2′ = f ( x) .


PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 28

The two expressions in parentheses in the last equation vanish as they are essentially the
solutions of the homogeneous equation.
Hence we now have
v1′ y1′ + v 2′ y ′2 = f ( x) . (8)

Solving equations (5) and (8) for v1′ and v 2′ , we obtain

0 y2
f ( x) y ′2 y 2 f ( x)
v1′ = =−
∆ ∆

and
y1 0
y1′ f ( x) y1 f ( x)
v 2′ = = ,
∆ ∆
where
y1 y2
∆= = ( y1 y ′2 − y1′ y 2 ) .
y1′ y 2′
The determinant ∆ is called the Wronskian W ( y1 , y 2 ) of y1 and y 2 ,
The quantities v1 and v 2 can be found out from the above by integration.
Therefore, we obtain the following solution:

f ( x) y 2 f ( x) y1
y = − y1 ∫ dx + y 2 ∫ dx .
W ( y1 , y 2 ) W ( y1 , y 2 )

The above is the general solution of the given equation. This method is useful when the
two independent solutions y1 and y 2 can not be obtained easily.

Example #1

To solve: y ′′ + y = sec x .
[Because of the trigonometric function on the right hand side it is difficult to find out the
particular integral by the methods described earlier. However, the present method will be
very useful as we see.]

From the homogeneous equation, we find two independent solutions to be


y1 = sin x and y 2 = cos x .
y1 y2 sin x cos x
∴ The Wronskian is W ( y1 , y 2 ) = ∆ = = = −1 .
y1′ y 2′ cos x − sin x
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 29

Therefore, the particular integral is


y p = sin x ∫ sec x. cos xdx − cos x ∫ sec x. sin xdx
sin x
= − sin x ∫ dx − cos x ∫ dx
cos x
= − x sin x + cos x log(cos x) .

The complete solution is thus


y = A sin x + B cos x − x sin x + cos x log(cos x).

Example #2

To solve: x 2 y ′′ − 2 xy ′ + 2 y = x ln x ; (x ≠ 0 )

Soln:
The standard form for the equation is
2 2 ln x
y ′′ − y′ + 2 y = ,
x x x
2
where p ( x) = −
x
2
q ( x) =
x2
ln x
f ( x) =
x
Let us take two independent solutions of the corresponding homogeneous equation by
investigation * . We have y1 = x and y 2 = x 2 .
Hence we have
y y2 x x2
W ( y1 , y 2 ) = ∆ = 1 = = x2 .
y1′ y 2′ 1 2x
Thus the general solution is
 ln x   ln x 
x2   x 
 x   x 
y = − x∫ dx + x ∫
2
dx
x2 x2
ln x ln x
= − x∫ dx + x 2 ∫ 2 dx
x x
1   ln x 1 
= − x  (ln x ) + c1  + x 2 −
2
− + c2 
2   x x 
1 
= − x  (ln x ) + ln x + 1 − c1 x + c 2 x 2 .
2

2 

*
Actually, the solutions can be found out by a standard method and the given equation is of the
type of Cauchy-Euler equation of order 2.
PBC Lecture Notes Series: Differential Equations / Dr. Abhijit Kar Gupta 30

Cauchy-Euler Equation:

If we have an equation of the following type

x 2 y ′′ + axy ′ + by = 0 ,
we search for the solutions of the algebraic form
y ( x) = x m .
In the above example, we have the homogeneous equation :
x 2 y ′′ − 2 xy ′ + 2 y = 0
To solve, we look for the solution of the form, y ( x) = x m . Thus we shall have y ′ = mx m −1
and y ′′ = m(m − 1) x m − 2 .
Hence the corresponding auxiliary equation becomes
m 2 − 3m + 2 = 0 .
The two roots are m1 = 1 and m2 = 2 . Therefore, we have two independent solutions
y1 = x and y 2 = x 2 .

-----------------------------