You are on page 1of 11

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

1 ay  by  cy  Gx

where a, b, and c are constants and G is a continuous function. The related homogeneous
equation

2 ay  by  cy  0

is called the complementary equation and plays an important role in the solution of the
original nonhomogeneous equation (1).

3 Theorem The general solution of the nonhomogeneous differential equation (1)


can be written as

yx  ypx  ycx

where yp is a particular solution of Equation 1 and yc is the general solution of the


complementary Equation 2.

Proof All we have to do is verify that if y is any solution of Equation 1, then y  yp is a


solution of the complementary Equation 2. Indeed

a y  yp   by  yp   cy  yp   ay  ayp  by  byp  cy  cyp


 ay  by  cy  ayp  byp  cyp 
 tx  tx  0

We know from Additional Topics: Second-Order Linear Differential Equations how to


solve the complementary equation. (Recall that the solution is yc  c1 y1  c2 y2 , where y1
and y2 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 yp . 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 G. The method of variation of parameters works for every function G but is usually
more difficult to apply in practice.

THE METHOD OF UNDETERMINED COEFFICIENTS

We first illustrate the method of undetermined coefficients for the equation

ay  by  cy  Gx

where Gx) is a polynomial. It is reasonable to guess that there is a particular solution


yp that is a polynomial of the same degree as G because if y is a polynomial, then
ay  by  cy is also a polynomial. We therefore substitute ypx  a polynomial (of the
same degree as G ) into the differential equation and determine the coefficients.

EXAMPLE 1 Solve the equation y  y  2y  x 2.


Thomson Brooks-Cole copyright 2007

SOLUTION The auxiliary equation of y  y  2y  0 is

r 2  r  2  r  1r  2  0

1
2 ■ NONHOMOGENEOUS LINEAR EQUATIONS

with roots r  1, 2. So the solution of the complementary equation is

yc  c1 e x  c2 e2x

Since Gx  x 2 is a polynomial of degree 2, we seek a particular solution of the form

ypx  Ax 2  Bx  C

Then yp  2Ax  B and yp  2A so, substituting into the given differential equation, we
have
2A  2Ax  B  2Ax 2  Bx  C  x 2

or 2Ax 2  2A  2Bx  2A  B  2C  x 2

Polynomials are equal when their coefficients are equal. Thus


■ ■ Figure 1 shows four solutions of the differen-
tial equation in Example 1 in terms of the particu- 2A  1 2A  2B  0 2A  B  2C  0
lar solution yp and the functions f x  e x
and tx  e2 x.
The solution of this system of equations is
8
yp+2f+3g A   12 B   12 C   34

yp+3g A particular solution is therefore


yp+2f
_3 3
yp
ypx   12 x 2  12 x  34

and, by Theorem 3, the general solution is


_5

FIGURE 1 y  yc  yp  c1 e x  c2 e2x  12 x 2  12 x  34

If Gx (the right side of Equation 1) is of the form Ce k x, where C and k are constants,
then we take as a trial solution a function of the same form, ypx  Ae k x, because the
derivatives of e k x are constant multiples of e k x.

EXAMPLE 2 Solve y  4y  e 3x.

SOLUTION The auxiliary equation is r 2  4  0 with roots 2i, so the solution of the
■ ■ Figure 2 shows solutions of the differential complementary equation is
equation in Example 2 in terms of yp and the
functions f x  cos 2x and tx  sin 2x. ycx  c1 cos 2x  c2 sin 2x
Notice that all solutions approach  as x l 
and all solutions resemble sine functions when
x is negative. For a particular solution we try ypx  Ae 3x. Then yp  3Ae 3x and yp  9Ae 3x. Substi-
4
tuting into the differential equation, we have

9Ae 3x  4Ae 3x   e 3x
yp+f+g
yp+g
so 13Ae 3x  e 3x and A  131 . Thus, a particular solution is
yp
_4 2
ypx  131 e 3x
yp+f
_2
and the general solution is

FIGURE 2 yx  c1 cos 2x  c2 sin 2x  131 e 3x

If Gx is either C cos kx or C sin kx, then, because of the rules for differentiating the
sine and cosine functions, we take as a trial particular solution a function of the form
Thomson Brooks-Cole copyright 2007

ypx  A cos kx  B sin kx


NONHOMOGENEOUS LINEAR EQUATIONS ■ 3

