3.2: The Method of Undetermined Coefficients I

Introductory Differential Equations · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    3.2: The Method of Undetermined Coefficients I
    Learning Objectives
    • Understand the method of undetermined coefficients to find particular solutions of nonhomogeneous second-order linear differential equations with constant coefficients.
    • Apply the principle of superposition to combine particular solutions for equations with multiple nonhomogeneous terms.

    In this section we consider the constant coefficient equation

    \[\label{eq:3.2.1} ay''+by'+cy=e^{\alpha x}G(x),\]

    where \(\alpha\) is a constant and \(G\) is a polynomial.

    The general solution of Equation (3.2.1) is \(y=y_p+c_1y_1+c_2y_2\), where \(y_p\) is a particular solution of Equation (3.2.1) and \(\{y_1,y_2\}\) is a fundamental set of solutions of the complementary equation

    \[ay''+by'+cy=0. \nonumber \]

    We showed how to find \(\{y_1,y_2\}\). In this section we’ll show how to find \(y_p\). The procedure that we’ll use is called the method of undetermined coefficients.

    Example \(\PageIndex{1}\)

    Find a particular solution of

    \[\label{eq:3.2.2} y''-7y'+12y=4e^{2x}.\]

    Then find the general solution.

    Solution

    Substituting \(y_p=Ae^{2x}\) for \(y\) in Equation (3.2.2) will produce a constant multiple of \(Ae^{2x}\) on the left side of Equation (3.2.2), so it may be possible to choose \(A\) so that \(y_p\) is a solution of Equation (3.2.2). Let’s try it; if \(y_p=Ae^{2x}\) then

    \[y_p''-7y_p'+12y_p=4Ae^{2x}-14Ae^{2x}+12Ae^{2x}=2Ae^{2x}=4e^{2x} \nonumber\]

    if \(A=2\). Therefore \(y_p=2e^{2x}\) is a particular solution of Equation (3.2.2). To find the general solution, we note that the characteristic polynomial of the complementary equation

    \[\label{eq:3.2.3} y''-7y'+12y=0\]

    is \(p(r)=r^2-7r+12=(r-3)(r-4)\), so \(\{e^{3x},e^{4x}\}\) is a fundamental set of solutions of Equation (3.2.3). Therefore the general solution of Equation (3.2.2) is

    \[y=2e^{2x}+c_1e^{3x}+c_2e^{4x}. \nonumber\]

    Example \(\PageIndex{2}\)

    Find a particular solution of

    \[\label{eq:3.2.4} y''-7y'+12y=5e^{4x}.\]

    Then find the general solution.

    Solution

    Fresh from our success in finding a particular solution of Equation (3.2.2), where we chose \(y_p=Ae^{2x}\) because the right side of Equation (3.2.2) is a constant multiple of \(e^{2x}\), it may seem reasonable to try \(y_p=Ae^{4x}\) as a particular solution of Equation (3.2.4). However, this will not work, since we saw in Example 3.2.1 that \(e^{4x}\) is a solution of the complementary Equation (3.2.3), so substituting \(y_p=Ae^{4x}\) into the left side of Equation (3.2.4) produces zero on the left, no matter how we choose\(A\). To discover a suitable form for \(y_p\), we use the same approach that we used in Section 3.1 to find a second solution of

    \[ay''+by'+cy=0 \nonumber\]

    in the case where the characteristic equation has a repeated real root: we look for solutions of Equation (3.2.4) in the form \(y=ue^{4x}\), where \(u\) is a function to be determined. Substituting

    \[\label{eq:3.2.5} y=ue^{4x},\quad y'=u'e^{4x}+4ue^{4x},\quad \text{and} \quad y''=u''e^{4x}+8u'e^{4x}+16ue^{4x}\]

    into Equation (3.2.4) and canceling the common factor \(e^{4x}\) yields

    \[(u''+8u'+16u)-7(u'+4u)+12u=5, \nonumber\]

    or

    \[u''+u'=5. \nonumber\]

    By inspection we see that \(u_p=5x\) is a particular solution of this equation, so \(y_p=5xe^{4x}\) is a particular solution of Equation (3.2.4). Therefore

    \[y=5xe^{4x}+c_1e^{3x}+c_2e^{4x} \nonumber\]

    is the general solution.

    Example \(\PageIndex{3}\)

    Find a particular solution of

    \[\label{eq:3.2.6} y''-8y'+16y=2e^{4x}.\]

    Solution

    Since the characteristic polynomial of the complementary equation

    \[\label{eq:3.2.7} y''-8y'+16y=0\]

    is \(p(r)=r^2-8r+16=(r-4)^2\), both \(y_1=e^{4x}\) and \(y_2=xe^{4x}\) are solutions of Equation (3.2.7). Therefore Equation (3.2.6) does not have a solution of the form \(y_p=Ae^{4x}\) or \(y_p=Axe^{4x}\). As in Example 3.2.2 , we look for solutions of Equation (3.2.6) in the form \(y=ue^{4x}\), where \(u\) is a function to be determined. Substituting from Equation (3.2.5) into Equation (3.2.6) and canceling the common factor \(e^{4x}\) yields

    \[(u''+8u'+16u)-8(u'+4u)+16u=2, \nonumber\]

    or

    \[u''=2. \nonumber\]

    Integrating twice and taking the constants of integration to be zero shows that \(u_p=x^2\) is a particular solution of this equation, so \(y_p=x^2e^{4x}\) is a particular solution of Equation (3.2.4). Therefore

    \[y=e^{4x}(x^2+c_1x+c_2) \nonumber\]

    is the general solution.

    The preceding examples illustrate the following facts concerning the form of a particular solution \(y_p\) of a constant coefficient equation

    \[ay''+by'+cy=ke^{\alpha x}, \nonumber\]

    where \(k\) is a nonzero constant:

    1. If \(e^{\alpha x}\) isn’t a solution of the complementary equation \[\label{eq:3.2.8} ay''+by'+cy=0,\] then \(y_p=Ae^{\alpha x}\), where \(A\) is a constant. (See Example 3.2.1 ).
    2. If \(e^{\alpha x}\) is a solution of Equation (3.2.8) but \(xe^{\alpha x}\) is not, then \(y_p=Axe^{\alpha x}\), where \(A\) is a constant. (See Example 3.2.2 ).
    3. If both \(e^{\alpha x}\) and \(xe^{\alpha x}\) are solutions of Equation (3.2.8), then \(y_p=Ax^2e^{\alpha x}\), where \(A\) is a constant. (See Example 3.2.3 ).

    In all three cases you can just substitute the appropriate form for \(y_p\) and its derivatives directly into

    \[ay_p''+by_p'+cy_p=ke^{\alpha x},\nonumber\]

    and solve for the constant \(A\), as we did in Example 3.2.1 . However, if the equation is

    \[ay''+by'+cy=k e^{\alpha x}G(x), \nonumber\]

    where \(G\) is a polynomial of degree greater than zero, we recommend that you use the substitution \(y=ue^{\alpha x}\) as we did in Examples 3.2.2 and 3.2.3 . The equation for \(u\) will turn out to be

    \[\label{eq:3.2.9} au''+p'(\alpha)u'+p(\alpha)u=G(x),\]

    where \(p(r)=ar^2+br+c\) is the characteristic polynomial of the complementary equation and \(p'(r)=2ar+b\). However, you shouldn’t memorize this since it is easy to derive the equation for \(u\) in any particular case. Note, however, that if \(e^{\alpha x}\) is a solution of the complementary equation then \(p(\alpha)=0\), so Equation (3.2.9) reduces to

    \[au''+p'(\alpha)u'=G(x), \nonumber\]

    while if both \(e^{\alpha x}\) and \(xe^{\alpha x}\) are solutions of the complementary equation then \(p(r)=a(r-\alpha)^2\) and \(p'(r)=2a(r-\alpha)\), so \(p(\alpha)=p'(\alpha)=0\) and Equation (3.2.9) reduces to

    \[au''=G(x). \nonumber\]

    Example \(\PageIndex{4}\)

    Find a particular solution of

    \[\label{eq:3.2.10} y''-3y'+2y=e^{3x}(-1+2x+x^2).\]

    Solution

    Substituting

    \[y=ue^{3x},\quad y'=u'e^{3x}+3ue^{3x},\quad \text{and} y''=u''e^{3x}+6u'e^{3x}+9ue^{3x}\nonumber \]

    into Equation (3.2.10) and canceling \(e^{3x}\) yields

    \[(u''+6u'+9u)-3(u'+3u)+2u=-1+2x+x^2, \nonumber\]

    or

    \[\label{eq:3.2.11} u''+3u'+2u=-1+2x+x^2.\]

    As in Example 5.3.2, in order to guess a form for a particular solution of Equation (3.2.11), we note that substituting a second degree polynomial \(u_p=A+Bx+Cx^2\) for \(u\) in the left side of Equation (3.2.11) produces another second degree polynomial with coefficients that depend upon \(A\), \(B\), and \(C\); thus,

    \[\text{if} \quad u_p=A+Bx+Cx^2\quad \text{then} \quad u_p'=B+2Cx\quad \text{and} \quad u_p''=2C. \nonumber\]

    If \(u_p\) is to satisfy Equation (3.2.11), we must have

    \[\begin{aligned} u_p''+3u_p'+2u_p&=2C+3(B+2Cx)+2(A+Bx+Cx^2)\\ &=(2C+3B+2A)+(6C+2B)x+2Cx^2=-1+2x+x^2.\end{aligned}\nonumber \]

    Equating coefficients of like powers of \(x\) on the two sides of the last equality yields

    \[\begin{array}{rcr} 2C&=1\phantom{.}\\ 2B+6C&=2\phantom{.}\\ 2A+3B+2C&= -1. \end{array}\nonumber \]

    Solving these equations for \(C\), \(B\), and \(A\) (in that order) yields \(C=1/2,B=-1/2,A=-1/4\). Therefore

    \[u_p=-{1\over4}(1+2x-2x^2) \nonumber\]

    is a particular solution of Equation (3.2.11), and

    \[y_p=u_pe^{3x}=-{e^{3x}\over4}(1+2x-2x^2) \nonumber\]

    is a particular solution of Equation (3.2.10)

    Example \(\PageIndex{5}\)

    Find a particular solution of

    \[\label{eq:3.2.12} y''-4y'+3y=e^{3x}(6+8x+12x^2).\]

    Solution

    Substituting

    \[y=ue^{3x},\quad y'=u'e^{3x}+3ue^{3x},\quad \text{and } y''=u''e^{3x}+6u'e^{3x}+9ue^{3x} \nonumber\]

    into Equation (3.2.12) and canceling \(e^{3x}\) yields

    \[(u''+6u'+9u)-4(u'+3u)+3u=6+8x+12x^2, \nonumber\]

    or

    \[\label{eq:3.2.13} u''+2u'=6+8x+12x^2.\]

    There’s no \(u\) term in this equation, since \(e^{3x}\) is a solution of the complementary equation for Equation (3.2.12). Therefore Equation (3.2.13) does not have a particular solution of the form \(u_p=A+Bx+Cx^2\) that we used successfully in Example 3.2.4 , since with this choice of \(u_p\),

    \[u_p''+2u_p'=2C+(B+2Cx) \nonumber\]

    can’t contain the last term (\(12x^2\)) on the right side of Equation (3.2.13). Instead, let’s try \(u_p=Ax+Bx^2+Cx^3\) on the grounds that

    \[u_p'=A+2Bx+3Cx^2\quad \text{and} \quad u_p''=2B+6Cx\nonumber \]

    together contain all the powers of \(x\) that appear on the right side of Equation (3.2.13).

    Substituting these expressions in place of \(u'\) and \(u''\) in Equation (3.2.13) yields

    \[(2B+6Cx)+2(A+2Bx+3Cx^2)=(2B+2A)+(6C+4B)x+6Cx^2=6+8x+12x^2. \nonumber\]

    Comparing coefficients of like powers of \(x\) on the two sides of the last equality shows that \(u_p\) satisfies Equation (3.2.13) if

    \[\begin{array}{rcr} 6C&=12\phantom{.}\\ 4B+6C&=8\phantom{.}\\ 2A+2B\phantom{+6C}&=6. \end{array}\nonumber \]

    Solving these equations successively yields \(C=2\), \(B=-1\), and \(A=4\). Therefore

    \[u_p=x(4-x+2x^2) \nonumber\]

    is a particular solution of Equation (3.2.13), and

    \[y_p=u_pe^{3x}=xe^{3x}(4-x+2x^2) \nonumber\]

    is a particular solution of Equation (3.2.12).

    Example \(\PageIndex{6}\)

    Find a particular solution of

    \[\label{eq:3.2.14} 4y''+4y'+y=e^{-x/2}(-8+48x+144x^2).\]

    Solution

    Substituting

    \[y=ue^{-x/2},\quad y'=u'e^{-x/2}-{1\over2}ue^{-x/2},\quad \text{and} \quad y''=u''e^{-x/2}-u'e^{-x/2}+{1\over4}ue^{-x/2} \nonumber\]

    into Equation (3.2.14) and canceling \(e^{-x/2}\) yields

    \[4\left(u''-u'+{u\over4}\right)+4\left(u'-{u\over2}\right)+u=4u''=-8+48x+144x^2, \nonumber\]

    or

    \[\label{eq:3.2.15} u''=-2+12x+36x^2,\]

    which does not contain \(u\) or \(u'\) because \(e^{-x/2}\) and \(xe^{-x/2}\) are both solutions of the complementary equation. To obtain a particular solution of Equation (3.2.15) we integrate twice, taking the constants of integration to be zero; thus,

    \[u_p'=-2x+6x^2+12x^3\quad \text{and} \quad u_p=-x^2+2x^3+3x^4=x^2(-1+2x+3x^2).\nonumber\]

    Therefore

    \[y_p=u_pe^{-x/2}=x^2e^{-x/2}(-1+2x+3x^2)\nonumber\]

    is a particular solution of Equation (3.2.14).


    This page titled 3.2: The Method of Undetermined Coefficients I was last modified on Sun, 18 Oct 2026 22:02:07 GMT and is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Vinh Kha Nguyen, Neelam R. Shukla, and Fatemeh Yarahmadi.