You are on page 1of 37

SOLUTION TO

LINEAR DIFFERENTIAL
EQUATIONS WITH
CONSTANT-COEFFICIENTS
(LCCDE)
BY DIRECT METHOD

jmmartinezjr
07092003
1
jmmartinezjr 07092003

TOPIC OBJECTIVES
To be able to:

• Take the Homogeneous Solution of Linear


Constant-Coefficient Differential Equations by
taking the roots of auxiliary equations derived
from differential equation, analytically or using
Matlab roots command
• Take the Particular Solution of Linear
Constant-Coefficient Differential Equations from
the form of f(t).
• Take the Total Solution by evaluating at given
initial conditions.
2
LINEAR CONSTANT-
jmmartinezjr 07092003

COEFFICIENT DIFFERENTIAL
EQUATION
n i
d y

i =0
ai i = f (t )
dt
where:
ai = constants

LCCDE is also called Linear Time-Invariant (LTI)


Differential Equation 3
jmmartinezjr 07092003

SOLUTIONS TO LCCDE

• Classical Solution/Direct Method


• Laplace Transform

4
jmmartinezjr 07092003

CLASSICAL SOLUTION
Solution to
n i
d y

i =0
ai i = f (t )
dt
is of the form

y (t ) = yc (t ) + y p (t )
where:
yc (t ) = Characteristic solution (Homogeneous)
y p (t ) = Particular solution 5
jmmartinezjr 07092003

HOMOGENEOUS SOLUTION
Steps in obtaining the
Homogeneous Solution
1. Equate f(t) to zero.
2. Create an auxiliary (characteristic) equation from
the differential equation.
3. Solve for the roots of the auxiliary equation.
4. Write the homogeneous solution from the
corresponding roots. 6
jmmartinezjr 07092003

Example:
CASE I: Real & Distinct Roots
Determine the Homogeneous Solution of
the Differential Equation
3 2
d y d y dy
3
− 4 2
+ + 6 y = 3e 4t

dt dt dt
Solution: Equating the right side to zero
and writing the auxiliary equation

m − 4m + m + 6 = 0
3 2

7
jmmartinezjr 07092003

Example:
CASE I: Real & Distinct Roots
By using Synthetic Division or other root-
finding method

m = − 1, 2 ,3
The Homogeneous Solution is of the form

−t
yc (t ) = c1e + c2 e + c3e
2t 3t

8
jmmartinezjr 07092003

Example:
CASE II: Real & Repeated Roots
Determine the Homogeneous Solution of
the Differential Equation
4 3 2
d y d y d y
4
+ 2 3 + 2 = 4t
dt dt dt
Solution: Equating the right side to zero
and writing the auxiliary equation

m + 2m + m = 0
4 3 2

9
jmmartinezjr 07092003

Example:
CASE II: Real & Repeated Roots
By using Synthetic Division or other root-
finding method
m = 0,0,−1,−1
The Homogeneous Solution is of the form
−t −t
yc (t ) = c1e (0)t
+ c2te (0)t
+ c3e + c4te
or
−t −t
yc (t ) = c1 + c2t + c3e + c4te 10
jmmartinezjr 07092003

CASE III: Complex Conjugate


Roots
For complex-conjugate roots m = a ± jb, the
Homogeneous Solution may be written as
in Case I
( a + jb ) t ( a − jb ) t
yc (t ) = c1e + c2 e
or
yc (t ) = e (c3 cos bt + c4 sin bt )
at

where: c3 = c1 + c 2
c4 = j (c1 − c2 ) 11
jmmartinezjr
Example: 07092003

CASE III: Complex Conjugate


Roots
Determine the Homogeneous Solution of the
Differential Equation
2
d y dy −t
2
− 4 + 13 y = e
dt dt
Solution: Equating the right side to zero
and writing the auxiliary equation

m − 4m + 13 = 0
2
12
Example:
jmmartinezjr 07092003

CASE III: Complex Conjugate


Roots
By using Quadratic Formula
m = 2 ± j3
The Homogeneous Solution is of the form
( 2 + j 3) t ( 2 − j 3) t
yc (t ) = c1e + c2 e
or
yc (t ) = e (c3 cos 3t + c4 sin 3t )
2t
13
jmmartinezjr 07092003

