Вы находитесь на странице: 1из 9

Finding yp in Constant-Coefficient Nonhomogenous Linear DEs

Introduction and procedure

When solving DEs of the form


ay 00 + by 0 + cy = g(x),
the solution looks like
y = yc + yp
where yc is the complementary solution to the homogeneous DE

ay 00 + by 0 + cy = 0

and yp is the particular solution.

To find the particular solution using the Method of Undetermined Coefficients, we first make a “guess” as to the form of
yp , adjust it to eliminate any overlap with yc , plug our guess back into the originial DE, and then solve for the unknown
coefficients. This handout deals with coming up with that final, adjusted “guess” for yp .

In general, we make the following choices for yp :

If g(x) contains: ...then our “guess” for yp contains:

A0 + A1 x + A2 x 2 + . . . + An x n
C0 + C1 x + C2 x2 + . . . + Cn xn
(typically we’ll just go through the alphabet rather than use
indices on the same letter)

Cekx Aekx

C cos(βx) + D sin(βx) (either C or D may be 0) A cos(βx) + B sin(βx) (even if C or D equals 0)

If g(x) has two different types of functions added/subtracted or multiplied together, then we add or multiply the different
guesses together to form yp . If we are multiplying the two, then we combine any coefficients that would have been
multiplied together if we had expanded our guess for yp . You should never have the possibility of two unknown
coefficients being multiplied together in yp . For example, if we have g(x) = 5e2x cos(3x), then our guess for yp
might initially look like
yp = Ae2x (B cos(3x) + C sin(3x))
But expanding this gives us
yp = ABe2x cos(3x) + ACe2x sin(3x).
Since we don’t want unknown coefficients multiplied together, we rewrite AB and BC each as a single coefficient and use

yp = Ae2x cos(3x) + Be2x sin(3x)


= e2x (A cos(3x) + B sin(3x))

1
Overlap with yc

If part (or all) of our initial guess for yp overlaps with yc , then we multiply the functions in yp that cause the overlap by
x until we have eliminated the overlap (see the examples for details on exactly how this works out). For an nth order DE,
n is the maximum number of times you would need to multiply by x to eliminate overlap.

IVPs and BVPs

If you’re given initial or boundary conditions, you need to plug those into the general solution (not just the complementary)
and solve for the parameters after you’ve found yp .

Examples

Given the DEs below, determine the appropriate final “guess” for the form of yp in terms of the undetermined coefficients
A, B, C, etc.

Example 1

DE: y 00 − y 0 − 12y = g(x). Here yc = c1 e4x + c2 e−3x .

g(x) “Guess” for yp

2e−4x − 7e3x

6xe−3x

4 sin(x) + e4x

Example 2

DE: y 00 + 4y = g(x). Here yc = c1 cos(2x) + c2 sin(2x).

g(x) “Guess” for yp

3e5x + 9 sin(2x)

ex cos(2x)

x sin(x)

2
Example 3

DE: y 00 + 4y 0 + 4y = g(x). Here yc = c1 e−2x + c2 xe−2x .

g(x) “Guess” for yp

3e−2x

2xe−2x

7e−x

3e−2x + sin(x)

Example 4

DE: y 00 − 10y 0 + 25y = g(x). Here yc = c1 e5x + c2 xe5x .

g(x) “Guess” for yp

5x4 + e2x

14e5x

x3 e5x

Example 5

DE: 4y 00 + 4y 0 + 17y = g(x). Here yc = e−x/2 (c1 cos(2x) + c2 sin(2x)).

g(x) “Guess” for yp

5e−x/2 cos(2x)

e−x/2

10 sin(2x)

3
Example 6
√ √
DE: y 00 + 4y 0 − 2y = g(x). Here yc = c1 e(−2+ 6)x
+ c2 e(−2− 6)x
.

g(x) “Guess” for yp

5e3x

5xe3x

5x + e3x

e2x (2 cos(5x) + sin(5x))

3 + cos(2x)

x3 e−x + x2

4
Additional Examples

“For each of the following DEs, find the correct final “guess” for the form of the particular solution yp in terms of
undetermined coefficients A, B, C, . . . . You do not have to solve for the coefficients.”

[Note: In many of these examples, the auxiliary polynomial is easily factored without use of the quadratic formula. On
a test, you don’t have to use the quadratic formula every time, but double check your work to be sure you’ve factored
correctly.]

