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

7 Second-order linear ODEs BDP, Chap 3

7.1 General theory

• Recall from §5: A linear 2nd-order ODE has the form

d2 y dy
P (t) 2
+ Q(t) + R(t)y = G(t);
dt dt
provided that P (t) 6= 0 it may be expressed as

d2 y dy
2
+ p(t) + q(t)y = g(t).
dt dt

• Existence and Uniqueness Theorem: Consider the IVP

y ′′ + p(t)y ′ + q(t)y = g(t), y(t0 ) = α, y ′ (t0 ) = β

where p, q, g are continuous on an open interval I containing the point t0 . There is a


unique soln y = φ(t) of this IVP and the soln exists throughout I.
Proof: see advanced calculus books

• Example 83 Solve the IVP

y ′′ + p(t)y ′ + q(t)y = 0, y(t0 ) = 0, y ′ (t0 ) = 0

where p, q are continuous on an open interval I containing the point t0 .


Soln: The function y = 0 for all t ∈ I clearly satisfies both the ODE and initial conditions.
By the uniqueness of solns, it is the only possible soln.

• Two functions y1 and y2 are linearly dependent on an interval I if there exists two con-
stants C1 and C2 , not both zero, such that

C1 y1 (t) + C2 y2 (t) = 0

for all t ∈ I.
The functions are linearly independent on I if they are not linearly dependent.

• The Wronskian of 2 functions y1 and y2 is defined as the determinant



y1 y2
W (y1 , y2 ) = ′ = y1 y2′ − y1′ y2 .


y1 y2

• Let y1 (t) and y2 (t) be differentiable functions on an open interval I:

(i) If W (y1 , y2 )(t0 ) 6= 0 at some point t0 ∈ I then y1 , y2 are linearly independent on I.


(ii) If y1 , y2 are linearly dependent on I then W (y1 , y2 )(t) = 0 for all t ∈ I.

Proof:

91
(i) Suppose W (y1 , y2 )(t0 ) 6= 0 at some point t0 ∈ I. Also suppose there exist constants
C1 , C2 such that C1 y1 (t) + C2 y2 (t) = 0 for all t ∈ I. Then we also have C1 y1′ (t) +
C2 y2′ (t) = 0 for all t ∈ I. In other words
    
y1 (t0 ) y2 (t0 ) C1 0
= .
y1′ (t0 ) y2′ (t0 ) C2 0
   −1  
C1 y1 (t0 ) y2 (t0 ) 0
Thus =
C2 y1′ (t0 ) y2′ (t0 ) 0
 ′  
1 y2 (t0 ) −y2 (t0 ) 0
= ′ (t )
W (y1 , y2 )(t0 ) −y 1 0 y (t
1 0 ) 0
 
0
= .
0
As both C1 , C2 are zero, y1 , y2 are linearly independent on I.
(ii) Contrapositive of (i).
• Abel’s Theorem: Suppose that y1 , y2 are two solns to the homogeneous ODE
y ′′ + p(t)y ′ + q(t)y = 0
where p, q are continuous on an open interval I. Then the Wronskian
 Z 
W (y1 , y2 ) = C exp − p(t) dt

where the constant C depends on y1 , y2 but not t. Furthermore, there are only two
possibilities: )
W (y1 , y2 ) = 0 ∀t ∈ I
.
W (y1 , y2 ) 6= 0 ∀t ∈ I

Proof: Since y1 , y2 are both solns of the ODE:


y1′′ + p(t)y1′ + q(t)y1 = 0, y2′′ + p(t)y2′ + q(t)y2 = 0.
Multiplying the first eqn by −y2 and the second by y1 and then adding gives
 
y1 y2′′ − y1′′ y2 + p(t) y1 y2′ − y1′ y2 = 0.
Now we express this result in terms of W (t) = W (y1 , y2 )(t), noting that
dW
= y1 y2′′ − y1′′ y2 ;
dt
thus we find the linear (& separable) ODE
dW
+ p(t)W = 0
dt
hR i
t
which may be solved using the integrating factor exp t0 p(s) ds per
Rt
p(s) ds 
e t0 W ′ + pW = 0
d  Rtt p(s) ds 
i.e., e 0 W =0
dt
R t
p(s) ds
i.e., e t0 W =C
 Z t 
i.e., W (t) = C exp − p(s) ds with C = W (t0 ).
t0

Since the exponential function is never zero, we have that W (t) 6= 0 unless W (t0 ) = 0 in
which case W (t) = 0 for all t.

