Download Nonhomogeneous Linear Equations and more Cheat Sheet Mathematical Methods in PDF only on Docsity!
Nonhomogeneous Linear Equations
In this section we learn how to solve second-order nonhomogeneous linear differential equa-
tions with constant coefficients, that is, equations of the form
where , , and are constants and is a continuous function. The related homogeneous
equation
is called the complementary equation and plays an important role in the solution of the
original nonhomogeneous equation (1).
Theorem The general solution of the nonhomogeneous differential equation (1)
can be written as
where is a particular solution of Equation 1 and is the general solution of the
complementary Equation 2.
Proof All we have to do is verify that if is any solution of Equation 1, then is a
solution of the complementary Equation 2. Indeed
We know from Additional Topics: Second-Order Linear Differential Equations how to
solve the complementary equation. (Recall that the solution is , where
and are linearly independent solutions of Equation 2.) Therefore, Theorem 3 says that
we know the general solution of the nonhomogeneous equation as soon as we know a par-
ticular solution. There are two methods for finding a particular solution: The method of
undetermined coefficients is straightforward but works only for a restricted class of func-
tions. The method of variation of parameters works for every function but i0s usually
more difficult to apply in practice.
The Method of Undetermined Coefficients
We first illustrate the method of undetermined coefficients for the equation
where ) is a polynomial. It is reasonable to guess that there is a particular solution
that is a polynomial of the same degree as because if is a polynomial, then
is also a polynomial. We therefore substitute a polynomial (of the
same degree as ) into the differential equation and determine the coefficients.
EXAMPLE 1 Solve the equation.
SOLUTION The auxiliary equation of is
r^2 r 2 r 1 r 2 0
y y 2 y 0
y y 2 y x^2
G
ay by cy yp x
yp G y
G x
ay by cy G x
G G
yp
y 2
yc c 1 y 1 c 2 y 2 y 1
t x t x 0
ay by cy ayp byp cyp
a y yp b y yp c y yp ay ayp by byp cy cyp
y y yp
yp yc
y x yp x yc x
2 ay by cy 0
ab c G
1 ay by cy G x
1
with roots ,. So the solution of the complementary equation is
Since is a polynomial of degree 2, we seek a particular solution of the form
Then and so, substituting into the given differential equation, we
have
or
Polynomials are equal when their coefficients are equal. Thus
The solution of this system of equations is
A particular solution is therefore
and, by Theorem 3, the general solution is
If (the right side of Equation 1) is of the form , where and are constants,
then we take as a trial solution a function of the same form, , because the
derivatives of are constant multiples of.
EXAMPLE 2 Solve.
SOLUTION The auxiliary equation is with roots , so the solution of the
complementary equation is
For a particular solution we try. Then and. Substi-
tuting into the differential equation, we have
so and. Thus, a particular solution is
and the general solution is
If is either or , then, because of the rules for differentiating the
sine and cosine functions, we take as a trial particular solution a function of the form
yp x A cos kx B sin kx
G x C cos kx C sin kx
y x c 1 cos 2 x c 2 sin 2 x 131 e^3 x
yp x 131 e^3 x
13 Ae^3 x^ e^3 x A 131
9 Ae^3 x^ 4 Ae^3 x^ e^3 x
yp x Ae^3 x yp 3 Ae^3 x yp 9 Ae^3 x
yc x c 1 cos 2 x c 2 sin 2 x
r^2 4 0 2 i
y 4 y e^3 x
e k x e k x
yp x Ae k x
G x Ce k x C k
y yc yp c 1 e x^ c 2 e ^2 x^ 12 x^2 12 x 34
yp x ^12 x^2 12 x 34
A ^12 B ^12 C ^34
2 A 1 2 A 2 B 0 2 A B 2 C 0
2 Ax^2 2 A 2 B x 2 A B 2 C x^2
2 A 2 Ax B 2 Ax^2 Bx C x^2
yp 2 Ax B yp 2 A
yp x Ax^2 Bx C
G x x^2
yc c 1 e x^ c 2 e ^2 x
r 1 2
2 ■ NONHOMOGENEOUS LINEAR EQUATIONS
■ ■ (^) Figure 1 shows four solutions of the differen- tial equation in Example 1 in terms of the particu- lar solution and the functions and t x e ^2 x.
yp f x e x
■ ■ (^) Figure 2 shows solutions of the differential equation in Example 2 in terms of and the functions and. Notice that all solutions approach as and all solutions resemble sine functions when x is negative.
x l
f x cos 2 x t x sin 2 x
yp
FIGURE 1
8
_
_3 3 y (^) p
yp+3g yp+2f
yp+2f+3g
FIGURE 2
4
_
_4 2
y (^) p
yp+g
y (^) p+f
y (^) p+f+g
4 ■ NONHOMOGENEOUS LINEAR EQUATIONS
Thus, and , so , , and
For the equation , we try
Substitution gives
or
Therefore, , , and
By the superposition principle, the general solution is
Finally we note that the recommended trial solution sometimes turns out to be a solu-
tion of the complementary equation and therefore can’t be a solution of the nonhomoge-
neous equation. In such cases we multiply the recommended trial solution by (or by
if necessary) so that no term in is a solution of the complementary equation.
EXAMPLE 5 Solve.
SOLUTION The auxiliary equation is with roots , so the solution of the com-
plementary equation is
Ordinarily, we would use the trial solution
but we observe that it is a solution of the complementary equation, so instead we try
Then
Substitution in the differential equation gives
so , , and
The general solution is
y x c 1 cos x c 2 sin x 12 x cos x
yp x ^12 x cos x
A ^12 B 0
yp yp 2 A sin x 2 B cos x sin x
yp x 2 A sin x Ax cos x 2 B cos x Bx sin x
yp x A cos x Ax sin x B sin x Bx cos x
yp x Ax cos x Bx sin x
yp x A cos x B sin x
yc x c 1 cos x c 2 sin x
r^2 1 0 i
y y sin x
yp x
x x^2
yp
y yc yp 1 yp 2 c 1 e^2 x^ c 2 e ^2 x^ ( 13 x 29 ) e x^ 18 cos 2 x
yp 2 x ^18 cos 2 x
8 C 1 8 D 0
8 C cos 2 x 8 D sin 2 x cos 2 x
4 C cos 2 x 4 D sin 2 x 4 C cos 2 x D sin 2 x cos 2 x
yp 2 x C cos 2 x D sin 2 x
y 4 y cos 2 x
yp 1 x (^13 x 29 ) e x
3 A 1 2 A 3 B 0 A ^13 B ^29
FIGURE 4
4
_
_2π 2π
yp
■ ■ (^) The graphs of four solutions of the differen- tial equation in Example 5 are shown in Figure 4.
■ ■ (^) In Figure 3 we show the particular solution of the differential equation in Example 4. The other solutions are given in terms of f x e^2 x and t x e ^2 x.
yp yp 1 yp (^) 2
FIGURE 3
5
_
_4 (^) y 1 p
yp+g
y (^) p+f
yp+2f+g
NONHOMOGENEOUS LINEAR EQUATIONS ■ 5
We summarize the method of undetermined coefficients as follows:
1. If , where is a polynomial of degree , then try ,
where is an th-degree polynomial (whose coefficients are determined by
substituting in the differential equation.)
2. If or , where is an th-degree
polynomial, then try
where and are th-degree polynomials.
Modification: If any term of is a solution of the complementary equation, multiply
by (or by if necessary).
EXAMPLE 6 Determine the form of the trial solution for the differential equation
SOLUTION Here has the form of part 2 of the summary, where , , and
. So, at first glance, the form of the trial solution would be
But the auxiliary equation is , with roots , so the solution
of the complementary equation is
This means that we have to multiply the suggested trial solution by. So, instead, we
use
The Method of Variation of Parameters
Suppose we have already solved the homogeneous equation and writ-
ten the solution as
where and are linearly independent solutions. Let’s replace the constants (or parame-
ters) and in Equation 4 by arbitrary functions and. We look for a particu-
lar solution of the nonhomogeneous equation of the form
(This method is called variation of parameters because we have varied the parameters
and to make them functions.) Differentiating Equation 5, we get
Since and are arbitrary functions, we can impose two conditions on them. One con-
dition is that is a solution of the differential equation; we can choose the other condition
so as to simplify our calculations. In view of the expression in Equation 6, let’s impose the
condition that
7 u 1 y 1 u 2 y 2 0
yp
u 1 u 2
6 yp u 1 y 1 u 2 y 2 u 1 y 1 u 2 y 2
c 2
c 1
5 yp x u 1 x y 1 x u 2 x y 2 x
ay by cy G x
c 1 c 2 u 1 x u 2 x
y 1 y 2
4 y x c 1 y 1 x c 2 y 2 x
ay by cy 0
yp x xe^2 x A cos 3 x B sin 3 x
x
yc x e^2 x c 1 cos 3 x c 2 sin 3 x
r^2 4 r 13 0 r 2 3 i
yp x e^2 x A cos 3 x B sin 3 x
P x 1
G x k 2 m 3
y 4 y 13 y e^2 x^ cos 3 x
x x^2
yp yp
Q R n
yp x e kxQ x cos mx e kxR x sin mx
G x e kxP x cos mx G x e kxP x sin mx P n
Q x n
G x e kxP x P n yp x e kxQ x
NONHOMOGENEOUS LINEAR EQUATIONS ■ 7
(Note that for .) Therefore
and the general solution is
y x c 1 sin x c 2 cos x cos x lnsec x tan x
cos x lnsec x tan x
yp x cos x sin x sin x lnsec x tan x cos x
sec x tan x 0 0 x 2
Exercises
1–10 Solve the differential equation or initial-value problem using the method of undetermined coefficients.
**1. 2.
7.** , , 8. , , 9. , , 10. , , ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
; 11–12^ Graph the particular solution and several other solutions.
What characteristics do these solutions have in common? 11. 12. ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
13–18 Write a trial solution for the method of undetermined coefficients. Do not determine the coefficients. 13. 14.
15. y 9 y 1 xe^9 x
y 9 y xe x^ cos x
y 9 y e^2 x^ x^2 sin x
2 y 3 y y 1 cos 2 x
4 y 5 y y e x
y y 2 y x sin 2 x y 0 1 y 0 0
y y xe x y 0 2 y 0 1
y 4 y e x^ cos x y 0 1 y 0 2
y y e x^ x^3 y 0 2 y 0 0
y 4 y 5 y e x y 2 y y xe x
y 2 y sin 4 x y 6 y 9 y 1 x
y 3 y 2 y x^2 y 9 y e^3 x
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
19–22 Solve the differential equation using (a) undetermined coefficients and (b) variation of parameters. 19. 20.
21.
22. ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
23–28 Solve the differential equation using the method of varia- tion of parameters.
23. , 24. ,
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
y 4 y 4 y
e ^2 x x^3
y y
x
y 3 y 2 y sin e x^
y 3 y 2 y
1 e x
y y cot x 0 x 2
y y sec x 0 x 2
y y e x
y 2 y y e^2 x
y 3 y 2 y sin x
y 4 y x
y 4 y e^3 x^ x sin 2 x
y 2 y 10 y x^2 e x^ cos 3 x
y 3 y 4 y x^3 x e x
A Click here for answers. S Click here for solutions.
8 ■ NONHOMOGENEOUS LINEAR EQUATIONS
Answers
11. The solutions are all asymptotic to as . Except for , all solutions approach either or as.
27. y [ c 1 12 x e x x dx ] e x^ [ c 2 12 x e x x dx ] e x
y c 1 ln 1 e x^ e x^ c 2 e x^ ln 1 e x^ e^2 x
y c 1 x sin x c 2 ln cos x cos x
y c 1 e x^ c 2 xe x^ e^2 x
y c 1 cos 2 x c 2 sin 2 x 14 x
yp xe x^ Ax^2 Bx C cos 3 x Dx^2 Ex F sin 3 x
yp Ax Bx C e^9 x
yp Ae^2 x^ Bx^2 Cx D cos x Ex^2 Fx G sin x
x l
x l yp
yp e x 10
y (^) p
5
_
_2 4
y e x ( 12 x^2 x 2)
y 32 cos x 112 sin x 12 e x^ x^3 6 x
y e^2 x c 1 cos x c 2 sin x 101 e x
y c 1 c 2 e^2 x^ 401 cos 4 x 201 sin 4 x
y c 1 e ^2 x^ c 2 e x^ 12 x^2 32 x (^74)
S Click here for solutions.
11. yc(x) = c 1 e−x/^4 + c 2 e−x. Try yp(x) = Aex. Then
10 Aex^ = ex, so A = 101 and the general solution is
y(x) = c 1 e−x/^4 + c 2 e−x^ + 101 ex. The solutions are all composed
of exponential curves and with the exception of the particular solution (which approaches 0 as x → −∞), they all approach either ∞ or −∞ as x → −∞. As x → ∞, all solutions are
asymptotic to yp = 101 ex.
13. Here yc(x) = c 1 cos 3x + c 2 sin 3x. For y^00 + 9y = e^2 x^ try yp 1 (x) = Ae^2 x^ and for y^00 + 9y = x^2 sin x try yp 2 (x) = (Bx^2 + Cx + D) cos x + (Ex^2 + F x + G) sin x. Thus a trial solution is yp(x) = yp 1 (x) + yp 2 (x) = Ae^2 x^ + (Bx^2 + Cx + D) cos x + (Ex^2 + F x + G) sin x. 15. Here yc(x) = c 1 + c 2 e−^9 x. For y^00 + 9y^0 = 1 try yp 1 (x) = Ax (since y = A is a solution to the complementary equation) and for y^00 + 9y^0 = xe^9 x^ try yp 2 (x) = (Bx + C)e^9 x. 17. Since yc(x) = e−x(c 1 cos 3x + c 2 sin 3x) we try
yp(x) = x(Ax^2 + Bx + C)e−x^ cos 3x + x(Dx^2 + Ex + F )e−x^ sin 3x (so that no term of yp is a solution of the complementary equation).
Note: Solving Equations (7) and (9) in The Method of Variation of Parameters gives
u^01 = −
Gy 2 a (y 1 y 20 − y 2 y^01 )
and u^02 =
Gy 1 a (y 1 y 20 − y 2 y^01 )
We will use these equations rather than resolving the system in each of the remaining exercises in this section.
19. (a) The complementary solution is yc(x) = c 1 cos 2x + c 2 sin 2x. A particular solution is of the form yp(x) = Ax + B. Thus, 4 Ax + 4B = x ⇒ A = 14 and B = 0 ⇒ yp(x) = 14 x. Thus, the general solution is y = yc + yp = c 1 cos 2x + c 2 sin 2x + 14 x.
(b) In (a), yc(x) = c 1 cos 2x + c 2 sin 2x, so set y 1 = cos 2x, y 2 = sin 2x. Then y 1 y^02 − y 2 y 10 = 2 cos^2 2 x + 2 sin^2 2 x = 2 so u^01 = − 12 x sin 2x ⇒ u 1 (x) = − (^12)
R
x sin 2x dx = − (^14)
−x cos 2x + 12 sin 2x
[by parts] and u^02 = 12 x cos 2x ⇒ u 2 (x) = (^12)
R
x cos 2xdx = (^14)
x sin 2x + 12 cos 2x
[by parts]. Hence yp(x) = − (^14)
−x cos 2x + 12 sin 2x
cos 2x + (^14)
x sin 2x + 12 cos 2x
sin 2x = 14 x. Thus y(x) = yc(x) + yp(x) = c 1 cos 2x + c 2 sin 2x + 14 x.
10 ■ NONHOMOGENEOUS LINEAR EQUATIONS
21. (a) r^2 − r = r(r − 1) = 0 ⇒ r = 0, 1 , so the complementary solution is yc(x) = c 1 ex^ + c 2 xex. A particular solution is of the form yp(x) = Ae^2 x. Thus 4 Ae^2 x^ − 4 Ae^2 x^ + Ae^2 x^ = e^2 x^ ⇒ Ae^2 x^ = e^2 x^ ⇒ A = 1 ⇒ yp(x) = e^2 x. So a general solution is y(x) = yc(x) + yp(x) = c 1 ex^ + c 2 xex^ + e^2 x.
(b) From (a), yc(x) = c 1 ex^ + c 2 xex, so set y 1 = ex, y 2 = xex. Then, y 1 y 20 − y 2 y^01 = e^2 x(1 + x) − xe^2 x^ = e^2 x and so u^01 = −xex^ ⇒ u 1 (x) = −
R
xex^ dx = −(x − 1)ex^ [by parts] and u^02 = ex^ ⇒ u 2 (x) =
R
ex^ dx = ex. Hence yp (x) = (1 − x)e^2 x^ + xe^2 x^ = e^2 x^ and the general solution is y(x) = yc(x) + yp(x) = c 1 ex^ + c 2 xex^ + e^2 x.
23. As in Example 6, yc(x) = c 1 sin x + c 2 cos x, so set y 1 = sin x, y 2 = cos x. Then y 1 y^02 − y 2 y^01 = − sin^2 x − cos^2 x = − 1 , so u^01 = −
sec x cos x − 1
= 1 ⇒ u 1 (x) = x and
u^02 =
sec x sin x − 1
= − tan x ⇒ u 2 (x) = −
R
tan xdx = ln |cos x| = ln(cos x) on 0 < x < π 2. Hence
yp(x) = x sin x + cos x ln(cos x) and the general solution is y(x) = (c 1 + x) sin x + [c 2 + ln(cos x)] cos x.
25. y 1 = ex, y 2 = e^2 x^ and y 1 y^02 − y 2 y^01 = e^3 x. So u^01 =
−e^2 x (1 + e−x)e^3 x^
e−x 1 + e−x^
and
u 1 (x) =
Z
e−x 1 + e−x^
dx = ln(1 + e−x). u^02 =
ex (1 + e−x)e^3 x^
ex e^3 x^ + e^2 x^
so
u 2 (x) =
Z
ex e^3 x^ + e^2 x^
dx = ln
μ ex^ + 1 ex
− e−x^ = ln(1 + e−x) − e−x. Hence
yp(x) = ex^ ln(1 + e−x) + e^2 x[ln(1 + e−x) − e−x] and the general solution is y(x) = [c 1 + ln(1 + e−x)]ex^ + [c 2 − e−x^ + ln(1 + e−x)]e^2 x.
27. y 1 = e−x, y 2 = ex^ and y 1 y 20 − y 2 y^01 = 2. So u^01 = −
ex 2 x
, u^02 =
e−x 2 x
and
yp(x) = −e−x
Z
ex 2 x
dx + ex
Z
e−x 2 x
dx. Hence the general solution is
y(x) =
μ c 1 −
Z
ex 2 x
dx
e−x^ +
μ c 2 +
Z
e−x 2 x
dx
ex.
NONHOMOGENEOUS LINEAR EQUATIONS ■ 11