
# 9.3: Undetermined Coefficients for Higher Order Equations


In this section we consider the constant coefficient equation

$\label{eq:9.3.1} a_0y^{(n)}+a_1y^{(n-1)}+\cdots+a_ny=F(x),$

where $$n\ge3$$ and $$F$$ is a linear combination of functions of the form

$e^{\alpha x}\left(p_0+p_1x+\cdots+p_kx^k\right) \nonumber$

or

$e^{\lambda x}\left[\left(p_0+p_1x+\cdots+p_kx^k\right) \cos\omega x+ \left(q_0+q_1x+\cdots+q_kx^k\right) \sin\omega x\right].\nonumber$

From Theorem 9.1.5, the general solution of Equation \ref{eq:9.3.1} is $$y=y_p+y_c$$, where $$y_p$$ is a particular solution of Equation \ref{eq:9.3.1} and $$y_c$$ is the general solution of the complementary equation

$a_0y^{(n)}+a_1y^{(n-1)}+\cdots+a_ny=0.\nonumber$

In Section 9.2 we learned how to find $$y_c$$. Here we will learn how to find $$y_p$$ when the forcing function has the form stated above. The procedure that we use is a generalization of the method that we used in Sections 5.4 and 5.5, and is again called method of undetermined coefficients. Since the underlying ideas are the same as those in these section, we’ll give an informal presentation based on examples.

## Forcing Functions of the Form $$e^{αx}(p_0 + p_1x + ... + p_kx^k)$$

We first consider equations of the form

$a_0y^{(n)}+a_1y^{(n-1)}+\cdots+a_ny=e^{\alpha x}\left(p_0+p_1x+\cdots+p_kx^k\right).\nonumber$

Example $$\PageIndex{1}$$

Find a particular solution of