92
• Suppose that y1 , y2 are two solns to the homogeneous ODE
y ′′ + p(t)y ′ + q(t)y = 0
where p, q are continuous on an open interval I. Then:
(i) y1 , y2 are linearly dependent on I iff W (y1 , y2 )(t) = 0 for all t ∈ I
(ii) y1 , y2 are linearly independent on I iff W (y1 , y2 )(t) 6= 0 for all t ∈ I.
Proof: As (i) and (ii) are equivalent we need only prove (i). Furthermore we proved earlier
that:
linear dependence of y1 , y2 =⇒ W (y1 , y2 )(t) = 0 for all t ∈ I.
So all that remains to be proved is that:
W (y1 , y2 )(t) = 0 for all t ∈ I =⇒ linear dependence of y1 , y2 .

Suppose W (y1 , y2 )(t) = 0 for all t ∈ I. Then, there exist constants C1 , C2 , not both zero,
such that
    
y1 (t0 ) y2 (t0 ) C1 0
=
y1′ (t0 ) y2′ (t0 ) C2 0
for any point t0 ∈ I (see Introduction to Linear Algebra course).3 Let φ(t) = C1 y1 (t) +
C2 y2 (t). Clearly φ(t) is a soln to the homogeneous ODE y ′′ + p(t)y ′ + q(t)y = 0 and it also
satisfies the initial conditions
φ(t0 ) = 0, φ′ (t0 ) = 0.
Therefore, by Ex. 83, we have φ(t) = 0 for all t ∈ I. That is, C1 y1 (t) + C2 y2 (t) = 0 for all
t ∈ I with C1 , C2 not both zero. Hence y1 , y2 are linearly dependent on I.
• Suppose that y1 , y2 are 2 linearly independent solns to the homogeneous ODE
y ′′ + p(t)y ′ + q(t)y = 0
where p, q are continuous. Then every soln to the ODE has the form
y = C1 y1 (t) + C2 y2 (t)
where C1 , C2 are constants.
Proof: Let φ(t) be an arbitrary soln to the homogeneous ODE. Consider φ evaluated at
an arbitrary point t0 : let φ(t0 ) = a and φ′ (t0 ) = b. That is, φ(t) satisfies the IVP
y ′′ + p(t)y ′ + q(t)y = 0, y(t0 ) = a, y ′ (t0 ) = b.
Now suppose y1 , y2 are 2 linearly independent solns to the homogeneous ODE. Since
they are linearly independent, we know that W (y1 , y2 )(t0 ) 6= 0. Thus we may introduce
introduce constants C1 , C2 such that
    
y1 (t0 ) y2 (t0 ) C1 a
′ ′ =
y1 (t0 ) y2 (t0 ) C2 b
   −1  
C1 y1 (t0 ) y2 (t0 ) a
i.e., = ′ ′
C2 y1 (t0 ) y2 (t0 ) b
 ′  
1 y2 (t0 ) −y2 (t0 ) a
= .
W (y1 , y2 )(t0 ) −y1′ (t0 ) y1 (t0 ) b
3
Let M be a 2×2 matrix. Then:
       
x 0 x 0
det M = 0 ⇐⇒ ∃ 6= such that M = .
y 0 y 0

93
Since the constants C1 , C2 are such that

C1 y1 (t0 ) + C2 y2 (t0 ) = a, C1 y1′ (t0 ) + C2 y2′ (t0 ) = b,

the function C1 y1 (t) + C2 y2 (t) satisfies the initial conditions C1 y1 (t0 ) + C2 y2 (t0 ) = a and
C1 y1′ (t0 ) + C2 y2′ (t0 ) = b. But, by Existence and Uniqueness Thm, φ(t) is the only soln that
satisfies these initial conditions; hence

φ(t) = C1 y1 (t) + C2 y2 (t).

Note: The soln


y = C1 y1 (t) + C2 y2 (t)
is called the general solution; every particular solution to the homogeneous ODE can be
found by assigning values to the constants C1 and C2 .

• The functions y1 and y2 in the general soln y = C1 y1 +C2 y2 are said to form a fundamental
set of solutions.

• If we know one soln, say y1 (t), to a linear homogeneous ODE, another linearly inde-
pendent soln may be found by substituting y = v(t)y1 (t) into the ODE. This leads to a
1st-order separable ODE for v ′ (t) from which v(t) may be found.
This is called the Method of Reduction of Order.

• Example 84 Show that y1 = e−2t is a soln to the homogeneous ODE

y ′′ + 4y ′ + 4y = 0

and hence find the general soln.


Soln: Substituting y1 into the lhs of the ODE gives

y1′′ + 4y1′ + 4y1 = e−2t (4 − 8 + 4) = 0,

so y1 (t) is clearly a soln. To find a second linearly independent soln we try y2 = v(t)e−2t .
Then

