3c3 NonhomgenLinEqns Stu
3c3 NonhomgenLinEqns Stu
3c3 NonhomgenLinEqns Stu
In this section we learn how to solve second-order nonhomogeneous linear differential equations with constant coefficients, that is, equations of the form
1
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
r 2 r 2 r 1r 2 0
1
2A 2B 0
2A B 2C 0
yp+2f+3g
yp+3g
2A 1
B 12
C 34
yp+2f
_3
ypx 12 x 2 12 x 34
yp
_5
y yc yp c1 e x c2 e2x 12 x 2 12 x 34
FIGURE 1
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
equation in Example 2 in terms of yp and the
functions f x cos 2x and tx sin 2x.
Notice that all solutions approach as x l
and all solutions resemble sine functions when
x is negative.
complementary equation is
ycx c1 cos 2x c2 sin 2x
For a particular solution we try ypx Ae 3x. Then yp 3Ae 3x and yp 9Ae 3x. Substituting into the differential equation, we have
9Ae 3x 4Ae 3x e 3x
yp+f+g
yp+g
yp
_4
yp+f
_2
FIGURE 2
ypx 131 e 3x
and the general solution is
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
ypx A cos kx B sin kx
Then
or
This is true if
3A B 0
and
A 3B 1
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 solution 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 superposition, which says that if yp1 and yp2 are solutions of
ay by cy G1x
3Ax 2A 3Be x xe x
Substitution gives
4C cos 2x 4D sin 2x 4C cos 2x D sin 2x cos 2x
8C cos 2x 8D sin 2x cos 2x
or
yp+2f+g
yp+g
yp+f
_4
yp2x 18 cos 2x
yp
FIGURE 3
Finally we note that the recommended trial solution yp sometimes turns out to be a solution of the complementary equation and therefore cant be a solution of the nonhomogeneous 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
The graphs of four solutions of the differential equation in Example 5 are shown in Figure 4.
_2
ypx 12 x cos x
yp
_4
FIGURE 4
Px 1. So, at first glance, the form of the trial solution would be
ypx e 2xA cos 3x B sin 3x
where y1 and y2 are linearly independent solutions. Lets replace the constants (or parameters) c1 and c2 in Equation 4 by arbitrary functions u1x and u2x. We look for a particular solution of the nonhomogeneous equation ay by cy Gx of the form
5
(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
Since u1 and u2 are arbitrary functions, we can impose two conditions on them. One condition 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, lets impose the
condition that
7
u1 y1 u2 y2 0
Then
u1ay1 by1 cy1 u2ay2 by2 cy2 au1 y1 u2 y2 G
and
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 particular 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
Set
u1 sin x u2 cos x 0
10
Then
11
u1 sin x
2.5
u1x cos x
(We seek a particular solution, so we dont need a constant of integration here.) Then,
from Equation 10, we obtain
0
yp
u2
sin x
sin 2x
cos 2x 1
u1
cos x sec x
cos x
cos x
cos x
_1
FIGURE 5
So
Exercises
A Click here for answers.
110
2. y 9y e
3. y 2y sin 4x
7. y y e x x 3,
y0 2,
8. y 4y e x cos x,
y0 2,
y0 0
; 1112
13 18
13. y 9 y e
x sin x
2
x
14. y 9 y xe
cos x
15. y 9 y 1 xe 9x
2328
Solve the differential equation using the method of variation of parameters.
1
1 ex
25. y 3y 2y
22. y y e x
y0 1,
21. y 2y y e 2x
y0 2
y0 1
19. y 4y x
y0 0
y0 1,
6. y 2y y xex
5. y 4y 5y e
1922
4. y 6y 9y 1 x
x
9. y y xe x,
3x
1
x
e2x
x3
28. y 4y 4y
Answers
S
1. y c1 e2x c2 ex 2 x 2 2 x
1
3. y c1 c2 e 2x
7
4
2x
_4
13.
15.
17.
19.
21.
23.
25.
27.
+ c2 e
1 2
x
2
7
.
4
3
x
2
3. The auxiliary equation is r 2 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
1
and B = 20
. Thus the general solution is y(x) = yc (x) + yp (x) = c1 + c2 e2x +
1
40
cos 4x
1
20
A=
1
40
sin 4x.
yc (x) = e2x (c1 cos x + c2 sin x). Try yp (x) = Aex , so yp0 = Aex and yp00 = Aex . Substitution gives
Aex 4(Aex ) + 5(Aex ) = ex
2x
10Aex = ex
A=
1
.
10
1 x
e .
10
yc (x) = c1 cos x + c2 sin x. For y00 + y = ex try yp1 (x) = Aex . Then yp0 1 = yp001 = Aex and substitution gives
Aex + Aex = ex
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
y(x) = yc (x) + yp1 (x) + yp2 (x) = c1 cos x + c2 sin x + 12 ex + x3 6x. But 2 = y(0) = c1 +
and 0 = y0 (0) = c2 +
y(x) =
3
2
cos x +
11
2
1
2
c2 =
11
.
2
1
2
c1 =
3
2
sin x + 12 ex + x3 6x.
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
1
10
y(x) = c1 ex/4 + c2 ex +
1 x
e .
10
1 x
e .
10
13. Here yc (x) = c1 cos 3x + c2 sin 3x. For y00 + 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 e9x . For y 00 + 9y0 = 1 try yp1 (x) = Ax (since y = A is a solution to the complementary
equation) and for y 00 + 9y0 = xe9x try yp2 (x) = (Bx + C)e9x .
17. Since yc (x) = ex (c1 cos 3x + c2 sin 3x) we try
yp (x) = x(Ax2 + Bx + C)ex cos 3x + x(Dx2 + Ex + F )ex 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
u01 =
Gy2
a (y1 y20 y2 y10 )
u02 =
and
Gy1
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
(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
R
solution is of the form yp (x) = Ae2x . Thus 4Ae2x 4Ae2x + Ae2x = e2x
2x
Ae2x = e2x
x
A=1
(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
R
and so u01 = xex u1 (x) = xex dx = (x 1)ex [by parts] and u02 = ex
R
u2 (x) = ex dx = ex . Hence yp (x) = (1 x)e2x + xe2x = e2x and the general solution is
y(x) = yc (x) + yp (x) = c1 ex + c2 xex + e2x .
e2x
ex
=
and
x
3x
(1 + e )e
1 + ex
ex
ex
ex
dx = ln(1 + ex ). u02 =
= 3x
so
1 + ex
(1 + ex )e3x
e + e2x
Z
ex
ex + 1
u2 (x) =
ex = ln(1 + ex ) ex . Hence
dx = ln
3x
2x
e +e
ex
u1 (x) =
ex
ex
and
27. y1 = ex , y2 = ex and y1 y20 y2 y10 = 2. So u01 = , u02 =
2x
2x
Z x
Z x
e
e
dx + ex
dx. Hence the general solution is
yp (x) = ex
2x
2x
Z x
Z x
e
e
y(x) = c1
dx ex + c2 +
dx ex .
2x
2x