Solving Differential Equations Amir Asif Department of Computer Science and Engineering York University, Toronto, ON M3J1P3
Solving Differential Equations Amir Asif Department of Computer Science and Engineering York University, Toronto, ON M3J1P3
Amir Asif
ABSTRACT
This article reviews a direct method for solving linear, constant-coefficient differential equations without using
transforms. The method that we use, offers a general characterization of solutions that provide insight into the
behaviour of the modeled system.
1. INTRODUCTION
It is convenient to express the output y(t) of the continuous-time (CT) system described by a differential equation
as the sum of two components:
Homogeneous component yh (t) associated with the initial conditions.
Particular component yp (t) associated with the input applied to the system.
The homogeneous component is the output of the system when the input is set to zero. The homogeneous compo-
nent, therefore, describes the manner in which the system dissipates any energy or memory of the past. The past
information is specified as initial conditions to the differential equation.
The particular component is the output of the system with the initial conditions set to zero. It describes the
system behaviour that is forced by the input.
2. HOMOGENEOUS COMPONENT
d2 y(t) dy
2
+ 3 + 2y(t) = 2x(t).
dt dt
Substituting yh (t) = Aest into the homogeneous equation,
d2 y(t) dy
+3 + 2y(t) = 0
dt2 dt
gives
Aest (s2 + 3s + 2) = 0.
Ignoring the trivial solution, i.e., assuming Aest 6= 0, the above equality condition gives the following quadratic
equation, called the characteristic equation, in s,
s2 + 3s + 2 = 0
yh (t) = A1 et + A2 e2t
where A1 and A2 are constants determined from the initial conditions, as will be explained later.
Repeated roots: The form of the homogeneous solution changes slightly when the characteristic equation has
repeated roots. If a root s = a is repeated J times, then we include J distinct terms in the homogeneous solution
associated with a, i.e., the homogeneous solution involves the following J functions
and is given by
The procedure for calculating the homogeneous solution for differential equations with repeated roots is illustrated
in example 2.
Example 2: Characteristic equation with repeated roots. Consider the differential equation
d3 y(t) d2 y(t) dy
3
+4 2
+5 + 2y(t) = x(t).
dt dt dt
Its characteristic equation is given by
s3 + 4s2 + 5s + 2 = 0
which has two repeated roots at s = 1 and one root at s = 2. The homogeneous solution is given by
s =a+b
b. (8)
Input Particular Solution
Constant A C
Exponential Aebt Cebt
Sinusoidal A cos(o t + ) C1 cos(o t) + C2 sin(o t)
For differential equations with real coefficients, it can be proven that the roots occurs in conjugate pairs, i.e., if
s = a+b b is a root then s = a b
b is also a root to the same characteristic equation. For such complex roots, the
homogeneous solution can be modified to the following form
Example 3: Characteristic equation with complex roots. Assume a fourth order differential equation of
the form
d4 (t) d2 (t)
4
2 2 +1 = 0 (10)
dt dt
which is represented by the following characteristic equation
s4 2s2 + 1 = 0. (11)
3. PARTICULAR COMPONENT
The particular component is denoted by yp (t) and represents the solution to the differential equation for a given
input. It is usually obtained by assuming the system output has the same general form as the input. For example,
if the input is x(t) = ebt , then we assume the output is of the form yp (t) = Cebt and find the constant C so
that yp (t) is a solution to the systems differential equation. Assuming an output of the same form as the input is
consistent with our intuition that the output of the system be directly related to the input.
The forms of the particular solutions associated with a few common input signals is given in table 1. The procedure
for identifying a particular solution is illustrated in example 3.
Example 4: Solving for the Particular solution. Consider the system of example 1
d2 y(t) dy
+ 3 + 2y(t) = 2x(t).
dt2 dt
except now we are interested in calculating the particular solution of the differential equation. Assume that the
input x(t) is given by
(C1 cos t C2 sin t) + 3(C1 sin t + C2 cos t) + 2(C1 cos t + C2 sin t) = 2 cos t
or (C1 + 3C2 ) cos t + (3C1 + C2 ) sin t = 2 cos t.
Equating the cosine and the sine terms on the left and right hand sides of the equation, we get a set of simultaneous
equations given by
C1 + 3C2 = 2
3C1 + C2 = 0
1 3
yp (t) = cos t + sin t.
5 5
This approach for finding the particular solution is modified when the input is of the same form as one of the
components of the natural response. We illustrate by an example where we also outline the modified procedure for
calculating the particular solution.
Example 5: Particular solution with input of the same form as the natural response. In example 2,
assume the applied input is given by
x(t) = 2et
and we are interested in finding the particular solution. Recall that the homogeneous solution for the differential
equation is given by
The input x(t) = 2et is of the same form as the first two terms in the homogeneous solution. In this case, we must
assume a particular solution that is independent of all terms in the natural response in order to obtain the forced
response of the system. To achieve this, we multiply the form of the particular solution by the lowest power of t
that will give a response component not included in the natural response. In this example, the particular solution
is
In order to evaluate the constant C, we substitute the value of yp (t) and x(t) in the systems differential equation
repeated below for convenience
d3 y(t) d2 y(t) dy
3
+ 4 2
+5 + 2y(t) = x(t).
dt dt dt
Substituting the value of the first, second and third derivatives of the output y(t) and the input x(t), we get
6Cet + 6Ctet Ct2 et + 4 2Cet 4Ctet + Ct2 et + 5 2Ctet Ct2 et + 2Ct2 et = 2et
which simplifies to
From the above expression, it is straightforward to verify that C = 1. The particular component is, therefore,
given by
yp (t) = t2 et . (16)
4. COMPLETE RESPONSE
The complete response of the system is the sum of the homogeneous component and the particular component
using the specified initial conditions. Assuming the input is applied at t = 0, the procedure for evaluating the
complete response is enlisted below:
1. Find the form of the homogeneous component yh (t) from the roots of the characteristic equation.
2. Find the particular solution yp (t) by assuming it of the same form as the input yet independent of all terms
in the homogeneous component.
3. Determine the coefficients in the homogeneous component so that the overall response
y(t) = yh (t) + yp (t) (17)
satisfies the actual initial condition specified with the differential equation.
A direct method for solving linear, constant coefficient differential equations was presented.