y2′ = −2e−2t v + e−2t v ′ ,


y2′′ = 4e−2t v − 4e−2t v ′ + e−2t v ′′

which when substituted into the ODE yields



0 = y2′′ + 4y2′ + 4y2 = e−2t 4v − 4v ′ + v ′′ − 8v + 4v ′ + 4v = e−2t v ′′ ;

i.e., y2 = y1 v is a soln provided that v ′′ = 0. This ODE for v has the general soln
v = C1 + C2 t. Thus, the general soln to the ODE in the question is

y = (C1 + C2 t) e−2t + C3 e−2t = C4 e−2t + C2 te−2t .

[Check: the Wronskian



−2t −2t
e−2t te−2t
W (e , te ) = = e−4t (1 − 2t) + 2te−4t = e−4t
−2e−2t −2te−2t + e−2t

which is never zero. Hence, e−2t and te−2t are indeed linearly independent.]

94
7.2 Linear homogeneous ODEs with constant coefficients

• Consider the linear homogeneous ODE with constant coefficients

ay ′′ + by ′ + cy = 0 (22)

where a, b, c are real-valued constants and a 6= 0.

• Let us seek solns of the form y(t) = ert . Substituting this trial soln into (22) we get

ar2 + br + c ert = 0.


Thus, since y = ert is never zero, y(t) = ert is a soln to (22), provided that r is a root of
the auxiliary equation
ar2 + br + c = 0.

• The auxiliary eqn has 2 roots, namely r = r1 , r2 , where


√ √
−b + b2 − 4ac −b − b2 − 4ac
r1 = , r2 = .
2a 2a

• Case I: If the auxiliary eqn has real-valued and distinct roots, i.e., b2 − 4ac > 0, then the
general soln to the ODE (22) is

y(t) = C1 er1 t + C2 er2 t .

[Check: the Wronskian


rt
e r2 t

e1
r1 t r2 t = e(r1 +r2 )t (r2 − r1 )

W (e ,e ) = r t
r1 e 1 r2 e r 2 t

which is never zero provided that r1 6= r2 . Hence, er1 t and er2 t are indeed linearly inde-
pendent.]

• Example 85 Solve the ODE


d2 y dy
3 + − y = 0.
dt2 dt

−1 ± 13
Soln: The auxiliary eqn 3r2
+ r − 1 = 0 has roots r = which are real-valued
6
and distinct. Hence the general soln to the ODE is
! √ " ! √ "
−1 + 13 −1 − 13
y(t) = C1 exp t + C2 exp t .
6 6

b
• Case II: If the auxiliary eqn has equal roots, i.e., b2 − 4ac = 0, then r = − and one soln
2a
to the ODE (22) is 
b
y1 (t) = exp − t .
2a

To find another linearly independent soln consider the trial soln y2 (t) = v(t)y1 (t). Then
b −bt b
y2′ = − e 2a v + e− 2a t v ′ ,
2a
b2 − b t b b b
y2′′ = 2
e 2a v − e− 2a t v ′ + e− 2a t v ′′
4a a

95
which when substituted into the ODE (22) yields
 2
b2

′′ ′ b
− 2a t b ′ ′′ ′
0 = ay2 + by2 + cy2 = e v − bv + av − v + bv + cv
4a 2a
b
= e− 2a t av ′′ since b2 − 4ac = 0
i.e., y2 = y1 v is a soln provided that v ′′ = 0. This ODE for v has the general soln
v = Cα + Cβ t. Thus, the general soln to the ODE (22) is
y = C1 ert + C2 tert .

[Check: the Wronskian


rt
tert

e
rt rt = e2rt (1 + rt − rt) = e2rt

W (e , te ) = rt
re (1 + rt) ert

which is never zero. Hence, ert and tert are indeed linearly independent.]
• Example 86 Solve the ODE
d2 y dy
4 2
+ 12 + 9y = 0.
dt dt
Soln: The auxiliary eqn 4r2 + 12r + 9 = (2r + 3)2 = 0 has the sole root r = −3/2. Hence
the general soln to the ODE is
   
3 3
y(t) = C1 exp − t + C2 t exp − t .
2 2

• Case III If the auxiliary eqn has complex-valued roots, i.e., b2 − 4ac < 0, then the roots
must be the complex-conjugate pair
r1 = α + iβ, r2 = α − iβ

where α, β ∈ R and i = −1; the general soln to the ODE (22) is
r1 t r2 t
y(t) = C1 e + C2 e
(α+iβ)t
= C1 e + C2 e(α−iβ)t
 