EXAMPLE 3 Solve y  y  2y  sin x.

SOLUTION We try a particular solution

ypx  A cos x  B sin x

Then yp  A sin x  B cos x yp  A cos x  B sin x

so substitution in the differential equation gives

A cos x  B sin x  A sin x  B cos x  2A cos x  B sin x  sin x
or 3A  B cos x  A  3B sin x  sin x

This is true if
3A  B  0 and A  3B  1
The solution of this system is
A   101 B   103
so a particular solution is
ypx   101 cos x  103 sin x

In Example 1 we determined that the solution of the complementary equation is


yc  c1 e x  c2 e2x. Thus, the general solution of the given equation is

yx  c1 e x  c2 e2x  101 cos x  3 sin x

If Gx is a product of functions of the preceding types, then we take the trial solu-
tion to be a product of functions of the same type. For instance, in solving the differential
equation
y  2y  4y  x cos 3x

we would try
ypx  Ax  B cos 3x  Cx  D sin 3x

If Gx is a sum of functions of these types, we use the easily verified principle of super-
position, which says that if yp1 and yp2 are solutions of

ay  by  cy  G1x ay  by  cy  G2x

respectively, then yp1  yp2 is a solution of

ay  by  cy  G1x  G2x

EXAMPLE 4 Solve y  4y  xe x  cos 2x.

SOLUTION The auxiliary equation is r 2  4  0 with roots 2, so the solution of the com-
plementary equation is ycx  c1 e 2x  c2 e2x. For the equation y  4y  xe x we try

yp1x  Ax  Be x

Then yp1  Ax  A  Be x, yp1  Ax  2A  Be x, so substitution in the equation
gives
Thomson Brooks-Cole copyright 2007

Ax  2A  Be x  4Ax  Be x  xe x

or 3Ax  2A  3Be x  xe x
4 ■ NONHOMOGENEOUS LINEAR EQUATIONS

Thus, 3A  1 and 2A  3B  0, so A   13 , B   29 , and

yp1x  ( 13 x  29 )e x

For the equation y  4y  cos 2x, we try

yp2x  C cos 2x  D sin 2x


■ ■ In Figure 3 we show the particular solution
yp  yp1  yp 2 of the differential equation in Substitution gives
Example 4. The other solutions are given in
terms of f x  e 2 x and tx  e2 x. 4C cos 2x  4D sin 2x  4C cos 2x  D sin 2x  cos 2x
5
yp+2f+g or 8C cos 2x  8D sin 2x  cos 2x
yp+g
Therefore, 8C  1, 8D  0, and
yp+f
_4 1 yp2x   18 cos 2x
yp
By the superposition principle, the general solution is
_2

FIGURE 3 y  yc  yp1  yp2  c1 e 2x  c2 e2x  ( 13 x  29 )e x  18 cos 2x

Finally we note that the recommended trial solution yp 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 x (or by x 2
if necessary) so that no term in ypx is a solution of the complementary equation.

EXAMPLE 5 Solve y  y  sin x.

SOLUTION The auxiliary equation is r 2  1  0 with roots i, so the solution of the com-
plementary equation is

ycx  c1 cos x  c2 sin x

Ordinarily, we would use the trial solution

ypx  A cos x  B sin x

but we observe that it is a solution of the complementary equation, so instead we try

ypx  Ax cos x  Bx sin x

Then ypx  A cos x  Ax sin x  B sin x  Bx cos x

ypx  2A sin x  Ax cos x  2B cos x  Bx sin x


■ ■ The graphs of four solutions of the differen-
tial equation in Example 5 are shown in Figure 4. Substitution in the differential equation gives
4
yp  yp  2A sin x  2B cos x  sin x

so A   12 , B  0, and
_2π 2π
yp ypx   12 x cos x
Thomson Brooks-Cole copyright 2007

_4
The general solution is

FIGURE 4 yx  c1 cos x  c2 sin x  12 x cos x


NONHOMOGENEOUS LINEAR EQUATIONS ■ 5

We summarize the method of undetermined coefficients as follows:


1. If Gx  e kxPx, where P is a polynomial of degree n, then try ypx  e kxQx,
where Qx is an nth-degree polynomial (whose coefficients are determined by
substituting in the differential equation.)
2. If Gx  e kxPx cos mx or Gx  e kxPx sin mx, where P is an nth-degree
polynomial, then try