Example 1

“Solve
y 00 − y 0 − 12y = g(x),
where g(x) is given below.”

To find yc , we solve y 00 − y 0 − 12y = 0: The auxiliary equation is r2 − r − 12 = 0, so


p
−(−1) ± (−1)2 − 4(1)(−12)
r= = . . . = 4, −3
2(1)
and thus
yc = c1 e4x + c2 e−3x

1. g(x) = 2x3 + 7x + 1. This is a polynomial of degree 3, so our initial guess is


yp = Ax3 + Bx2 + Cx + D
There is no overlap with yc , so this is our final guess for yp .
2. g(x) = 3e3x . Our initial guess for yp is a general exponential function with the same exponent, i.e.,
yp = Ae3x
There is no overlap with yc since neither of the exponents in yc are 3x, so this is our final guess for yp .
3. g(x) = 3e4x . Again, we start with a general exponential function with the same exponent:
yp = Ae4x
However, in this case we do have overlap since this is exactly like one of the terms in yc (just with a different name
for the unknown coefficient). So, we have to multiply our guess by x:
yp = Axe4x
This eliminates the overlap since the e4x term in yp is not multiplied by x; so, this is our final guess for yp .
4. g(x) = sin(5x) + 3xe4x . Here we have (trig function) + (poly of degree 1)(exponential), so our initial guess is
yp = A cos(5x) + B sin(5x) + (Cx + D)e4x
(the coefficient on e4x gets multiplied through and absorbed into C and D). If we multiplied out the (Cx + D)e4x
part, we would have overlap. So to eliminate it, we multiply the entire (poly)(exp) part by x and get
yp = A cos(5x) + B sin(5x) + (Cx + D)xe4x
= A cos(5x) + B sin(5x) + (Cx2 + Dx)e4x

(the trig functions don’t cause overlap, so they don’t need to be multiplied by x). There is no longer any overlap,
so this is our final guess for yp .

5
Example 2

“Solve
y 00 + 6y 0 + 9y = g(x),
where g(x) is given below.”

To find yc , we solve y 00 + 6y 0 + 9y = 0: The auxiliary equation is r2 + 6r + 9 = 0, so


p
−6 ± 62 − 4(1)(9)
r= = . . . = −3
2(1)

and thus
yc = c1 e−3x + c2 xe−3x

1. g(x) = 8e−3x . Our initial guess for yp is a general exponential function with the same exponent, i.e.,

yp = Ae−3x

This overlaps with the first term of yc , so we multiply by x and get

yp = Axe−3x

This now overlaps with the second term of yc , so we multiply by x again and get

yp = Ax2 e−3x

There is now no longer any overlap with any terms of yc , so this is our final guess for yp .
2. g(x) = 2x2 e−3x . Here we have (poly of degree 2)(exponential), so our initial guess is

yp = (Ax2 + Bx + C)e−3x

If we were to expand this, then we would have overlap with both terms of yc . So we multiply everything by x and
get

yp = (Ax2 + Bx + C)xe−3x
= (Ax3 + Bx2 + Cx)e−3x

The Cxe−3x term still causes overlap with part of yc , so we multiply by x again:

yp = (Ax3 + Bx2 + Cx)xe−3x


= (Ax4 + Bx3 + Cx2 )e−3x

There is now no longer any overlap, so this is our final guess for yp .
3. g(x) = 2x2 e−3x − sin(5x). Here we have (poly of degree 2)(exponential)+(trig function), so our initial guess is

yp = (Ax2 + Bx + C)e−3x + D cos(5x) + E sin(5x)

If we were to expand this, then we would have overlap with both terms of yc . Since only the (poly of degree
2)(exponential) part of yp causes overlap, we multiply only that part of yp by x:

yp = (Ax2 + Bx + C)xe−3x + D cos(5x) + E sin(5x)


= (Ax3 + Bx2 + Cx)e−3x + D cos(5x) + E sin(5x)

6
The Cxe−3x term still overlaps with part of yc , so we multiply the terms that came from (poly of degree 2)(expo-
nential) by x again:
yp = (Ax3 + Bx2 + Cx)xe−3x + D cos(5x) + E sin(5x)
= (Ax4 + Bx3 + Cx2 )e−3x + D cos(5x) + E sin(5x)

There is now no longer any overlap, so this is our final guess for yp .

Example 3