= eαt C1 eiβt + C2 e−iβt
= eαt [C1 (cos βt + i sin βt) + C2 (cos βt − i sin βt)] (using Euler’s formula)
αt
= e [(C1 + C2 ) cos βt + i (C1 − C2 ) sin βt]
or by relabelling the constants
y(t) = eαt (Cm cos βt + Cn sin βt) .

[Check: the Wronskian


eαt cos βt eαt sin βt

αt αt

W (e cos βt, e sin βt) =
αe cos βt − βe sin βt αe sin βt + βeαt cos βt
αt αt αt

2αt
cos βt sin βt
= e
α cos βt − β sin βt α sin βt + β cos βt
= e2αt α sin βt cos βt + β cos2 βt − α sin αt cos βt + β sin2 βt


= βe2αt
which is never zero (as β 6= 0 here). Hence, eαt cos βt and eαt sin βt are indeed linearly
independent.]
Note:

96
(i) C2 = C1∗ =⇒ Cm , Cn ∈ R =⇒ y(t) ∈ R.
(ii) Sometimes it is helpful to express the term

Cm cos βt + Cn sin βt, (Cm , Cn constants)

as
C cos (βt + φ) , (C, φ constants) .
Since C cos (βt + φ) = C (cos βt cos φ − sin βt sin φ), we have

Cn
Cm = C cos φ, Cn = −C sin φ; i.e., C 2 = Cm
2
+ Cn2 , tan φ = − .
Cm

• Example 87 Solve the ODE


d2 y dy
2
− 6 + 13y = 0.
dt dt

6± −16
Soln: The auxiliary eqn r2 − 6r + 13 = 0 has the roots r = = 3 ± 2i. Hence the
2
general soln to the ODE is

y(t) = e3t (Cm cos 2t + Cn sin 2t) .

• If appropriate initial conditions are specified then particular solns can be found.

• Example 88 Solve the IVP

d2 y
+y =0 y(0) = 2, y ′ (0) = 3.
dt2

Soln: The auxiliary eqn r2 + 1 = 0 has roots r = ±i so the general soln to the ODE is

y(t) = CM cos t + CN sin t, (since here α = 0, β = 1).

Differentiating the general soln gives

y ′ (t) = −CM sin t + CN cos t.

To satisfy the initial conditions we require

y(0) = CM = 2, y ′ (0) = CN = 3.

Thus, the particular soln is


y(t) = 2 cos t + 3 sin t.

• Particular solns can also be found if appropriate boundary conditions are specified. A
boundary-value problem (BVP) comprises the ODE along with boundary conditions of the
form
y(x1 ) = y1 , y(x2 ) = y2 .

Caution: BVPs do not always have solns.

97
• Example 89 Solve the BVP

d2 y dy
2
+2 + y = 0, y(0) = 1, y(1) = 3.
dx dx

Soln: The auxiliary eqn r2 + 2r + 1 = (r + 1)2 = 0 has only one root r = −1, so the
general soln to the ODE is
y(x) = C1 e−x + C2 xe−x .
To satisfy the boundary conditions we require

y(0) = C1 = 1, y(1) = C1 e−1 + C2 e−1 = 3.

Substituting C1 = 1 into the second eqn we find C2 = 3e − 1. Thus, the particular soln is

y(x) = e−x + (3e − 1) xe−x .

7.3 Linear nonhomogeneous ODEs with constant coefficients

• Consider the linear nonhomogeneous ODE with constant coefficients

ay ′′ + by ′ + cy = g(t) (23)

where a, b, c are real-valued constants and a 6= 0.

• The corresponding homogeneous ODE (22) is called the complementary equation.

• If Y1 and Y2 are any two solns of the nonhomogeneous ODE (23) then their difference
Y1 − Y2 is a soln of the corresponding complementary eqn (22); i.e.,

Y1 (t) − Y2 (t) = C1 y1 (t) + C2 y2 (t)

where C1 , C2 are certain constants and y1 , y2 are a fundamental set of solns of the
corresponding complementary eqn (22).
Proof: We have

aY1′′ + bY1′ + cY1 = g(t), aY2′′ + bY2′ + cY2 = g(t).

Subtracting the second eqn from the first provides


 
a Y1′′ − Y2′′ + b Y1′ − Y2′ + c (Y1 − Y2 ) = 0
i.e., a (Y1 − Y2 )′′ + b (Y1 − Y2 )′ + c (Y1 − Y2 ) = 0.

Hence result.

• In this result, if we let Y1 be an arbitrary soln y(t) of the nonhomogeneous ODE (23) and
let Y2 be a particular soln yp (t) of the nonhomogeneous ODE (23), then we see that the
general soln of the nonhomogeneous ODE (23) may be expressed as

