You are on page 1of 11

Solution of Linear Differential Equations

Tapas Kumar Bhattacharya


IIT Kharagpur
July 24, 2019

S
PA
TA

1
Tapas Kumar Bhattacharya Linear Differential Equations 2

Contents
1 Introduction 3

2 First order differential Equation 3

3 Second order differential equation 5


3.1 nth order differential equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 General comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 When forcing function is constant or sinusoidal 9

S
PA
TA
Tapas Kumar Bhattacharya Linear Differential Equations 3

1 Introduction
• Linear differential equations (LDE) describe the dynamics of many a physical system including
circuits.

• One is bound to handle LDE, if the system consists of Energy Storage Elements like mass,
spring in physical system or inductor and capacitor in a network.

• After writing the differential equation (using KVL, KCL in circuits, it is necessary to solve
them.

• Laplace transform method is widely used to get the solution of LDE.

• Here we shall try to get the solution of LDE by classical method.

• Solution of LDE by classical method gives better insight into the problem.

• Our goal in this note will be to obtain the solution of LDE classically and quickly.

2 First order differential Equation


Consider the following first order LDE
S
PA
dy
+ ay = x(t)
dt
TA

Multiply both sides with eat


dy
eat + aeat y = eat x(t)
dt
d(eat y)
or, = eat x(t)
Z dt Z
d(eat y) = A + eat x(t) dt where A = integration constant
Z
∴ y(t) = Ae + e
−at −at
eat x(t) dt = yn (t) + yf (t)

1. yn (t) is called natural response (also called complementary function) as it does not depend on
the forcing function x(t). This will exist if the there is initially stored energy in the system
and the value of A is determined from the initial condition.
Tapas Kumar Bhattacharya Linear Differential Equations 4

2. yf (t) is called the response due to forcing function (also known as particular integral) as it
depends on x(t).
R
We evaluate the integral eat x(t) dt to get yf (t)

eat eat
Z Z
at
e x(t) dt = x − ẋ dt ; Integrating by parts
a a
1 at 1 at eat
Z
= xe − 2 ẋe + ẍ 2 dt ; Once again Integrating by parts
a a a
1 1 1
∴ yf (t) = x − 2 ẋ + 3 ẍ + · · · ∞
a a a
Told in language we can say that response due to forcing function f (t) is nothing but linear
combination of the forcing function and its higher order derivatives up to infinite terms

yf (t) = ko x + k1 ẋ + k2 ẍ + · · · ∞
Hence total solution is y(t) = Ae−at + (kox + k1 ẋ + k2 ẍ + · · · ∞)

Exception to this rule


S
PA
That yf (t) = ko x + k1 ẋ + k2 ẍ + · · · ∞ is not true for x(t) = Ae−at where −a is the characteristic
root of the first order differential equation. Let us see, what will then be yf (t) ?
TA

dy
Given equation is: + ay = x(t) = Ae−at
dt
dy
eat
+ aeat x = A ;Multiply with the integrating factor
dt
d at
(e y) = A
dt
or, d(eat y) = A dt
Integrating, eat y = At+ B
or, y = (A t + B)e−at ;Total solution
∴ yn (t) = Be−at ;Natural response
and, yf (t) = A te−at ;Solution due to forcing function
∴ Total solution is : y(t) = Be−at + A te−at = (At + B)e−at
Tapas Kumar Bhattacharya Linear Differential Equations 5

3 Second order differential equation


Let us consider a second order linear differential equation with forcing function f (t).
d2 y dy
2
+ a + by = x(t) (1)
dt dt
Solution of eq n (1) is: y(t) = yn (t) + yf (t)
Where, yn (t) is the natural response with x(t) = 0 and yf (t) is the particular integral or solution
due to forcing function. Let operator D = dtd , hence the equation can be rewritten as

(D 2 + aD + b)y = x(t)
If roots are m1 , m2
The equation can be written as, (D − m1 )(D − m2 )y = x(t)
Let, (D − m2 )y = z(t)
∴ (D − m1 )z = x(t)

We shall first solve for z(t) from the last first order differential equation. After knowing z(t),
we shall solve for y(t) from (D − m2 )y = z(t), which is also a first order differential equation with
S
z(t) appearing as forcing function.
PA
Case1: m1 6= m2
In this case roots are not equal i.e., m1 6= m2 .
TA

(D − m1 )z = x(t)
∴ z(t) = Aem1 t + (ko x + k1 ẋ + k2 ẍ + · · · ∞)

Now the first equation becomes:


(D − m2 )y = z(t)
or, (D − m2 )y = Aem1 t + (ko x + k1 ẋ + k2 ẍ + · · · ∞)

The last equation is once again a first order differential equation and its forcing function is:
Aem1 t + (ko x + k1 ẋ + k2 ẍ + · · · ∞)
So the total solution will be:
y(t) = A1 em1 t + A2 em2 t + (Ko x + K1 ẋ + K2 ẍ + · · · ∞)
Tapas Kumar Bhattacharya Linear Differential Equations 6

Case2: m1 = m2 = m
Here the roots are equal i.e., m1 = m2 = m.

(D 2 + aD + b)y = x(t)
If roots are m1 = m2 = m
The equation can be written as, (D − m)(D − m)y = x(t)
Let, (D − m)y = z(t)
∴ (D − m)z = x(t)

We shall first solve for z(t) from the last first order differential equation. After knowing z(t), we
shall solve for y(t) from (D − m)y = z(t), which is also a first order differential equation.

(D − m)z = x(t)
∴ z(t) = Aemt + (ko x + k1 ẋ + k2 ẍ + · · · ∞)

Now the first equation becomes:


S
PA
(D − m)y = z(t)
or, (D − m)y = Aemt + (ko x + k1 ẋ + k2 ẍ + · · · ∞)
TA

The forcing function on RHS has a term Aemt . Therefore the total solution for y(t) is given by:

y(t) = (A1 + A2 t)emt + (Ko x + K1 ẋ + K2 ẍ + · · · ∞)

3.1 nth order differential equation


The above idea can easily be be extended to solve a general nth order differential equation given
below.
dn y dn−1 y dn−2y
+ a1 x + a2 + · · · + an = x(t)
dtn dtn−1 dtn−2
Tapas Kumar Bhattacharya Linear Differential Equations 7

In terms of operator D, the equation can be written as

D n + a1 D n−1 + a2 D n−2 + a3 D n−3 + · · · + an y = x(t)




or, (D − m1 )(D − m2 )(D − m3 )x · · · (D − mn )y = x(t)


∴ Roots of characteristic equation are : m1 , m2 , · · · mn

Case1: All roots are distinct


If all the roots are distinct i.e.,m1 6= m2 6= m3 6= · · · mn , The solution will be:

y(t) = A1 em1 t + A2 em2 t + A3 em3 t + · · · An emn t + (ko x + k1 ẋ + k2 ẍ + · · · ∞)

Case2: When there are repeated roots


Let us assume that first two roots are equal (m1 = m2 = m1 (say)) and next three roots are equal
(m3 = m4 = m5 = m3 (say)), then the solution will be:

x(t) = (A1 + B1 t)em1 t + (A3 + B3 t + C3 t2 )em3 t + A4 em4 t + · · · An emn t + (ko f + k1 ẋ + k2 ẍ + · · · ∞)

Case3: When roots are complex


S
PA
Complex roots will always appear as conjugate pair. If one root is c1 + jc2 = c ejθ , the other root
has to be c1 − jc2 = c e−jθ . Since these roots can be considered to be distinct, we can apply the
same rule established earlier for getting the solution.
TA

3.2 General comments


1. Linear differential equation with boundary condition will be given.

2. Write down the characteristic equation and solve for its roots.

3. Examine whether there are repeated roots or not.


4. Then write down the expression for natural response xn (t) which will be sum of several
exponential terms.

5. Solution yf (t), due to forcing function x(t) will be linear combinations of the x(t) and its
higher order derivatives.

6. Total solution for y(t) then will be sum of yn (t) and yf (t).
Tapas Kumar Bhattacharya Linear Differential Equations 8

7. Now constants appearing in yf (t) and xn (t) are to be determined.


8. yf (t) has to satisfy the differential equation alone, for all time. The like terms of LHS & RHS
can be equated to manufacture derived equations involving k’s.
9. Now only constants appearing in xn (t) are to be determined. These are determined from the
boundary conditions given. Use total solution when applying boundary conditions.

Example-1
Find out the solution of the following differential equation
dy
+ 3y = t Boundary condition : y(0) = 1
dt

Solution
Characteristic equation is m + 3 = 0; hence m = −3. Also x(t) = t. So the solution is:

Natural response is yn (t) = Ae−3t


Response due to forcing function is yf (t) = ko t + k1
S
Total solution is x(t) = Ae−3t + ko t + k1
PA
As we know yf (t) = ko t + k1 alone satisfies the equation.
d
TA

(ko t + k1 ) + 3(kot + k1 ) = t
dt
or, ko + 3ko t + 3k1
= t
or, ko + 3k1 + 3ko t
= t
Note that, this relation is to be true for all time t
hence, ko + 3k1= 0
and, 3ko= 1
1 1
∴ k0 = and k1 = −
3 9
1 1
Thus, y(t) = Ae−3t + t −
3 9
Now A is to be determined from the boundary condition y(0) = 1.
1 10
1=A− ∴ A=
9 9
Tapas Kumar Bhattacharya Linear Differential Equations 9

So the complete solution is:


10 −3t 1 1
y(t) = e + t−
9 3 9

4 When forcing function is constant or sinusoidal


In circuit analysis two kinds of excitations (forcing functions) are very common - D.C excitation
and sinusoidal excitation. Mathematically x(t) = constant or x(t) = Vm sin ωt. Is it possible to get
the solution due to forcing function yf (t) rather easily when the forcing functions are either D.C or
sinusoidally varying? Answer to this is yes.
A constant value or sinusoidally varying quantity can be expressed in terms of exponential
function. Let us consider a forcing function x(t) = Aest , where s may be real or complex. For
example if s = 0, f (t) = A = constant. Also a sine or cosine function can be expressed in terms of
exponential as follows:

ejωt − e−jωt
sin ωt =
2j
jωt
e + e−jωt
cos ωt =
S 2
PA
Thus we conclude that sinusoidal quantities can also be expressed as exponentials. Now consider
a second order differential equation try to solve for yf (t) when x(t) = Aest .
TA

d2 y dy
Given equation: 2
+ a + by = x(t)
dt dt
Forcing function:x(t) = Aest where s is a constant
d2 yf dyf
or, 2
+a + byf = Aest
dt dt

Since LHS must be equal to RHS for all t, nature of yf (t) must be of the following form

yf (t) = Y est where Y is a constant


Tapas Kumar Bhattacharya Linear Differential Equations 10

Putting this in the differential equation we get,


s2 Y est + asY est + bY est = Aest
Aest
∴ yf (t) = Y est =
(s2 + as + b)
Aest
yf (t) = Y est =
(s2 + as + b)
For the equation (D 2 + aD + b)y = Aest with forcing function of the form Aest , response yf (t) can
be written as:
Aest Aest


yf (t) = =
(D 2 + aD + b) D=s (s2 + as + b)
Let us apply this rules to solve the following examples.

Example-2
Solve the following differential equation
dy
+ 2y = 10 ; Boundary condition y(0) = 0
dt
Let us first solve for yf (t).
S
PA
The given equation is: (D + 2)yf (t) = 10 ; Note x(t) = 10 = 10e0t constant

10
∴ yf (t) = =5
TA

(D + 2) D=0
Since characteristic root m = −2
∴ yn (t) = Ae−2t
Total solution is: y(t) = yf (t) + yn (t)
or, y(t) = 5 + Ae−2t
Boundary condition: y(0) = 0 gives A = −5
∴ Total solution is: y(t) = 5 − 5e−2t

Example-3
Solve the following differential equation
dy
+ 2y = 10 cos 2t ; Boundary condition y(0) = 0
dt
Tapas Kumar Bhattacharya Linear Differential Equations 11

Let us first solve for yf (t).

The given equation is: (D + 2)yf (t) = 10 cos 2t


(ej2t + e−j2t )
Now, 10 cos 2t = 10 = 5ej2t + 5e−j2t
2
(D + 2)yf (t) = 5ej2t + 5e−j2t
5ej2t

5e−j2t
or, yf (t) = +
(D + 2) D=j2(D + 2) D=−j2
j2t
5e 5e
−j2t
or, yf (t) = +
(j2 + 2) (−j2 + 2)
5(2 + j2)ej2t 5(2 − j2)e−j2t
or, yf (t) = +
8 8
10 
(1 + j1)ej2t + (1 − j1)e−j2t

=
8
5  j2t
(e + e−j2t ) + j(ej2t − 1e−j2t )

=
4
5
= [2 cos 2t − 2 sin 2t]
S 4
5
∴ yf (t) = [cos 2t − sin 2t]
PA
2
Since characteristic root m = −2
∴ xn (t) = Ae−2t
TA

Total solution is: y(t) = yf (t) + yn (t)


5
or, y(t) = [cos 2t − sin 2t] + Ae−2t
2
5
Boundary condition: y(0) = 0 gives A = −
2
5 5
∴ Total solution is: y(t) = [cos 2t − sin 2t] − e−2t
2 2

You might also like