5.5: The Method of Undetermined Coefficients II
- Page ID
- 30730
( \newcommand{\kernel}{\mathrm{null}\,}\)
In this section we consider the constant coefficient equation
ay″+by′+cy=eλx(P(x)cosωx+Q(x)sinωx)
where λ and ω are real numbers, ω≠0, and P and Q are polynomials. We want to find a particular solution of Equation ???. As in Section 5.4, the procedure that we will use is called the method of undetermined coefficients.
Forcing Functions Without Exponential Factors
We begin with the case where λ=0 in Equation ??? ; thus, we we want to find a particular solution of
ay″+by′+cy=P(x)cosωx+Q(x)sinωx,
where P and Q are polynomials.
Differentiating xrcosωx and xrsinωx yields
ddxxrcosωx=−ωxrsinωx+rxr−1cosωx
and
ddxxrsinωx=−ωxrcosωx+rxr−1sinωx.
This implies that if
yp=A(x)cosωx+B(x)sinωx
where A and B are polynomials, then
ay″p+by′p+cyp=F(x)cosωx+G(x)sinωx,
where F and G are polynomials with coefficients that can be expressed in terms of the coefficients of A and B. This suggests that we try to choose A and B so that F=P and G=Q, respectively. Then yp will be a particular solution of Equation ???. The next theorem tells us how to choose the proper form for yp. For the proof see Exercise 5.5.37.
Theorem 5.5.1
Suppose ω is a positive number and P and Q are polynomials. Let k be the larger of the degrees of P and Q. Then the equation
ay″+by′+cy=P(x)cosωx+Q(x)sinωx
has a particular solution
yp=A(x)cosωx+B(x)sinωx,
where
A(x)=A0+A1x+⋯+AkxkandB(x)=B0+B1x+⋯+Bkxk,
provided that cosωx and sinωx are not solutions of the complementary equation. The solutions of
a(y″+ω2y)=P(x)cosωx+Q(x)sinωx
for which cosωx and sinωx are solutions of the complementary equation are of the form of Equation ???, where
A(x)=A0x+A1x2+⋯+Akxk+1andB(x)=B0x+B1x2+⋯+Bkxk+1.
For an analog of this theorem that’s applicable to Equation ???, see Exercise 5.5.38.
Example 5.5.1
Find a particular solution of
y″−2y′+y=5cos2x+10sin2x.
Solution
In Equation ??? the coefficients of cos2x and sin2x are both zero degree polynomials (constants). Therefore Theorem 5.5.1 implies that Equation ??? has a particular solution
yp=Acos2x+Bsin2x.
Since
y′p=−2Asin2x+2Bcos2xandy″p=−4(Acos2x+Bsin2x),
replacing y by yp in Equation ??? yields
y″p−2y′p+yp=−4(Acos2x+Bsin2x)−4(−Asin2x+Bcos2x)+(Acos2x+Bsin2x)=(−3A−4B)cos2x+(4A−3B)sin2x.
Equating the coefficients of cos2x and sin2x here with the corresponding coefficients on the right side of Equation ??? shows that yp is a solution of Equation ??? if
−3A−4B=15.−4A−3B=10.
Solving these equations yields A=1, B=−2. Therefore
yp=cos2x−2sin2x
is a particular solution of Equation ???.
Example 5.5.2
Find a particular solution of
y″+4y=8cos2x+12sin2x.
Solution
The procedure used in Example 5.5.1 doesn’t work here; substituting yp=Acos2x+Bsin2x for y in Equation ??? yields
y″p+4yp=−4(Acos2x+Bsin2x)+4(Acos2x+Bsin2x)=0
for any choice of A and B, since cos2x and sin2x are both solutions of the complementary equation for Equation ???. We’re dealing with the second case mentioned in Theorem 5.5.1 , and should therefore try a particular solution of the form
yp=x(Acos2x+Bsin2x).
Then
y′p=Acos2x+Bsin2x+2x(−Asin2x+Bcos2x)andy″p=−4Asin2x+4Bcos2x−4x(Acos2x+Bsin2x)=−4Asin2x+4Bcos2x−4yp (see (???)),
so
y″p+4yp=−4Asin2x+4Bcos2x.
Therefore yp is a solution of Equation ??? if
−4Asin2x+4Bcos2x=8cos2x+12sin2x,
which holds if A=−3 and B=2. Therefore
yp=−x(3cos2x−2sin2x)
is a particular solution of Equation ???.
Example 5.5.3
Find a particular solution of
y″+3y′+2y=(16+20x)cosx+10sinx.
Solution
The coefficients of cosx and sinx in Equation ??? are polynomials of degree one and zero, respectively. Therefore Theorem 5.5.1 tells us to look for a particular solution of Equation ??? of the form
yp=(A0+A1x)cosx+(B0+B1x)sinx.
Then
y′p=(A1+B0+B1x)cosx+(B1−A0−A1x)sinx
and
y″p=(2B1−A0−A1x)cosx−(2A1+B0+B1x)sinx,
so
y″p+3y′p+2yp=[A0+3A1+3B0+2B1+(A1+3B1)x]cosx+[B0+3B1−3A0−2A1+(B1−3A1)x]sinx.
Comparing the coefficients of xcosx, xsinx, cosx, and sinx here with the corresponding coefficients in Equation ??? shows that yp is a solution of Equation ??? if
−3A1+3B1=20.−3A1+3B1=0.−3A0+3B0+3A1+2B1=16.−3A0+3B0−2A1+3B1=10.
Solving the first two equations yields A1=2, B1=6. Substituting these into the last two equations yields
−3A0+3B0=16−3A1−2B1=−2.−3A0+3B0=10+2A1−3B1=−4.
Solving these equations yields A0=1, B0=−1. Substituting A0=1, A1=2, B0=−1, B1=6 into Equation ??? shows that
yp=(1+2x)cosx−(1−6x)sinx
is a particular solution of Equation ???.
A Useful Observation
In Equations ???, ???, and ??? the polynomials multiplying sinx can be obtained by replacing A0,A1,B0, and B1 by B0, B1, −A0, and −A1, respectively, in the polynomials multiplying cosx. An analogous result applies in general, as follows (Exercise 5.5.36).
Theorem 5.5.2
If
yp=A(x)cosωx+B(x)sinωx,
where A(x) and B(x) are polynomials with coefficients A0 …, Ak and B0, …, Bk, then the polynomials multiplying sinωx in
y′p,y″p,ay″p+by′p+cypandy″p+ω2yp
can be obtained by replacing A0, …, Ak by B0, …, Bk and B0, …, Bk by −A0, …, −Ak in the corresponding polynomials multiplying cosωx.
We will not use this theorem in our examples, but we recommend that you use it to check your manipulations when you work the exercises.
Example 5.5.4
Find a particular solution of
y″+y=(8−4x)cosx−(8+8x)sinx.
Solution
According to Theorem 5.5.1 , we should look for a particular solution of the form
yp=(A0x+A1x2)cosx+(B0x+B1x2)sinx,
since cosx and sinx are solutions of the complementary equation. However, let’s try
yp=(A0+A1x)cosx+(B0+B1x)sinx
first, so you can see why it doesn’t work. From Equation ???,
y″p=(2B1−A0−A1x)cosx−(2A1+B0+B1x)sinx,
which together with Equation ??? implies that
y″p+yp=2B1cosx−2A1sinx.
Since the right side of this equation does not contain xcosx or xsinx, Equation ??? can’t satisfy Equation ??? no matter how we choose A0, A1, B0, and B1.
Now let yp be as in Equation ???. Then
y′p=[A0+(2A1+B0)x+B1x2]cosx+[B0+(2B1−A0)x−A1x2]sinx
and
y″p=[2A1+2B0−(A0−4B1)x−A1x2]cosx+[2B1−2A0−(B0+4A1)x−B1x2]sinx,
so
y″p+yp=(2A1+2B0+4B1x)cosx+(2B1−2A0−4A1x)sinx.
Comparing the coefficients of cosx and sinx here with the corresponding coefficients in Equation ??? shows that yp is a solution of Equation ??? if
−4B1=−4.−4A1=−8.−2B0+2A1=8.−2A0+2B1=−8.
The solution of this system is A1=2, B1=−1, A0=3, B0=2. Therefore
yp=x[(3+2x)cosx+(2−x)sinx]
is a particular solution of Equation ???.
Forcing Functions with Exponential Factors
To find a particular solution of
ay″+by′+cy=eλx(P(x)cosωx+Q(x)sinωx)
when λ≠0, we recall from Section 5.4 that substituting y=ueλx into Equation ??? will produce a constant coefficient equation for u with the forcing function P(x)cosωx+Q(x)sinωx. We can find a particular solution up of this equation by the procedure that we used in Examples 5.5.1 -5.5.4 . Then yp=upeλx is a particular solution of Equation ???.
Example 5.5.5
Find a particular solution of
y″−3y′+2y=e−2x[2cos3x−(34−150x)sin3x].
Let y=ue−2x. Then
y″−3y′+2y=e−2x[(u″−4u′+4u)−3(u′−2u)+2u]=e−2x(u″−7u′+12u)=e−2x[2cos3x−(34−150x)sin3x]
ifu″−7u′+12u=2cos3x−(34−150x)sin3x.
Since cos3x and sin3x aren’t solutions of the complementary equation
u″−7u′+12u=0,
Theorem 5.5.1 tells us to look for a particular solution of Equation ??? of the form
up=(A0+A1x)cos3x+(B0+B1x)sin3x.
Then
u′p=(A1+3B0+3B1x)cos3x+(B1−3A0−3A1x)sin3xandu″p=(−9A0+6B1−9A1x)cos3x−(9B0+6A1+9B1x)sin3x,
so
u″p−7u′p+12up=[3A0−21B0−7A1+6B1+(3A1−21B1)x]cos3x+[21A0+3B0−6A1−7B1+(21A1+3B1)x]sin3x.
Comparing the coefficients of x\cos 3x, x\sin 3x, \cos 3x, and \sin 3x here with the corresponding coefficients on the right side of Equation \ref{eq:5.5.17} shows that u_p is a solution of Equation \ref{eq:5.5.17} if
\label{eq:5.5.19} \begin{array}{rcr} 3A_1-21B_1&=0\phantom{.}\\[4pt] 21A_1+\phantom{2}3B_1&=150\phantom{.}\\[4pt] 3A_0-21B_0-7A_1+\phantom{2}6B_1&=\phantom{-3}2\phantom{.}\\[4pt] 21A_0+\phantom{2}3B_0-6A_1-\phantom{5}7B_1&=-34. \end{array}
Solving the first two equations yields A_1=7, B_1=1. Substituting these values into the last two equations of Equation \ref{eq:5.5.19} yields
\begin{aligned} \phantom{2}3A_0-21B_0&=\phantom{-3}2+7A_1-6B_1=45\phantom{.}\\[4pt] 21A_0+\phantom{2}3B_0&=-34+6A_1+7B_1=15.\end{aligned}\nonumber
Solving this system yields A_0=1, B_0=-2. Substituting A_0=1, A_1=7, B_0=-2, and B_1=1 into Equation \ref{eq:5.5.18} shows that
u_p=(1+7x)\cos 3x-(2-x)\sin 3x\nonumber
is a particular solution of Equation \ref{eq:5.5.17}. Therefore
y_p=e^{-2x}\left[(1+7x)\cos 3x-(2-x)\sin 3x\right]\nonumber
is a particular solution of Equation \ref{eq:5.5.16}.
Example 5.5.6
Find a particular solution of
\label{eq:5.5.20} y''+2y'+5y=e^{-x}\left[(6-16x)\cos2x-(8+8x)\sin2x\right].
Solution
Let y=ue^{-x}. Then
\begin{aligned} y''+2y'+5y&=e^{-x}\left[(u''-2u'+u)+2(u'-u)+5u\right]\\[4pt] &=e^{-x}(u''+4u)\\[4pt] &= e^{-x}\left[(6-16x)\cos2x-(8+8x)\sin2x\right]\end{aligned}\nonumber
if
\label{eq:5.5.21} u''+4u=(6-16x)\cos2x-(8+8x)\sin2x.
Since \cos2x and \sin2x are solutions of the complementary equation
u''+4u=0,\nonumber
Theorem 5.5.1 tells us to look for a particular solution of Equation \ref{eq:5.5.21} of the form
u_p=(A_0x+A_1x^2)\cos2x+(B_0x+B_1x^2)\sin2x.\nonumber
Then
\begin{aligned} u_p'&=\left[A_0+(2A_1+2B_0)x+2B_1x^2\right]\cos2x \\[4pt] & +\left[B_0+(2B_1-2A_0)x-2A_1x^2\right]\sin2x\end{aligned}\nonumber
and
\begin{aligned} u_p''&=\left[2A_1+4B_0-(4A_0-8B_1)x-4A_1x^2\right]\cos2x\\[4pt] & +\left[2B_1-4A_0-(4B_0+8A_1)x-4B_1x^2\right]\sin2x,\end{aligned}\nonumber
so
u_p''+4u_p=(2A_1+4B_0+8B_1x)\cos2x+(2B_1-4A_0-8A_1x)\sin2x.\nonumber
Equating the coefficients of x\cos2x, x\sin2x, \cos2x, and \sin2x here with the corresponding coefficients on the right side of Equation \ref{eq:5.5.21} shows that u_p is a solution of Equation \ref{eq:5.5.21} if
\label{eq:5.5.22} \begin{array}{rcr} 8B_1&=-16\phantom{.}\\[4pt] -8A_1&=-\phantom{1}8\phantom{.}\\[4pt] \phantom{-}4B_0+2A_1&=6\phantom{.}\\[4pt] -4A_0+2B_1&=-8. \end{array}
The solution of this system is A_1=1, B_1=-2, B_0=1, A_0=1. Therefore
u_p=x[(1+x)\cos2x+(1-2x)\sin2x]\nonumber
is a particular solution of Equation \ref{eq:5.5.21}, and
y_p=xe^{-x}\left[(1+x)\cos2x+(1-2x)\sin2x\right]\nonumber
is a particular solution of Equation \ref{eq:5.5.20}.
You can also find a particular solution of Equation \ref{eq:5.5.20} by substituting
y_p=xe^{-x}\left[(A_0+A_1x)\cos 2x +(B_0+B_1x)\sin 2x\right]\nonumber
for y in Equation \ref{eq:5.5.20} and equating the coefficients of xe^{-x}\cos2x, xe^{-x}\sin2x, e^{-x}\cos2x, and e^{-x}\sin2x in the resulting expression for
y_p''+2y_p'+5y_p\nonumber
with the corresponding coefficients on the right side of Equation \ref{eq:5.5.20}. (See Exercise 5.5.38). This leads to the same system Equation \ref{eq:5.5.22} of equations for A_0, A_1, B_0, and B_1 that we obtained in Example 5.5.6 . However, if you try this approach you’ll see that deriving Equation \ref{eq:5.5.22} this way is much more tedious than the way we did it in Example 5.5.6 .