y(t) = yc (t) + yp (t)

where yc (t) = C1 y1 (t) + C2 y2 (t) is the general soln of the corresponding complementary
eqn (22).
yc (t) is called the complementary function.

98
• In other words, to find the general soln of the nonhomogeneous ODE (23):

– Find the general soln yc of the corresponding homogeneous ODE (22), using the
techniques of §7.2;
– find any particular soln yp to the nonhomogeneous ODE (23);
– then add yc and yp together.

• There are two main methods of finding a particular soln yp to the nonhomogeneous ODE
(23) :

– Method of Undetermined Coefficients presented in §7.3.1, which can be straightfor-


ward to execute but only works for a restricted class of functions g(t) in (23).
– Method of Variation of Parameters presented in §7.3.2, which is a general method
that is applicable for any g(t) in (23) but it can be difficult in practice.

• Note: If the constant coefficients a, b, c in the nonhomogeneous ODE (23) were replaced
by functions a(t), b(t), c(t) then the general soln can still be expressed as

y(t) = yc (t) + yp (t)

with yc (t) being the general soln of the corresponding homogeneous ODE and yp (t) being
any particular soln of the nonhomogeneous one.

7.3.1 Method of undetermined coefficients

• Effectively, ‘method of judicious guessing’.

• Case (i): g(t) = M ekt

– If k is a not a root of the auxiliary eqn, try yp (t) = Cekt ;


– if k is a root of the auxiliary eqn, try yp (t) = Ctekt ;
– if k is a repeated root of the auxiliary eqn, try yp (t) = Ct2 ekt .

• Example 90 Find the general solns of the nonhomogeneous ODEs

(a) y ′′ − y ′ − 12y = 36e−5t


(b) y ′′ − y ′ − 12y = 21e−3t

Soln: The complementary eqns for both ODEs have the auxiliary eqn r2 − r − 12 =
(r − 4) (r + 3) = 0 which has roots r1 = 4, r2 = −3. So the complementary function for
both ODEs is
yc (t) = C1 e4t + C2 e−3t .

(a) -5 is not a root of the auxiliary eqn so we try yp (t) = Ce−5t . Substituting into the
nonhomogeneous ODE gives

yp′′ − yp′ − 12yp = 25Ce−5t + 5Ce−5t − 12Ce−5t = 18Ce−5t = 36e−5t .

Thus yp is a particular soln provided that C = 2. Therefore the general soln is

y(t) = C1 e4t + C2 e−3t + 2e−5t .

99
(b) -3 is a root of the auxiliary eqn so we try yp (t) = Cte−3t . We have
 
yp′ = C e−3t − 3te−3t , yp′′ = C −6e−3t + 9te−3t ,

so substituting into the nonhomogeneous ODE gives


 
yp′′ −yp′ −12yp = C −6e−3t + 9te−3t −C e−3t − 3te−3t −12Cte−3t = −7Ce−3t = 21e−3t .

Thus yp is a particular soln provided that C = −3. Therefore the general soln is

y(t) = C1 e4t + C2 e−3t − 3te−3t .

• Example 91 Solve the IVP

y ′′ + 6y ′ + 9y = e−3t , y(0) = 2, y ′ (0) = 1.

Soln: The complementary eqn has the auxiliary eqn r2 + 6r + 9 = (r + 3)2 = 0 which has
the repeated root r = −3. So the complementary function is

yc (t) = (C1 t + C2 ) e−3t .

-3 is a repeated root of the auxiliary eqn so we try yp (t) = Ct2 e−3t . We have

yp′ = C −3t2 + 2t e−3t , yp′′ = C 9t2 − 12t + 2 e−3t ,


 

so substituting into the nonhomogeneous ODE gives

yp′′ + 6yp′ + 9yp = C 9t2 − 12t + 2 − 18t2 + 12t + 9t2 e−3t = 2Ce−3t = e−3t .


Thus yp is a particular soln provided that C = 1/2. Therefore the general soln is

1
y(t) = (C1 t + C2 ) e−3t + t2 e−3t .
2
Differentiating the general soln gives
3
y ′ (t) = C1 e−3t − 3 (C1 t + C2 ) e−3t + te−3t − t2 e−3t .
2
To satisfy the initial conditions we require

y(0) = C2 = 2, y ′ (0) = C1 − 3C2 = C1 − 6 = 1.

Thus, the particular soln is


 
1 2 −3t
y(t) = 2 + 7t + t e .
2

• Case (ii): g(t) = M cos kt + N sin kt

– If ±ik are not roots of the auxiliary eqn, try yp (t) = C cos kt + D sin kt;
– if ±ik are roots of the auxiliary eqn, try yp (t) = t (C cos kt + D sin kt) .

