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 A_0 …, A_k and B_0, …, B_k, then the polynomials multiplying \sin\omega x in
y_p',\quad y_p'',\quad ay_p''+by_p'+cy_p \quad \text{and} \quad y_p''+\omega^2 y_p \nonumber
can be obtained by replacing A_0, …, A_k by B_0, …, B_k and B_0, …, B_k by -A_0, …, -A_k in the corresponding polynomials multiplying \cos\omega 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
\label{eq:5.5.12} y''+y=(8-4x)\cos x-(8+8x)\sin x.
Solution
According to Theorem 5.5.1 , we should look for a particular solution of the form
\label{eq:5.5.13} y_p=(A_0x+A_1x^2)\cos x+(B_0x+B_1x^2)\sin x,
since \cos x and \sin x are solutions of the complementary equation. However, let’s try
\label{eq:5.5.14} y_p=(A_0+A_1x)\cos x+(B_0+B_1x)\sin x
first, so you can see why it doesn’t work. From Equation \ref{eq:5.5.10},
y_p''=(2B_1-A_0-A_1x)\cos x-(2A_1+B_0+B_1x)\sin x, \nonumber
which together with Equation \ref{eq:5.5.14} implies that
y_p''+y_p=2B_1\cos x-2A_1\sin x. \nonumber
Since the right side of this equation does not contain x\cos x or x\sin x, Equation \ref{eq:5.5.14} can’t satisfy Equation \ref{eq:5.5.12} no matter how we choose A_0, A_1, B_0, and B_1.
Now let y_p be as in Equation \ref{eq:5.5.13}. Then
\begin{aligned} y_p'&=\left[A_0+(2A_1+B_0)x+B_1x^2\right]\cos x\\[4pt] & +\left[B_0+(2B_1-A_0)x-A_1x^2\right]\sin x \end{aligned}\nonumber
and
\begin{aligned} y_p''&= \left[2A_1+2B_0-(A_0-4B_1)x-A_1x^2\right]\cos x\\[4pt] &+ \left[2B_1-2A_0-(B_0+4A_1)x-B_1x^2\right]\sin x,\end{aligned}\nonumber
so
y_p''+y_p=(2A_1+2B_0+4B_1x)\cos x+(2B_1-2A_0-4A_1x)\sin x. \nonumber
Comparing the coefficients of \cos x and \sin x here with the corresponding coefficients in Equation \ref{eq:5.5.12} shows that y_p is a solution of Equation \ref{eq:5.5.12} if
\begin{array}{rcr} \phantom{-}4B_1&=-4\phantom{.}\\[4pt] -4A_1&=-8\phantom{.}\\[4pt] \phantom{-}2B_0+2A_1&=8\phantom{.}\\[4pt] -2A_0+2B_1&=-8. \end{array}\nonumber
The solution of this system is A_1=2, B_1=-1, A_0=3, B_0=2. Therefore
y_p=x\left[(3+2x)\cos x+(2-x)\sin x\right] \nonumber
is a particular solution of Equation \ref{eq:5.5.12}.
Forcing Functions with Exponential Factors
To find a particular solution of
\label{eq:5.5.15} ay''+by'+cy=e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)
when \lambda\ne0, we recall from Section 5.4 that substituting y=ue^{\lambda x} into Equation \ref{eq:5.5.15} will produce a constant coefficient equation for u with the forcing function P(x)\cos \omega x+Q(x)\sin \omega x. We can find a particular solution u_p of this equation by the procedure that we used in Examples 5.5.1 -5.5.4 . Then y_p=u_pe^{\lambda x} is a particular solution of Equation \ref{eq:5.5.15}.
Example 5.5.5
Find a particular solution of
\label{eq:5.5.16} y''-3y'+2y=e^{-2x}\left[2\cos 3x-(34-150x)\sin 3x\right].
Let y=ue^{-2x}. Then
\begin{aligned} y''-3y'+2y&=e^{-2x}\left[(u''-4u'+4u)-3(u'-2u)+2u\right]\\[4pt] &=e^{-2x}(u''-7u'+12u)\\[4pt] &= e^{-2x}\left[2\cos 3x-(34-150x)\sin 3x\right]\end{aligned}\nonumber
if\label{eq:5.5.17} u''-7u'+12u=2\cos 3x-(34-150x)\sin 3x.
Since \cos3x and \sin3x aren’t solutions of the complementary equation
u''-7u'+12u=0,\nonumber
Theorem 5.5.1 tells us to look for a particular solution of Equation \ref{eq:5.5.17} of the form
\label{eq:5.5.18} u_p=(A_0+A_1x)\cos 3x +(B_0+B_1x)\sin 3x.
Then
\begin{aligned} u_p'&=(A_1+3B_0+3B_1x)\cos 3x+(B_1-3A_0-3A_1x)\sin 3x\\[4pt] \text{and} \qquad u_p''&=(-9A_0+6B_1-9A_1x)\cos 3x-(9B_0+6A_1+9B_1x)\sin 3x,\end{aligned}\nonumber
so
\begin{aligned} u_p''-7u_p'+12u_p&=\left[3A_0-21B_0-7A_1+6B_1+(3A_1-21B_1)x\right]\cos 3x\\[4pt] &+\left[21A_0+3B_0-6A_1-7B_1+(21A_1+3B_1)x\right]\sin 3x.\end{aligned}\nonumber
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 .