MATLAB IMPLEMENTATION
Using MatLab we can find the roots of a
polynomial given its coefficients using
roots(C)

where: C = coefficient vector

Example: Find the roots of m − 4m + m + 6 = 0


3 2

Solution: >>roots([1 -4 1 6])


ans =
3.0000
2.0000
14
-1.0000
jmmartinezjr 07092003

PARTICULAR SOLUTION
Steps in obtaining the
Particular Solution
1. Determine the form of f(t).
2. Write the particular solution
corresponding to the given f(t).
3. Using Method of Undetermined
Coefficients, solve for the constants by
evaluating the left side of the differential
equation.
15
jmmartinezjr 07092003

PARTICULAR SOLUTIONS OF
SOME FUNCTIONS

f (t ) y p (t )
A K
At K1t + K 2
At 2
K1t + K 2t + K 3
2

A cos ωt K1 cos ωt + K 2 sin ωt


A sin ωt K1 cos ωt + K 2 sin ωt
bt bt
Ae Ke
16
jmmartinezjr 07092003

Example:
Find the Particular Solution of the Differential
Equation
2
d y dy
2
+ − 2 y = 2t − 40 cos 2t
dt dt
Solution: From the Table, the Particular
solution corresponding to f (t ) = 2t − 40 cos 2t

y p (t ) = K1t + K 2 + K 3 cos 2t + K 4 sin 2t


17
jmmartinezjr 07092003

Example:
In order to evaluate the left-side of the D.E., we
will need the first and second derivatives of yp

y p (t ) = K1t + K 2 + K 3 cos 2t + K 4 sin 2t


dy p (t )
= K1 − 2 K 3 sin 2t + 2 K 4 cos 2t
dt
2
d y p (t )
2
= −4 K 3 cos 2t − 4 K 4 sin 2t
dt 18
jmmartinezjr 07092003

Example:
The given D.E. can be written as
(−2K1)t + (K1 − 2K2 ) + (−6K3 + 2K4 ) cos2t
+ (−2K3 − 6K4 ) sin2t = 2t − 40cos2t
Equating coefficients we can have the
following relationships to solve for K1,K2,K3
and K4
− 2K1 = 2 (eq.1) − 6 K 3 + 2 K 4 = −40 (eq.3)

K1 − 2K2 = 0 (eq.2) − 2K3 − 6K 4 = 0 (eq.194)


jmmartinezjr 07092003

Example:
We can find K1 and K2 from eq.1 and eq.2
2 K1 −1
K1 = = −1 K2 = =
−2 2 2
We can find K3 and K4 from eq.3 and eq.4.
using Cramer’s Rule
 − 6 2   K 3   − 40 
− 2 − 6  K  =  0 
  4   
K3 = 6 K 4 = −2
20
jmmartinezjr 07092003

Example:

By substituting the constants, the particular


solution will be

1
y p (t ) = −t − + 6 cos 2t − 2 sin 2t
2

21
jmmartinezjr 07092003

MATLAB IMPLEMENTATION
Using MatLab we can find the Solutions to a
System of Linear Equations Ax=C given the
Coefficients and Constants

x=C/A’
where
C=constant vector (row vector)
A=coefficient matrix
/=matrix division (product of the inverse)
’ =transposition operator 22
jmmartinezjr 07092003

MATLAB IMPLEMENTATION
Example: Find the values of x1 , x2 , x3

 4 − 2 1   x1  15
 − 3 − 1 4  x  =  8 
  2   
 1 − 1 3  x3  13

23
jmmartinezjr 07092003

MATLAB IMPLEMENTATION
Solution:

>>A=[4 -2 1;-3 -1 4; 1 -1 3];


>>C=[15 8 13];
>>x=C/A’
x =
2.0000 -2.0000 3.0000

24
jmmartinezjr 07092003

EXCEL IMPLEMENTATION
Create an array containing the Coefficients
and Constants

Coefficient Matrix Constants

Variables 25
jmmartinezjr 07092003

EXCEL IMPLEMENTATION
Take the inverse of the coefficient matrix

Inverse of Coefficient Matrix


26
jmmartinezjr 07092003