• Example 92 Find the general solns of the nonhomogeneous ODEs

(a) 2y ′′ − y ′ − 6y = 21 sin 3t
(b) y ′′ + 9y = 12 cos 3t − 6 sin 3t

100
Soln:

(a) The complementary eqn has the auxiliary eqn 2r2 − r − 6 = (2r + 3) (r − 2) = 0
which has roots r1 = −3/2, r2 = 2. So the complementary function is
3
yc (t) = C1 e− 2 t + C2 e2t .

±3i are not roots of the auxiliary eqn so we try yp (t) = C cos 3t + D sin 3t. We have

yp′ = −3C sin 3t + 3D cos 3t, yp′′ = −9C cos 3t − 9D sin 3t,

so substituting into the nonhomogeneous ODE gives

(−24C − 3D) cos 3t + (3C − 24D) sin 3t = 21 sin 3t.

Thus yp is a particular soln provided that

−24C − 3D = 0 and 3C − 24D = 21.

This pair of linear eqns has the soln C = 7/65, D = −56/65. Hence the general soln
of the ODE is
3 1
y(t) = C1 e− 2 t + C2 e2t + (7 cos 3t − 56 sin 3t) .
65

(b) The complementary eqn has the auxiliary eqn r2 + 9 = 0 which has roots r1 = 3i,
r2 = −3i. So the complementary function is

yc (t) = C1 cos 3t + C2 sin 3t.

±3i are roots of the auxiliary eqn so we try yp (t) = t (C cos 3t + D sin 3t). We have

yp′ = C cos 3t + D sin 3t + t (−3C sin 3t + 3D cos 3t)


yp′′ = (6D − 9Ct) cos 3t + (−6C − 9Dt) sin 3t

so substituting into the nonhomogeneous ODE gives

6D cos 3t − 6C sin 3t = 12 cos 3t − 6 sin 3t.

Thus yp is a particular soln provided that C = 1 and D = 2. Hence the general soln
of the ODE is
y(t) = C1 cos 3t + C2 sin 3t + t (cos 3t + 2 sin 3t) .

• Case (iii): g(t) = an tn + an−1 tn−1 + · · · a1 t + a0

– If 0 is a not a root of the auxiliary eqn, try yp (t) = bn tn + bn−1 tn−1 + · · · + b1 t + b0 ;


– if 0 is a root of the auxiliary eqn, try yp (t) = t bn tn + bn−1 tn−1 + · · · + b1 t + b0 ;


– if 0 is a repeated root of the auxiliary eqn, try yp (t) = t2 bn tn + bn−1 tn−1 + · · · + b1 t + b0 .




• Example 93 Find the general solns of the nonhomogeneous ODEs

(a) y ′′ + y ′ − 2y = t2
(b) y ′′ + y ′ = t + 1

Soln:

101
(a) The complementary eqn has the auxiliary eqn r2 + r − 2 = (r − 1) (r + 2) = 0 which
has roots r1 = 1, r2 = −2. So the complementary function is

yc (t) = C1 et + C2 e−2t .

0 is not a root of the auxiliary eqn so we try yp (t) = Ct2 + Dt + E. We have

yp′ = 2Ct + D, yp′′ = 2C,

so substituting into the nonhomogeneous ODE gives

2C + (2Ct + D) − 2 Ct2 + Dt + E = −2Ct2 + (2C − 2D) t + (2C + D − 2E) = t2 .




Polynomials are equal when their coefficients are equal. Thus yp is a particular soln
provided that

−2C = 1, 2C − 2D = 0, 2C + D − 2E = 0;

which yields the solns C = −1/2, D = −1/2, E = −3/4. Hence the general soln of
the ODE is
1 1 3
y(t) = C1 et + C2 e−2t − t2 − t − .
2 2 4
(b) The complementary eqn has the auxiliary eqn r2 + r = 0 which has roots r1 = 0,
r2 = −1. So the complementary function is

yc (t) = C1 + C2 e−t .

0 is a root of the auxiliary eqn so we try yp (t) = t (Ct + D). We have

yp′ = 2Ct + D, yp′′ = 2C,

so substituting into the nonhomogeneous ODE gives

2C + 2Ct + D = t + 1.

Thus yp is a particular soln provided that

1
2C = 1, 2C + D = 1, i.e., C= , D = 0.
2
Hence the general soln of the ODE is
1
y(t) = C1 + C2 e−t + t2 .
2

• If g(t) is a product of functions of the types covered in Cases (i), (ii), (iii), then for our trial
particular soln yp we take a corresponding product of functions.