ypx  e kxQx cos mx  e kxRx sin mx

where Q and R are nth-degree polynomials.


Modification: If any term of yp is a solution of the complementary equation, multiply yp
by x (or by x 2 if necessary).

EXAMPLE 6 Determine the form of the trial solution for the differential equation
y  4y  13y  e 2x cos 3x.
SOLUTION Here Gx has the form of part 2 of the summary, where k  2, m  3, and
Px  1. So, at first glance, the form of the trial solution would be

ypx  e 2xA cos 3x  B sin 3x

But the auxiliary equation is r 2  4r  13  0, with roots r  2  3i, so the solution


of the complementary equation is

ycx  e 2xc1 cos 3x  c2 sin 3x

This means that we have to multiply the suggested trial solution by x. So, instead, we
use
ypx  xe 2xA cos 3x  B sin 3x

THE METHOD OF VARIATION OF PARAMETERS

Suppose we have already solved the homogeneous equation ay  by  cy  0 and writ-
ten the solution as

4 yx  c1 y1x  c2 y2x

where y1 and y2 are linearly independent solutions. Let’s replace the constants (or parame-
ters) c1 and c2 in Equation 4 by arbitrary functions u1x and u2x. We look for a particu-
lar solution of the nonhomogeneous equation ay  by  cy  Gx of the form

5 ypx  u1xy1x  u2xy2x

(This method is called variation of parameters because we have varied the parameters c1
and c2 to make them functions.) Differentiating Equation 5, we get

6 yp  u1 y1  u2 y2   u1 y1  u2 y2 

Since u1 and u2 are arbitrary functions, we can impose two conditions on them. One con-
dition is that yp 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
Thomson Brooks-Cole copyright 2007

condition that

7 u1 y1  u2 y2  0
6 ■ NONHOMOGENEOUS LINEAR EQUATIONS

Then yp  u1 y1  u2 y2  u1 y1  u2 y2

Substituting in the differential equation, we get

au1 y1  u2 y2  u1 y1  u2 y2  bu1 y1  u2 y2   cu1 y1  u2 y2   G

or

8 u1ay1  by1  cy1   u2ay2  by2  cy2   au1 y1  u2 y2   G

But y1 and y2 are solutions of the complementary equation, so

ay1  by1  cy1  0 and ay2  by2  cy2  0

and Equation 8 simplifies to

9 au1 y1  u2 y2   G

Equations 7 and 9 form a system of two equations in the unknown functions u1 and u2 .
After solving this system we may be able to integrate to find u1 and u2 and then the par-
ticular solution is given by Equation 5.

EXAMPLE 7 Solve the equation y  y  tan x, 0  x   2.

SOLUTION The auxiliary equation is r 2  1  0 with roots i, so the solution of


y  y  0 is c1 sin x  c2 cos x. Using variation of parameters, we seek a solution
of the form
ypx  u1x sin x  u2x cos x

Then yp  u1 sin x  u2 cos x  u1 cos x  u2 sin x

Set

10 u1 sin x  u2 cos x  0

Then yp  u1 cos x  u2 sin x  u1 sin x  u2 cos x

For yp to be a solution we must have

11 yp  yp  u1 cos x  u2 sin x  tan x

Solving Equations 10 and 11, we get

■ ■ Figure 5 shows four solutions of the


u1sin 2x  cos 2x  cos x tan x
differential equation in Example 7.
2.5 u1  sin x u1x  cos x

(We seek a particular solution, so we don’t need a constant of integration here.) Then,
from Equation 10, we obtain
π
0 2 sin x sin 2x cos 2x  1
yp u2   u1     cos x  sec x
cos x cos x cos x
Thomson Brooks-Cole copyright 2007

_1

FIGURE 5 So u2x  sin x  lnsec x  tan x


NONHOMOGENEOUS LINEAR EQUATIONS ■ 7

(Note that sec x  tan x 0 for 0  x   2.) Therefore

ypx  cos x sin x  sin x  lnsec x  tan x cos x


 cos x lnsec x  tan x

and the general solution is

yx  c1 sin x  c2 cos x  cos x lnsec x  tan x

EXERCISES

16. y  3y  4 y  x 3  xe x