EXCEL IMPLEMENTATION
How to take the inverse of a matrix?
1. Put the cursor where the first row, first column element
should be placed. For example C7.
2. Select MINVERSE from the Insert Function menu.
3. Select the coefficient matrix or type the upper-leftmost:
lower right-most elements of the coefficient matrix. For
example B2:D4.
4. The inverse of a 3x3 matrix is a 3x3 matrix but after
executing Procedure (3) only C7 is filled up. To show
all the elements of the inverse, select a 3x3 range
starting from C7. For example C7:E9. Press F2 then
press CTRL+SHIFT+ENTER . 27
jmmartinezjr 07092003

EXCEL IMPLEMENTATION
Take the Product of the Inverse of
Coefficient Matrix and the Constants

Product of the Inverse


and Constants
(Values of X1,X2,X3)

28
jmmartinezjr 07092003

EXCEL IMPLEMENTATION
How to take the product of 2 matrices?
1. Put the cursor where the first row, first column element
should be placed. For example C11.
2. Select MMULT from the Insert Function menu.
3. Select the inverse of the coefficient matrix or type the
upper-leftmost: lower right-most elements of the inverse
of the coefficient matrix for Array 1. For example C7:E9.
For Array 2 select the constants. For example F2:F4.
4. The product of a 3x3 matrix and a 3x1 matrix is a 3x1
matrix but after executing Procedure (3) only C11 is filled
up. To show all the elements of the product, select a 3x1
range starting from C11. For example C11:C13. Press
F2 then press CTRL+SHIFT+ENTER. 29
jmmartinezjr 07092003

TOTAL SOLUTION
After solving for the
Homogeneous and Particular Solutions

y (t ) = yc (t ) + y p (t )
The final task will be to determine the
constants from the Homogeneous Solution
by evaluating the Total Solution at given
Initial Conditions
30
jmmartinezjr 07092003

INITIAL CONDITIONS
dy (t ) d 2 y (t ) d m y (t )
• Values of y (t ), , 2
... at t=0.
dt dt dt m

We will assume that all initial conditions are


zero.

dy (t ) d 2 y (t ) d m y (t )
y (t ) = = 2
... m
=0
dt dt dt
31
jmmartinezjr 07092003

Example:
Find the Total Solution of the Differential
Equation (Assume all initial conditions=0)
2
d y dy
2
+ − 2 y = 2t − 40 cos 2t
dt dt
Solution: First, we will solve for the
Homogeneous Solution by getting the roots
of the auxiliary polynomial

m +m−2=0
2

32
jmmartinezjr 07092003

Example:
By using Synthetic Division or other root-
finding method
m = 1,−2
∴Case I: Real and Repeated Roots.
The Homogeneous Solution is of the form

−2 t
yc (t ) = c1e + c2 e
t

33
jmmartinezjr 07092003

Example:
After determining the Homogeneous Solution,
we will find the Particular Solution, which is
1
y p (t ) = −t − + 6 cos 2t − 2 sin 2t
2
(from previous example)

The Total Solution will be

− 2t 1
y (t ) = c1e + c2 e
t
− t − + 6 cos 2t − 2 sin 2t
2
34
jmmartinezjr 07092003

Example:
To determine c1 and c2, we will evaluate y(t)
at t=0
1
y (0) = c1e + c2 e − 0 − + 6 cos(0) + sin(0) = 0
0 0

2
11
c1 + c2 = − (eq.1)
2
dy (t )
and at t=0
dy (t ) dt−2t
= c1e − 2c2 e
t
− 1 − 2 sin 2t + 2 cos 2t
dt
dy (0)
= c1e 0 − 2c2 e 0 − 1 − 2 sin(0) + 2 cos(0) = 0
dt

c1 − 2c2 = 5 (eq.2) 35
jmmartinezjr 07092003

Example:
Using eq.1 and eq.2 we can solve for c1 and c2
1 1   c1  − 11
1 − 2 c  =  2 
   2   5 

7
c1 = −2 c2 = −
2
The Total Solution will be
7 − 2t 1
y (t ) = −2e − e − t − + 6 cos 2t − 2 sin 2t
t

2 2
36
jmmartinezjr 07092003

REFERENCES:
• Elementary Differential Equations,
7thedition,by Rainville E.D.,and Bedient P.E.
• Schaum’s Outline Series “Feedback
and Control Systems”, 2nd edition, by
DiStefano III, J.J., Stubberud A.R., and
Williams I.J.
• Control Systems Engineering, 3rd
edition, by Nise N.S.
37

You might also like