$\label{eq:9.3.2} y'''+3y''+2y'-y=e^x(21+24x+28x^2+5x^3).$

Solution

Substituting

\begin{align*} y&=ue^x,\\ y'&=e^x(u'+u),\\ y''&=e^x(u''+2u'+u),\\ y'''&=e^x(u'''+3u''+3u'+u)\end{align*}

into Equation \ref{eq:9.3.2} and canceling $$e^x$$ yields

$(u'''+3u''+3u'+u)+3(u''+2u'+u)+2(u'+u)-u =21+24x+28x^2+5x^3, \nonumber$

or

$\label{eq:9.3.3} u'''+6u''+11u'+5u=21+24x+28x^2+5x^3.$

Since the unknown $$u$$ appears on the left, we can see that Equation \ref{eq:9.3.3} has a particular solution of the form

$u_p=A+Bx+Cx^2+Dx^3. \nonumber$

Then

\begin{aligned} u_p'&=B+2Cx+3Dx^2\\ u_p''&=2C+6Dx\\ u_p'''&=6D.\end{aligned}

Substituting from the last four equations into the left side of Equation \ref{eq:9.3.3} yields

\begin{aligned} u_p'''+6u_p''+11u_p'+5u_p&=6D+6(2C+6Dx)+11(B+2Cx+3Dx^2)\\ &\:\:+5(A+Bx+Cx^2+Dx^3)\\ &=(5A+11B+12C+6D)+(5B+22C+36D)x\\&\:\:+(5C+33D)x^2+5Dx^3.\end{aligned}

Comparing coefficients of like powers of $$x$$ on the right sides of this equation and Equation \ref{eq:9.3.3} shows that $$u_p$$ satisfies Equation \ref{eq:9.3.3} if

$\begin{array}{rcr} 5D&=5\phantom{.}\\ 5C+33D&=28\phantom{.}\\ 5B+22C+36D&=24\phantom{.}\\ 5A+11B+12C+\phantom{3}6D&=21. \end{array}\nonumber$

Solving these equations successively yields $$D=1$$, $$C=-1$$, $$B=2$$, $$A=1$$. Therefore

$u_p=1+2x - x^2 + x^3 \nonumber$

is a particular solution of Equation \ref{eq:9.3.3}, so

$y_p = e^xu_p = e^x(1+2x-x^2+x^3) \nonumber$

is a particular solution of Equation \ref{eq:9.3.2} (Figure $$\PageIndex{1}$$).

Example $$\PageIndex{2}$$

Find a particular solution of

$\label{eq:9.3.4} y^{(4)}-y'''-6y''+4y'+8y=e^{2x}(4+19x+6x^2).$

Solution

Substituting

\begin{aligned} y&=ue^{2x},\\ y'&=e^{2x}(u'+2u),\\ y''&=e^{2x}(u''+4u'+4u),\\ y'''&=e^{2x}(u'''+6u''+12u'+8u),\\ y^{(4)}&=e^{2x}(u^{(4)}+8u'''+24u''+32u'+16u)\end{aligned}

into Equation \ref{eq:9.3.4} and canceling $$e^{2x}$$ yields

\begin{aligned} &&(u^{(4)}+8u'''+24u''+32u'+16u)-(u'''+6u''+12u'+8u)\\ &&-6(u''+4u'+4u)+4(u'+2u)+8u=4+19x+6x^2,\end{aligned}

or

$\label{eq:9.3.5} u^{(4)}+7u'''+12u''=4+19x+6x^2.$

Since neither $$u$$ nor $$u'$$ appear on the left, we can see that Equation \ref{eq:9.3.5} has a particular solution of the form

$\label{eq:9.3.6} u_p=Ax^2+Bx^3+Cx^4.$

Then

\begin{aligned} u_p'&=2Ax+3Bx^2+4Cx^3\\ u_p''&=2A+6Bx+12Cx^2\\ u_p'''&=6B+24Cx\\ u_p^{(4)}&=24C.\end{aligned}

Substituting $$u_p''$$, $$u_p'''$$, and $$u_p^{(4)}$$ into the left side of Equation \ref{eq:9.3.5} yields

\begin{aligned} u_p^{(4)}+7u_p'''+12u_p''&=24C+7(6B+24Cx)+12(2A+6Bx+12Cx^2)\\ &=(24A+42B+24C)+(72B+168C)x+144Cx^2.\end{aligned}

Comparing coefficients of like powers of $$x$$ on the right sides of this equation and Equation \ref{eq:9.3.5} shows that $$u_p$$ satisfies Equation \ref{eq:9.3.5} if

$\begin{array}{rrr} 144C&=6\phantom{.}\\ 72B+168C&=19\phantom{.}\\ 24A+42B+\phantom{1}24C&=4. \end{array}\nonumber$

Solving these equations successively yields $$C=1/24$$, $$B=1/6$$, $$A=-1/6$$. Substituting these into Equation \ref{eq:9.3.6} shows that

$u_p=\dfrac{x^2}{24}(-4+4x+x^2) \nonumber$

is a particular solution of Equation \ref{eq:9.3.5}, so

$y_p=e^{2x}u_p={x^2e^{2x}\over24}(-4+4x+x^2) \nonumber$

is a particular solution of Equation \ref{eq:9.3.4} (Figure $$\PageIndex{2}$$).

## Forcing Functions of the Form $$e^{αx}(P(x) \cos ωx + Q(x) \sin ωx)$$

We now consider equations of the form

$a_0y^{(n)}+a_1y^{(n-1)}+\cdots+a_ny= e^{\lambda x}\left(P(x)\cos\omega x+Q(x)\sin\omega x\right), \nonumber$

where $$P$$ and $$Q$$ are polynomials.

Example $$\PageIndex{3}$$

Find a particular solution of

$\label{eq:9.3.7} y'''+y''-4y'-4y=e^x[(5-5x)\cos x+(2+5x)\sin x].$

Solution

Substituting

\begin{aligned} y&=ue^x,\\ y'&=e^x(u'+u),\\ y''&=e^x(u''+2u'+u),\\ y'''&=e^x(u'''+3u''+3u'+u)\end{aligned}

into Equation \ref{eq:9.3.7} and canceling $$e^x$$ yields

$(u'''+3u''+3u'+u)+(u''+2u'+u)-4(u'+u)-4u =(5-5x)\cos x+(2+5x)\sin x,\nonumber$

or

$\label{eq:9.3.8} u'''+4u''+u'-6u=(5-5x)\cos x+(2+5x)\sin x.$

Since $$\cos x$$ and $$\sin x$$ are not solutions of the complementary equation

$u'''+4u''+u'-6u=0,\nonumber$

a theorem analogous to Theorem 5.5.1 implies that Equation \ref{eq:9.3.8} has a particular solution of the form

$\label{eq:9.3.9} u_p=(A_0+A_1x)\cos x+(B_0+B_1x)\sin x.$

Then

\begin{aligned} u_p'=(A_1+B_0+B_1x)\cos x+(B_1-A_0-A_1x)\sin x,\\ u_p''=(2B_1-A_0-A_1x)\cos x-(2A_1+B_0+B_1x)\sin x,\\ u_p'''=-(3A_1+B_0+B_1x)\cos x-(3B_1-A_0-A_1x)\sin x,\\\end{aligned}\nonumber

so

$u_p'''+4u_p''+u_p'-6u_p =-\left[10A_0+2A_1-8B_1+10A_1x\right]\cos x - \left[10B_0+2B_1+8A_1+10B_1x\right]\sin x. \nonumber$

Comparing the coefficients of $$x\cos x$$, $$x\sin x$$, $$\cos x$$, and $$\sin x$$ here with the corresponding coefficients in Equation \ref{eq:9.3.8} shows that $$u_p$$ is a solution of Equation \ref{eq:9.3.8} if

$\begin{array}{rrr} -10A_1&=-5\phantom{.}\\ -10B_1&=\phantom{-}5\phantom{.}\\ -10A_0-2A_1+8B_1&=5\phantom{.}\\ -10B_0-2B_1-8A_1&=2. \end{array}\nonumber$

Solving the first two equations yields $$A_1=1/2$$, $$B_1=-1/2$$. Substituting these into the last two equations yields

\begin{aligned} -10A_0&=5+2A_1-8B_1=10\phantom{.}\\ -10B_0&=2+2B_1+8A_1=5, \end{aligned}

so $$A_0=-1$$, $$B_0=-1/2$$. Substituting $$A_0=-1$$, $$A_1=1/2$$, $$B_0=-1/2$$, $$B_1=-1/2$$ into Equation \ref{eq:9.3.9} shows that

$u_p=-\frac{1}{2}\left[(2-x)\cos x+(1+x)\sin x\right] \nonumber$

is a particular solution of Equation \ref{eq:9.3.8}, so

$y_p=e^xu_p=-{e^x\over2}\left[(2-x)\cos x+(1+x)\sin x\right] \nonumber$

is a particular solution of Equation \ref{eq:9.3.7} (Figure $$\PageIndex{3}$$).

Example $$\PageIndex{4}$$

Find a particular solution of

$\label{eq:9.3.10} y'''+4y''+6y'+4y= e^{-x}\left[(1-6x)\cos x-(3+2x)\sin x\right].$

Solution

Substituting

\begin{aligned} y&=ue^{-x},\\ y'&=e^{-x}(u'-u),\\ y''&=e^{-x}(u''-2u'+u),\\ y'''&=e^{-x}(u'''-3u''+3u'-u)\end{aligned}

into Equation \ref{eq:9.3.10} and canceling $$e^{-x}$$ yields

$(u'''-3u''+3u'-u)+4(u''-2u'+u)+6(u'-u)+4u =(1-6x)\cos x-(3+2x)\sin x, \nonumber$

or

$\label{eq:9.3.11} u'''+u''+u'+u=(1-6x)\cos x-(3+2x)\sin x.$

Since $$\cos x$$ and $$\sin x$$ are solutions of the complementary equation

$u'''+u''+u'+u=0, \nonumber$

a theorem analogous to Theorem 5.5.1 implies that Equation \ref{eq:9.3.11} has a particular solution of the form

$\label{eq:9.3.12} u_p=(A_0x+A_1x^2)\cos x+(B_0x+B_1x^2)\sin x.$

Then

\begin{align*} u_p' =&[A_0+(2A_1+B_0)x+B_1x^2]\cos x+[B_0+(2B_1-A_0)x-A_1x^2]\sin x,\\ u_p'' =&[2A_1+2B_0-(A_0-4B_1)x-A_1x^2]\cos x\\&+ [2B_1-2A_0-(B_0+4A_1)x-B_1x^2]\sin x,\\ u_p''' =& -[3A_0-6B_1+(6A_1+B_0)x+B_1x^2]\cos x \\&-[3B_0+6A_1+(6B_1-A_0)x-A_1x^2]\sin x,\end{align*}

so

\begin{align*} u_p'''+u_p''+u_p'+u_p =& -[2A_0-2B_0-2A_1-6B_1+(4A_1-4B_1)x]\cos x\\ &-[2B_0+2A_0-2B_1+6A_1+(4B_1+4A_1)x]\sin x. \end{align*}

Comparing the coefficients of $$x\cos x$$, $$x\sin x$$, $$\cos x$$, and $$\sin x$$ here with the corresponding coefficients in Equation \ref{eq:9.3.11} shows that $$u_p$$ is a solution of Equation \ref{eq:9.3.11} if

$\begin{array}{rcr} -4A_1+4B_1&=-6\phantom{.}\\ -4A_1-4B_1&=-2\phantom{.}\\ -2A_0+2B_0+2A_1+6B_1&=\phantom{-}1\phantom{.}\\ -2A_0-2B_0-6A_1+2B_1&=-3. \end{array}\nonumber$

Solving the first two equations yields $$A_1=1$$, $$B_1=-1/2$$. Substituting these into the last two equations yields

\begin{aligned} -2A_0+2B_0&=\phantom{-}1-2A_1-6B_1=2\phantom{.}\\ -2A_0-2B_0&=-3+6A_1-2B_1=4, \end{aligned}

so $$A_0=-3/2$$ and $$B_0=-1/2$$. Substituting $$A_0=-3/2$$, $$A_1=1$$, $$B_0=-1/2$$, $$B_1=-1/2$$ into Equation \ref{eq:9.3.12} shows that

$u_p=- \dfrac{x}{2}\left[(3-2x)\cos x+(1+x)\sin x\right] \nonumber$

is a particular solution of Equation \ref{eq:9.3.11}, so

$y_p=e^{-x}u_p=-{xe^{-x}\over2}\left[(3-2x)\cos x+(1+x)\sin x\right] \nonumber$

(Figure $$\PageIndex{4}$$) is a particular solution of Equation \ref{eq:9.3.10}.