A Click here for answers. S Click here for solutions.
17. y  2 y  10 y  x 2ex cos 3x
1–10 Solve the differential equation or initial-value problem 18. y  4y  e 3x  x sin 2x
using the method of undetermined coefficients. ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

1. y  3y  2y  x 2
2. y  9y  e 3x
19–22 Solve the differential equation using (a) undetermined
3. y  2y  sin 4x 4. y  6y  9y  1  x coefficients and (b) variation of parameters.
x 19. y  4y  x
5. y  4y  5y  e 6. y  2y  y  xex
20. y  3y  2y  sin x
7. y  y  e x  x 3, y0  2, y0  0
21. y  2y  y  e 2x
8. y  4y  e x cos x, y0  1, y0  2
9. y  y  xe x, y0  2, y0  1 22. y  y  e x
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

10. y  y  2y  x  sin 2x, y0  1, y0  0


■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
23–28 Solve the differential equation using the method of varia-
tion of parameters.
; 11–12 Graph the particular solution and several other solutions.
23. y  y  sec x, 0  x  2
What characteristics do these solutions have in common?
24. y  y  cot x, 0  x  2
11. 4y  5y  y  e x
1
12. 2y  3y  y  1  cos 2x 25. y  3y  2y 
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
1  ex

13 –18 Write a trial solution for the method of undetermined 26. y  3y  2y  sine x 
coefficients. Do not determine the coefficients. 1
27. y  y 
13. y  9 y  e 2x
 x sin x2 x
e2x
14. y  9 y  xe x
cos  x 28. y  4y  4y 
x3
15. y  9 y  1  xe 9x ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Thomson Brooks-Cole copyright 2007
8 ■ NONHOMOGENEOUS LINEAR EQUATIONS

ANSWERS

13. yp  Ae 2x  Bx 2  Cx  D cos x  Ex 2  Fx  G sin x


S Click here for solutions.
15. yp  Ax  Bx  C e 9x
1. y  c1 e2x  c2 ex  2 x 2  2 x  17. yp  xex Ax 2  Bx  C  cos 3x  Dx 2  Ex  F sin 3x
1 3 7
4

3. y  c1  c2 e 2x  cos 4x  201 sin 4x 19. y  c1 cos 2x  c2 sin 2x  4 x


1 1
40
1 x
5. y  e 2x c1 cos x  c2 sin x  e
10 21. y  c1e x  c2 xe x  e 2x
7. y  2 cos x  sin x  12 e x  x 3  6x 23. y  c1  x sin x  c2  ln cos x cos x
3 11
2

9. y  e (
x 1
2 x  x  2)
2
25. y  c1  ln1  ex e x  c2  ex  ln1  ex e 2x

27. y  [c1  x e xx dx]ex  [c2  12 x exx dx]e x


1
11. 5 The solutions are all asymptotic 2
to yp  e x10 as x l . Except
for yp , all solutions approach
_2 4 either  or  as x l .
yp

_4
Thomson Brooks-Cole copyright 2007
NONHOMOGENEOUS LINEAR EQUATIONS ■ 9

SOLUTIONS

1. The auxiliary equation is r2 + 3r + 2 = (r + 2)(r + 1) = 0, so the complementary solution is


yc (x) = c1 e−2x + c2 e−x . We try the particular solution yp (x) = Ax2 + Bx + C, so yp0 = 2Ax + B and yp00 = 2A.

Substituting into the differential equation, we have (2A) + 3(2Ax + B) + 2(Ax2 + Bx + C) = x2 or


2Ax2 + (6A + 2B)x + (2A + 3B + 2C) = x2 . Comparing coefficients gives 2A = 1, 6A + 2B = 0, and
2A + 3B + 2C = 0, so A = 12 , B = − 32 , and C = 74 . Thus the general solution is

y(x) = yc (x) + yp (x) = c1 e−2x + c2 e−x + 12 x2 − 32 x + 74 .

3. The auxiliary equation is r2 − 2r = r(r − 2) = 0, so the complementary solution is yc (x) = c1 + c2 e2x . Try the
particular solution yp (x) = A cos 4x + B sin 4x, so yp0 = −4A sin 4x + 4B cos 4x
and yp00 = −16A cos 4x − 16B sin 4x. Substitution into the differential equation
gives (−16A cos 4x − 16B sin 4x) − 2(−4A sin 4x + 4B cos 4x) = sin 4x ⇒
(−16A − 8B) cos 4x + (8A − 16B) sin 4x = sin 4x. Then −16A − 8B = 0 and 8A − 16B = 1 ⇒ A = 1
40