• Example 94 Find the general soln of the nonhomogeneous ODE

y ′′ − 3y ′ − 4y = −8et cos 2t.

Soln: The complementary eqn has the auxiliary eqn r2 − 3r − 4 = (r − 4) (r + 1) = 0


which has roots r1 = 4, r2 = −1. So the complementary function is

yc (t) = C1 e4t + C2 e−t .

102
Neither 1 nor ±2i is a root of the auxiliary eqn so we try yp (t) = Cet cos 2t + Det sin 2t. We
have

yp′ = (C + 2D) et cos 2t + (−2C + D) et sin 2t


yp′′ = (−3C + 4D) et cos 2t + (−4C − 3D) et sin 2t

so substituting into the nonhomogeneous ODE gives

(−10C − 2D) et cos 2t + (2C − 10D) et sin 2t = −8et cos 2t.

Thus yp is a particular soln provided that

−10C − 2D = −8, 2C − 10D = 0,

which yields the solns C = 10/13, D = 2/13. Hence the general soln of the ODE is

et
y(t) = C1 e4t + C2 e−t + (10 cos 2t + 2 sin 2t) .
13

• Summary: Let An (t), Bn (t), Pn (t) denote the nth-degree polynomials

An (t) = an tn + an−1 tn−1 + · · · + a1 t + a0 




Bn (t) = bn tn + bn−1 tn−1 + · · · + b1 t + b0 .

Pn (t) = pn tn + pn−1 tn−1 + · · · + p1 t + p0

Trial particular solns yp for the nonhomogeneous ODE (23):

– if g(t) = Pn (t) try yp (t) = ts An (t)


– if g(t) = Pn (t)emt try yp (t) = ts An (t)emt
– if g(t) = Pn (t)emt cos kt try yp (t) = ts emt [An (t) cos kt + Bn (t) sin kt]
– if g(t) = Pn (t)emt sin kt try yp (t) = ts emt [An (t) cos kt + Bn (t) sin kt]

where s is the smallest of the integers 0, 1, 2 that ensures that no term of yp is a soln of
the corresponding complementary eqn.

• If yp1 (t) and yp2 (t) are particular solns of the nonhomogeneous ODEs

ay ′′ + by ′ + cy = g1 (t), ay ′′ + by ′ + cy = g2 (t)

respectively, then yp1 (t) + yp2 (t) is a particular soln of the nonhomogeneous ODE

ay ′′ + by ′ + cy = g1 (t) + g2 (t).

Proof: We have
′′ ′ ′′ ′
ayp1 + byp1 + cyp1 = g1 (t), ayp2 + byp2 + cyp2 = g2 (t).

Adding these two ODEs we find


′′ ′′
 ′ ′

a yp1 + yp2 + b yp1 + yp2 + c (yp1 + yp2 ) = g1 (t) + g2 (t)
i.e., a (yp1 + yp2 )′′ + b (yp1 + yp2 )′ + c (yp1 + yp2 ) = g1 (t) + g2 (t),

as required.

103
• Example 95 Find the general soln of the nonhomogeneous ODE

y ′′ − 4y = tet + cos 2t.

Soln: The complementary eqn has the auxiliary eqn r2 − 4 = 0 which has roots r1 = 2,
r2 = −2. So the complementary function is

yc (t) = C1 e2t + C2 e−2t .

To find a suitable particular soln yp (t), we first find particular 2 solns

yp1 (t) for y ′′ − 4y = tet and yp2 (t) for y ′′ − 4y = cos 2t

then let yp (t) = yp1 (t) + yp2 (t).

(a) g(t) = tet


Neither 0 nor 1 is a root of the auxiliary eqn so we try yp1 (t) = (Ct + D)et . We have

yp1 = (Ct + D + C)et , ′′
yp1 = (Ct + D + 2C)et

so substituting into the corresponding nonhomogeneous ODE gives

(Ct + D + 2C)et − 4(Ct + D)et = (−3Ct + 2C − 3D) et = tet .

Thus yp1 is a particular soln provided that

−3C = 1 and 2C − 3D = 0,

which yields the solns C = −1/3, D = −2/9; i.e.,


1 2
yp1 (t) = (− t − )et .
3 9

(b) g(t) = cos 2t


±2i are not roots of the auxiliary eqn so we try yp2 (t) = C cos 2t + D sin 2t. We have
′ ′′
yp2 = −2C sin 2t + 2D cos 2t, yp2 = −4C cos 2t − 4D sin 2t

so substituting into the corresponding nonhomogeneous ODE gives

−4C cos 2t − 4D sin 2t − 4(C cos 2t + D sin 2t) = −8C cos 2t − 8D sin 2t = cos 2t.