“Solve
y 00 + 16y = g(x),
where g(x) is given below.”

To find yc , we solve y 00 + 16y = 0: The auxiliary equation is r2 + 16 = 0, so


p
−0 ± 02 − 4(1)(16)
r= = . . . = 0 ± 4i
2(1)
and thus
yc = c1 cos(4x) + c2 sin(4x)

1. g(x) = 7 cos(2x) + 9 sin(2x). Both of these trig functions have the same argument, so we only need one pair of trig
functions in our initial guess:
yp = A cos(2x) + B sin(2x)
Since these trig functions have a different argument than the trig functions in yc , we don’t have any overlap. So,
this is our final guess for yp .
2. g(x) = 7 cos(4x) + 9 sin(4x). Again, we only need one pair of trig functions in our initial guess:
yp = A cos(4x) + B sin(4x)
However, this time they have the same argument as those in yc , causing overlap. So, we multiply by x:
yp = (A cos(4x) + B sin(4x)) x
= Ax cos(4x) + Bx sin(4x)

which eliminates the overlap. So, this is our final guess for yp .
3. g(x) = 7 cos(2x) + 9 sin(4x). In this case, we have trig functions with different arguments, so we need two pairs of
trig functions in yp :
yp = (A cos(2x) + B sin(2x)) + (C cos(4x) + D sin(4x))
The second pair causes overlap with yc , so we multiply only that pair by x:
yp = (A cos(2x) + B sin(2x)) + (C cos(4x) + D sin(4x)) x
= A cos(2x) + B sin(2x) + Cx cos(4x) + Dx sin(4x)

There is no longer any overlap with yc , so this is our final guess for yp .
4. g(x) = 9ex sin(4x). Here we have (exponential)(trig), so our initial guess for yp looks like
yp = ex (A cos(4x) + B sin(4x))
Even though the trig functions have the same argument as those in yc , the trig functions in yc are not multiplied
by ex , so there is no overlap and this is our final guess for yp .

7
Example 4

“Solve
y 00 − 4y 0 = g(x),
where g(x) is given below.”

To find yc , we solve y 00 − 4y 0 = 0: The auxiliary equation is r2 − 4r = 0, so


p
−(−4) ± (−4)2 − 4(1)(−0)
r= = . . . = 0, 4
2(1)
and thus

yc = c1 e0x + c2 e4x
= c1 + c2 e4x

1. g(x) = 6x2 + 3x. This is a polynomial of degree 2, so we start with

yp = Ax2 + Bx + C

However, we have overlap with the first term of yc . Multiplying by x give us

yp = (Ax2 + Bx + C)x
= Ax3 + Bx2 + Cx

and eliminates the overlap, so this is our final guess for yp .


2. g(x) = 6x2 + e4x We have (poly of degree 2) + (exp), so we start with

yp = (Ax2 + Bx + C) + De4x

Since the polynomial part overlaps with the first term of yc and the exponential function overlaps with the second
term of yc , we need to multiply the entire thing by x:

yp = (Ax2 + Bx + C + De4x )x
= Ax3 + Bx2 + Cx + Dxe4x

This eliminates the overlap and give us the final form for yp .

Example 5

“Solve
9y 00 − 6y 0 + 37y = g(x),
where g(x) is given below.”

To find yc , we solve 9y 00 − 6y 0 + 37y = 0: The auxiliary equation is 9r2 − 6r + 37 = 0, so


p
−(−6) ± (−6)2 − 4(9)(37) 1
r= = . . . = ± 2i
2(9) 3
and thus
yc = ex/3 (c1 cos(2x) + c2 sin(2x))

8
1. g(x) = 2ex/3 cos(5x). We start with
yp = ex/3 (A cos(5x) + B sin(5x))
Since the trig functions in yc have a different argument, there is no overlap here, so this is our final guess for yp .
2. g(x) = 2ex/4 cos(2x). We start with
yp = ex/4 (A cos(2x) + B sin(2x))
Since the exponential function in yc has a different argument, there is no overlap here, so this is our final guess for
yp .

3. g(x) = 2ex/3 + 3 cos(2x). We start with

yp = Aex/3 + B cos(2x) + C sin(2x)

Even though the trig and exponential functions in yc have the same argument, they’re being multiplied together in
yc but added in yp , so there is not overlap, and thus this is our final guess for yp .

Вам также может понравиться