and B = − 20
1
. Thus the general solution is y(x) = yc (x) + yp (x) = c1 + c2 e2x + 1
40
cos 4x − 1
20
sin 4x.

5. The auxiliary equation is r2 − 4r + 5 = 0 with roots r = 2 ± i, so the complementary solution is


yc (x) = e2x (c1 cos x + c2 sin x). Try yp (x) = Ae−x , so yp0 = −Ae−x and yp00 = Ae−x . Substitution gives

Ae−x − 4(−Ae−x ) + 5(Ae−x ) = e−x ⇒ 10Ae−x = e−x ⇒ A= 10 .


1
Thus the general solution is
2x 1 −x
y(x) = e (c1 cos x + c2 sin x) + 10
e .

7. The auxiliary equation is r2 + 1 = 0 with roots r = ±i, so the complementary solution is


yc (x) = c1 cos x + c2 sin x. For y 00 + y = ex try yp1 (x) = Aex . Then yp0 1 = yp001 = Aex and substitution gives

Aex + Aex = ex ⇒ A = 12 , so yp1 (x) = 12 ex . For y 00 + y = x3 try yp2 (x) = Ax3 + Bx2 + Cx + D.

Then yp0 2 = 3Ax2 + 2Bx + C and yp002 = 6Ax + 2B. Substituting, we have

6Ax + 2B + Ax3 + Bx2 + Cx + D = x3 , so A = 1, B = 0, 6A + C = 0 ⇒ C = −6, and 2B + D = 0 ⇒


D = 0. Thus yp2 (x) = x3 − 6x and the general solution is
y(x) = yc (x) + yp1 (x) + yp2 (x) = c1 cos x + c2 sin x + 12 ex + x3 − 6x. But 2 = y(0) = c1 + 1
2
⇒ c1 = 3
2

and 0 = y 0 (0) = c2 + 1
2
− 6 ⇒ c2 = 11
2
. Thus the solution to the initial-value problem is

y(x) = 3
2 cos x + 11
2 sin x + 12 ex + x3 − 6x.

9. The auxiliary equation is r2 − r = 0 with roots r = 0, r = 1 so the complementary solution is yc (x) = c1 + c2 ex .


Try yp (x) = x(Ax + B)ex so that no term in yp is a solution of the complementary equation. Then
yp0 = (Ax2 + (2A + B)x + B)ex and yp00 = (Ax2 + (4A + B)x + (2A + 2B))ex . Substitution into the differential

equation gives (Ax2 + (4A + B)x + (2A + 2B))ex − (Ax2 + (2A + B)x + B)ex = xex ⇒
 
(2Ax + (2A + B))ex = xex ⇒ A = 12 , B = −1. Thus yp (x) = 12 x2 − x ex and the general solution is
Thomson Brooks-Cole copyright 2007

 
y(x) = c1 + c2 ex + 12 x2 − x ex . But 2 = y(0) = c1 + c2 and 1 = y 0 (0) = c2 − 1, so c2 = 2 and c1 = 0. The
   
solution to the initial-value problem is y(x) = 2ex + 12 x2 − x ex = ex 12 x2 − x + 2 .
10 ■ NONHOMOGENEOUS LINEAR EQUATIONS

11. yc (x) = c1 e−x/4 + c2 e−x . Try yp (x) = Aex . Then


10Aex = ex , so A = 1
10
and the general solution is

y(x) = c1 e−x/4 + c2 e−x + e .


1 x
10
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 = 1 x
10
e .

13. Here yc (x) = c1 cos 3x + c2 sin 3x. For y 00 + 9y = e2x try yp1 (x) = Ae2x and for y 00 + 9y = x2 sin x try
yp2 (x) = (Bx2 + Cx + D) cos x + (Ex2 + F x + G) sin x. Thus a trial solution is
yp (x) = yp1 (x) + yp2 (x) = Ae2x + (Bx2 + Cx + D) cos x + (Ex2 + F x + G) sin x.