Thus yp2 is a particular soln provided that C = −1/8, D = 0; i.e.,

1
yp2 (t) = − cos 2t.
8

Therefore the general soln of the ODE is


1 2 1
y(t) = C1 e2t + C2 e−2t − ( t + )et − cos 2t.
3 9 8

104
7.3.2 Method of variation of parameters

• Here we turn to the case where g(t) for the nonhomogeneous ODE (23) is a general
function:

– Suppose that we know the general soln

yc (t) = C1 y1 (t) + C2 y2 (t)

to the corresponding homogeneous ODE (22).


– We seek a particular soln of the nonhomogeneous ODE (23) of the form

yp (t) = u1 (t)y1 (t) + u2 (t)y2 (t) (24)

where u1 (t), u2 (t) are functions to be determined.


– Consider the derivative

yp′ (t) = u′1 (t)y1 (t) + u1 (t)y1′ (t) + u′2 (t)y2 (t) + u2 (t)y2′ (t)

and make the assumption

u′1 (t)y1 (t) + u′2 (t)y2 (t) = 0. (25)

– Note: Since 2 unknown functions u1 (t), u2 (t) have been introduced, we need to
impose 2 conditions, namely (24) and (25), in order to determine u1 (t), u2 (t).
– Then we have

yp′′ (t) = u′1 (t)y1′ (t) + u1 (t)y1′′ (t) + u′2 (t)y2′ (t) + u2 (t)y2′′ (t)

and substituting yp , yp′ , yp′′ into the nonhomogeneous ODE (23) yields
  
u1 ay1′′ + by1′ + cy1 + u2 ay2′′ + by2′ + cy2 + a u′1 y1′ + u′2 y2′ = g;

since y1 and y2 are solns to the corresponding homogeneous ODE (22), the first two
bracketed terms vanish, i.e.,
g(t)
u′1 (t)y1′ (t) + u′2 (t)y2′ (t) = . (26)
a
– The pair of linear algebraic eqns (25), (26) can be solved for u′1 , u′2 per
y2 (t)g(t) y2 (t)g(t)
u′1 (t) = − =−
a [y1 (t)y2′ (t) − y2 (t)y1′ (t)] aW (y1 , y2 )
y1 (t)g(t) y1 (t)g(t)
u′2 (t) = ′ ′ = .
a [y1 (t)y2 (t) − y2 (t)y1 (t)] aW (y1 , y2 )

– Note: a 6= 0 by assumption and the Wronskian W (y1 , y2 ) 6= 0 since y1 , y2 constitute


a fundamental set of solns for the homogeneous ODE (22).
– Therefore the sought after particular soln of the nonhomogeneous ODE (23) is
y2 (t)g(t) y1 (t)g(t)
Z Z
yp (t) = −y1 (t) dt + y2 (t) dt
aW (y1 , y2 ) aW (y1 , y2 )
and the corresponding general soln is

y(t) = yc (t) + yp (t).

105
• Example 96 Find the general soln of the nonhomogeneous ODE
π
y ′′ + y = tan t, 0<t< .
2

Soln: The complementary eqn has the auxiliary eqn r2 + 1 = 0 which has roots r = ±i.
So the complementary function is

yc (t) = C1 cos t + C2 sin t.

We seek a particular soln

yp (t) = u1 (t) cos t + u2 (t) sin t

with u1 , u2 satisfying
sin t tan t cos t tan t
u′1 (t) = − = − sin t tan t, u′2 (t) = = sin t,
W (cos t, sin t) W (cos t, sin t)

wherein W (cos t, sin t) = cos2 t + sin2 t = 1. Thus

sin2 t
Z Z
u1 (t) = − dt = − (sec t − cos t) dt = − ln |sec t + tan t| + sin t
cos t
Z
u2 (t) = sin t dt = − cos t.

Therefore, the particular soln is

yp (t) = [− ln (sec t + tan t) + sin t] cos t − cos t sin t = − cos t ln (sec t + tan t)

and the general soln to the nonhomogeneous ODE is

y(t) = C1 cos t + C2 sin t − cos t ln (sec t + tan t) .

Note:

– The term |sec t + tan t| = sec t + tan t for 0 < t < π2 .


– There is no need to include integration constants when we integrate u′1 , u′2 as these
would produce terms that are already included in yc .

• The Method of Variation of Parameters works in same way if the constant coefficients a, b,
c of the nonhomogeneous ODE (23) were replaced by functions a(t), b(t), c(t). However
it may then be tricky to find the fundamental set of solns y1 (t), y2 (t) for the corresponding
homogeneous ODE; the techniques of §8.3 may be needed.

106

You might also like