15. Here yc (x) = c1 + c2 e−9x . For y 00 + 9y 0 = 1 try yp1 (x) = Ax (since y = A is a solution to the complementary
equation) and for y 00 + 9y 0 = xe9x try yp2 (x) = (Bx + C)e9x .

17. Since yc (x) = e−x (c1 cos 3x + c2 sin 3x) we try


yp (x) = x(Ax2 + Bx + C)e−x cos 3x + x(Dx2 + 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

Gy2 Gy1
u01 = − and u02 =
a (y1 y20 − y2 y10 ) a (y1 y20 − y2 y10 )
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) = c1 cos 2x + c2 sin 2x. A particular solution is of the form

yp (x) = Ax + B. Thus, 4Ax + 4B = x ⇒ A = 1


4
and B = 0 ⇒ yp (x) = 14 x. Thus, the general

solution is y = yc + yp = c1 cos 2x + c2 sin 2x + 14 x.

(b) In (a), yc (x) = c1 cos 2x + c2 sin 2x, so set y1 = cos 2x, y2 = sin 2x. Then

y1 y20 − y2 y10 = 2 cos2 2x + 2 sin2 2x = 2 so u01 = − 12 x sin 2x ⇒


U  
u1 (x) = − 12 x sin 2x dx = − 14 −x cos 2x + 12 sin 2x [by parts] and u02 = 12 x cos 2x
U  
⇒ u2 (x) = 12 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) = c1 cos 2x + c2 sin 2x + 14 x.

21. (a) r2 − r = r(r − 1) = 0 ⇒ r = 0, 1, so the complementary solution is yc (x) = c1 ex + c2 xex . A particular

solution is of the form yp (x) = Ae2x . Thus 4Ae2x − 4Ae2x + Ae2x = e2x ⇒ Ae2x = e2x ⇒ A=1

⇒ yp (x) = e2x . So a general solution is y(x) = yc (x) + yp (x) = c1 ex + c2 xex + e2x .

(b) From (a), yc (x) = c1 ex + c2 xex , so set y1 = ex , y2 = xex . Then, y1 y20 − y2 y10 = e2x (1 + x) − xe2x = e2x
U
and so u01 = −xex ⇒ u1 (x) = − xex dx = −(x − 1)ex [by parts] and u02 = ex ⇒
U
u2 (x) = ex dx = ex . Hence yp (x) = (1 − x)e2x + xe2x = e2x and the general solution is
Thomson Brooks-Cole copyright 2007

y(x) = yc (x) + yp (x) = c1 ex + c2 xex + e2x .


NONHOMOGENEOUS LINEAR EQUATIONS ■ 11

23. As in Example 6, yc (x) = c1 sin x + c2 cos x, so set y1 = sin x, y2 = cos x. Then


sec x cos x
y1 y20 − y2 y10 = − sin2 x − cos2 x = −1, so u01 = − = 1 ⇒ u1 (x) = x and
−1
sec x sin x U
u02 = = − tan x ⇒ u2 (x) = − tan xdx = ln |cos x| = ln(cos x) on 0 < x < π2 . Hence
−1
yp (x) = x sin x + cos x ln(cos x) and the general solution is y(x) = (c1 + x) sin x + [c2 + ln(cos x)] cos x.
−e2x e−x
25. y1 = ex , y2 = e2x and y1 y20 − y2 y10 = e3x . So u01 = −x
=− and
(1 + e )e 3x 1 + e−x
]
e−x −x 0 ex ex
u1 (x) = − dx = ln(1 + e ). u 2 = = so
1 + e−x (1 + e−x )e3x e3x + e2x
]  
ex ex + 1
u2 (x) = 3x 2x
dx = ln − e−x = ln(1 + e−x ) − e−x . Hence
e +e ex
yp (x) = ex ln(1 + e−x ) + e2x [ln(1 + e−x ) − e−x ] and the general solution is
y(x) = [c1 + ln(1 + e−x )]ex + [c2 − e−x + ln(1 + e−x )]e2x .
ex e−x
27. y1 = e−x , y2 = ex and y1 y20 − y2 y10 = 2. So u01 = − , u02 = and
2x 2x
] x ] −x
e e
yp (x) = −e−x dx + ex dx. Hence the general solution is
2x 2x
 ] x   ] −x 
e e
y(x) = c1 − dx e−x + c2 + dx ex .
2x 2x
Thomson Brooks-Cole copyright 2007

You might also like