Differential EquationsNonhomogeneous and Higher-Order Equations1 of 4
Nonhomogeneous and Higher-Order Equations · 1

The Method of Undetermined Coefficients

When the right-hand side of a differential equation is not zero, we need a way to find a function whose derivatives combine on the left side to produce that right-hand side.

1

Educated Guessing for Exponentials

We want to find a function y\yy{y} that satisfies

y′′+3y′+2y\displaystyle \ddy{y''} + \dy{3y'} + \yy{2y} =24e2t\displaystyle = \forced{24e^{2t}}

Because the left side only takes derivatives of y\yy{y}, multiplies them by constants, and adds them together, the function we plug in must differentiate into e2te^{2t}. Since e2te^{2t} is the only function whose derivatives are multiples of e2te^{2t}, we already know the shape of the answer and just need to find the multiplier in front.

Educated Guessing for Exponentials
y′′+3y′+2y=24e2t\ddy{y''} + \dy{3y'} + \yy{2y} = \forced{24e^{2t}}
y′′+3y′+2y\ddy{y''} + \dy{3y'} + \yy{2y}
??
24e2t\forced{24e^{2t}}
Text solution
Guess a multiple of e2te^{2t} and differentiate twiceWe put an unknown multiplier AA in front of e2te^{2t} and take the first and second derivatives so we can plug them into the left side.
y\displaystyle \yy{y} =Ae2t,y′\displaystyle = \forced{Ae^{2t}}, \quad \dy{y'} =2Ae2t,y′′\displaystyle = 2Ae^{2t}, \quad \ddy{y''} =4Ae2t\displaystyle = 4Ae^{2t}
Substitute into the equation and match the multiplierEvery term on the left has Ae2tAe^{2t} in common, so we can add them up and set the total multiplier equal to 2424.
4Ae2t+3(2Ae2t)+2(Ae2t)=24e2t12Ae2t=24e2t12A=24A=2\displaystyle \begin{aligned} \ddy{4Ae^{2t}} + \dy{3(2Ae^{2t})} + \yy{2(Ae^{2t})} &= \forced{24e^{2t}} \\ 12Ae^{2t} &= \forced{24e^{2t}} \\ 12A &= 24 \\ A &= 2 \end{aligned}

Putting A=2A = 2 back into our guess gives the solution (the subscript pp just marks it as a single function that produces the right-hand side, rather than a family with arbitrary constants):

yp=2e2t⏟particular solution\displaystyle \underbrace{\forced{y_p} = 2e^{2t}}_{\text{particular solution}}

So yp=2e2t\forced{y_p} = 2e^{2t} is the specific function whose derivatives combine on the left side to leave 24e2t\forced{24e^{2t}}.

2

Polynomials and Derivative Families

Now let's change the right side to a polynomial and find a particular solution to

y′′+3y′+2y\displaystyle \ddy{y''} + \dy{3y'} + \yy{2y} =4t2\displaystyle = \forced{4t^2}

Unlike e2te^{2t}, differentiating t2t^2 lowers the power to 2t2t and then 22. If we only guess At2\forced{At^2}, its derivatives will leave extra tt and constant terms on the left side with nothing there to cancel them.

Polynomials and Derivative Families
y′′+3y′+2y=4t2yp=  ?\displaystyle \begin{aligned}\ddy{y''} + \dy{3y'} + \yy{2y} &= \forced{4t^2}\\[6pt]\forced{y_p} &= \;?\end{aligned}
Text solution
Guess the full polynomial family down to the constantWe include Bt\forced{Bt} and C\forced{C} alongside At2\forced{At^2} so they can cancel the lower powers of tt that come out when At2\forced{At^2} is differentiated.
y\displaystyle \yy{y} =At2+Bt+C,y′\displaystyle = \forced{At^2 + Bt + C}, \quad \dy{y'} =2At+B,y′′\displaystyle = 2At + B, \quad \ddy{y''} =2A\displaystyle = 2A
Substitute into the left side and group by powers of ttCollecting the t2t^2, tt, and constant terms into separate groups lets us match each power against the right side 4t2+0t+0\forced{4t^2 + 0t + 0}.
2A+3(2At+B)+2(At2+Bt+C)=4t22At2+(6A+2B)t+(2A+3B+2C)=4t2+0t+0\displaystyle \begin{aligned} \ddy{2A} + \dy{3(2At + B)} + \yy{2(At^2 + Bt + C)} &= \forced{4t^2} \\ 2At^2 + (6A + 2B)t + (2A + 3B + 2C) &= \forced{4t^2 + 0t + 0} \end{aligned}
Solve for AA, BB, and CC from the highest power downFinding AA from the t2t^2 terms first tells us what tt term AA leaves behind for BB to cancel, which then tells us what constant term AA and BB leave behind for CC to cancel.
t2 terms:2A=4  ⟹  A=2t terms:6(2)+2B=0  ⟹  12+2B=0  ⟹  B=−6constants:2(2)+3(−6)+2C=0  ⟹  −14+2C=0  ⟹  C=7\displaystyle \begin{aligned} t^2\text{ terms:} \quad 2A &= 4 \implies A = 2 \\ t\text{ terms:} \quad 6(2) + 2B &= 0 \implies 12 + 2B = 0 \implies B = -6 \\ \text{constants:} \quad 2(2) + 3(-6) + 2C &= 0 \implies -14 + 2C = 0 \implies C = 7 \end{aligned}

Putting A=2A = 2, B=−6B = -6, and C=7C = 7 into our guess gives the particular solution:

yp\displaystyle \forced{y_p} =2t2−6t+7\displaystyle = 2t^2 - 6t + 7

So 2t22t^2 produces the 4t2\forced{4t^2} on the right side, while −6t+7-6t + 7 cancels the extra tt and constant terms that 2t22t^2 leaves behind in 3y′\dy{3y'} and y′′\ddy{y''}.

3

Sines and Cosines

Next, let's put a trigonometric function on the right side:

y′′+3y′+2y\displaystyle \ddy{y''} + \dy{3y'} + \yy{2y} =10sin⁡(t)\displaystyle = \forced{10\sin(t)}

As soon as sin⁡(t)\sin(t) goes through the first derivative 3y′\dy{3y'}, it turns into cos⁡(t)\cos(t), so our guess needs both functions from the sine-and-cosine derivative family.

Sines and Cosines
y′′+3y′+2y=10sin⁡(t)yp=  ?\displaystyle \begin{aligned}\ddy{y''} + \dy{3y'} + \yy{2y} &= \forced{10\sin(t)}\\[6pt]\forced{y_p} &= \;?\end{aligned}
Text solution
Guess both sin⁡(t)\forced{\sin(t)} and cos⁡(t)\forced{\cos(t)} togetherBecause sine and cosine differentiate back and forth into each other, we include both in our guess even when only one appears in the equation.
y=Asin⁡(t)+Bcos⁡(t)y′=Acos⁡(t)−Bsin⁡(t)y′′=−Asin⁡(t)−Bcos⁡(t)\displaystyle \begin{aligned} \yy{y} &= \forced{A\sin(t) + B\cos(t)} \\ \dy{y'} &= A\cos(t) - B\sin(t) \\ \ddy{y''} &= -A\sin(t) - B\cos(t) \end{aligned}
Substitute into the left side and group the sin⁡(t)\sin(t) and cos⁡(t)\cos(t) termsSeparating the sines from the cosines shows how AA and BB combine across the derivatives.
(−Asin⁡(t)−Bcos⁡(t))+3(Acos⁡(t)−Bsin⁡(t))+2(Asin⁡(t)+Bcos⁡(t))=10sin⁡(t)(A−3B)sin⁡(t)+(3A+B)cos⁡(t)=10sin⁡(t)+0cos⁡(t)\displaystyle \begin{aligned} \ddy{(-A\sin(t) - B\cos(t))} & \\ {} + \dy{3(A\cos(t) - B\sin(t))} & \\ {} + \yy{2(A\sin(t) + B\cos(t))} &= \forced{10\sin(t)} \\ (A - 3B)\sin(t) + (3A + B)\cos(t) &= \forced{10\sin(t) + 0\cos(t)} \end{aligned}
Match the cosine and sine coefficientsSetting the cosine multiplier to 00 gives BB in terms of AA, which we substitute into the sine equation.
cos⁡(t) terms:3A+B=0  ⟹  B=−3Asin⁡(t) terms:A−3(−3A)=10  ⟹  10A=10  ⟹  A=1B=−3(1)=−3\displaystyle \begin{aligned} \cos(t)\text{ terms:} \quad 3A + B &= 0 \implies B = -3A \\ \sin(t)\text{ terms:} \quad A - 3(-3A) &= 10 \implies 10A = 10 \implies A = 1 \\ B &= -3(1) = -3 \end{aligned}

Putting A=1A = 1 and B=−3B = -3 into our guess gives the particular solution:

yp\displaystyle \forced{y_p} =sin⁡(t)−3cos⁡(t)\displaystyle = \sin(t) - 3\cos(t)

So sin⁡(t)−3cos⁡(t)\sin(t) - 3\cos(t) is the combination of sine and cosine whose cosine pieces cancel out across y′′+3y′+2y\ddy{y''} + \dy{3y'} + \yy{2y} while its sine pieces add up to 10sin⁡(t)\forced{10\sin(t)}.

Because the first derivative 3y′\dy{3y'} turns sin⁡(t)\sin(t) into cos⁡(t)\cos(t), a pure sine can never produce a pure sine on the right side by itself. Including −3cos⁡(t)-3\cos(t) in yp\forced{y_p} cancels that extra cosine so only 10sin⁡(t)\forced{10\sin(t)} is left.

A pure sine input always produces an unwanted cosine wave in the output through the first derivative, so the input needs a negative cosine piece to cancel that extra cosine and leave a pure sine output.
4

Products of Functions

Now let's see what happens when the right side multiplies two functions together:

y′′+3y′+2y\displaystyle \ddy{y''} + \dy{3y'} + \yy{2y} =36tet\displaystyle = \forced{36te^t}

Because tt and ete^t are multiplied together, differentiating tette^t uses the product rule: differentiating ete^t keeps tette^t, while differentiating tt into 11 brings out a plain ete^t.

Products of Functions
y′′+3y′+2y=36tetyp=  ?\displaystyle \begin{aligned}\ddy{y''} + \dy{3y'} + \yy{2y} &= \forced{36te^{t}}\\[6pt]\forced{y_p} &= \;?\end{aligned}
Text solution
Multiply the polynomial family by ete^t and differentiateMultiplying At+B\forced{At + B} by ete^t gives us Bet\forced{Be^t} to cancel the plain ete^t terms that come out of the product rule.
y=(At+B)et=Atet+Bety′=Atet+(A+B)ety′′=Atet+(2A+B)et\displaystyle \begin{aligned} \yy{y} &= \forced{(At + B)e^t} = \forced{Ate^t + Be^t} \\ \dy{y'} &= Ate^t + (A + B)e^t \\ \ddy{y''} &= Ate^t + (2A + B)e^t \end{aligned}
Substitute into the left side and group the tette^t and ete^t termsKeeping the tette^t terms separate from the plain ete^t terms gives one equation for each group.
(Atet+(2A+B)et)+3(Atet+(A+B)et)+2(Atet+Bet)=36tet6Atet+(5A+6B)et=36tet+0et\displaystyle \begin{aligned} \ddy{\bigl(Ate^t + (2A + B)e^t\bigr)} & \\ {} + \dy{3\bigl(Ate^t + (A + B)e^t\bigr)} & \\ {} + \yy{2\bigl(Ate^t + Be^t\bigr)} &= \forced{36te^t} \\ 6Ate^t + (5A + 6B)e^t &= \forced{36te^t + 0e^t} \end{aligned}
Solve for AA from the tette^t terms, then BB from the ete^t termsOnce AA is fixed by the 36tet\forced{36te^t} term on the right, BB cancels the extra ete^t term that AA creates.
tet terms:6A=36  ⟹  A=6et terms:5(6)+6B=0  ⟹  30+6B=0  ⟹  B=−5\displaystyle \begin{aligned} te^t\text{ terms:} \quad 6A &= 36 \implies A = 6 \\ e^t\text{ terms:} \quad 5(6) + 6B &= 0 \implies 30 + 6B = 0 \implies B = -5 \end{aligned}

Putting A=6A = 6 and B=−5B = -5 into our guess gives the particular solution:

yp\displaystyle \forced{y_p} =(6t−5)et\displaystyle = (6t - 5)e^t

So 6tet6te^t produces the 36tet\forced{36te^t} on the right side, while −5et-5e^t cancels the plain ete^t terms created by the product rule.

The same idea works whenever exponentials, polynomials, and sines or cosines are multiplied together: just multiply their full derivative families:

Right side etsin⁡(2t)  ⟹  yp=et(Asin⁡(2t)+Bcos⁡(2t))Right side tetsin⁡(2t)  ⟹  yp=(At+B)etcos⁡(2t)+(Ct+D)etsin⁡(2t)\displaystyle \begin{aligned} &\text{Right side } \forced{e^t\sin(2t)} \\ &\quad \implies \forced{y_p} = \forced{e^t\bigl(A\sin(2t) + B\cos(2t)\bigr)} \\[6pt] &\text{Right side } \forced{te^t\sin(2t)} \\ &\quad \implies \forced{y_p} = \forced{(At + B)e^t\cos(2t)} \\ &\qquad\qquad\qquad \forced{{} + (Ct + D)e^t\sin(2t)} \end{aligned}
5

When Educated Guessing Works

Before going any further, we need to see which differential equations this guessing method can actually solve, and why it breaks down outside our three function families.

When Educated Guessing Works
y′′+3y′+2y=\ddy{y''} + \dy{3y'} + \yy{2y} =
??

Educated guessing works only when the left side has constant coefficients and the right side is built by adding or multiplying exponentials, polynomials, and sines or cosines. Outside those three families, functions like 1t\forced{\frac{1}{t}}, ln⁡(t)\forced{\ln(t)}, tan⁡(t)\forced{\tan(t)}, or sec⁡(t)\forced{\sec(t)} create a new kind of term every time you differentiate them:

1t→−1t2→2t3→−6t4→⋯\displaystyle \forced{\frac{1}{t}} \to -\frac{1}{t^2} \to \frac{2}{t^3} \to -\frac{6}{t^4} \to \cdots

Because the derivatives never stay inside a finite family, no finite guess can cancel all the extra terms, and we need a different method called Variation of Parameters instead.

6

When the Guess Overlaps the Homogeneous Solution

Even with a simple exponential on the right side, our normal guess runs into trouble when we try to solve

y′′+3y′+2y\displaystyle \ddy{y''} + \dy{3y'} + \yy{2y} =5e−t\displaystyle = \forced{5e^{-t}}

To see why, look first at the homogeneous equation y′′+3y′+2y=0\ddy{y''} + \dy{3y'} + \yy{2y} = 0, which tells us which functions the left side turns into 00.

When the Guess Overlaps the Homogeneous Solution
y′′+3y′+2y=5e−typ=  ?\displaystyle \begin{aligned}\ddy{y''} + \dy{3y'} + \yy{2y} &= \forced{5e^{-t}}\\[6pt]\forced{y_p} &= \;?\end{aligned}

Because the left side turns yh\yh{y_h} into 00, adding yh\yh{y_h} to any particular solution yp\forced{y_p} leaves the right-hand side unchanged, which is why the general solution to an equation like this one is always written as their sum:

y=c1e−t+c2e−2t⏟yh (turns into 0)+yp⏟makes the right side\displaystyle \begin{aligned}\yy{y} &= \underbrace{\yh{c_1 e^{-t}} + \yh{c_2 e^{-2t}}}_{\yh{y_h}\text{ (turns into }0\text{)}} + \underbrace{\forced{y_p}}_{\text{makes the right side}}\end{aligned}

When the right side of y′′+3y′+2y=5e−t\ddy{y''} + \dy{3y'} + \yy{2y} = \forced{5e^{-t}} is 5e−t\forced{5e^{-t}}, our normal guess Ae−t\forced{Ae^{-t}} is already part of yh\yh{y_h}, so the left side turns it into 00 before we can solve for AA.

Text solution
Multiply the overlapping guess by tt and differentiateGuessing y=Ate−t\yy{y} = \forced{A}t\forced{e^{-t}} brings in the product rule, which produces plain e−te^{-t} terms whenever tt is differentiated into 11.
y=Ate−ty′=−Ate−t+Ae−ty′′=Ate−t−2Ae−t\displaystyle \begin{aligned} \yy{y} &= \forced{A}t\forced{e^{-t}} \\ \dy{y'} &= -Ate^{-t} + Ae^{-t} \\ \ddy{y''} &= Ate^{-t} - 2Ae^{-t} \end{aligned}
Substitute into the left side and group the te−tte^{-t} and e−te^{-t} termsAll the te−tte^{-t} terms cancel out to 00 for the same reason e−te^{-t} did, leaving only the e−te^{-t} terms from the product rule to match 5e−t\forced{5e^{-t}}.
(Ate−t−2Ae−t)+3(−Ate−t+Ae−t)+2(Ate−t)=5e−t(1−3+2)⏟0Ate−t+(−2+3)Ae−t=5e−tAe−t=5e−tA=5\displaystyle \begin{aligned} \ddy{(Ate^{-t} - 2Ae^{-t})} + \dy{3(-Ate^{-t} + Ae^{-t})} + \yy{2(Ate^{-t})} &= \forced{5e^{-t}} \\ \underbrace{(\ddy{1} - \dy{3} + \yy{2})}_{0}Ate^{-t} + (\ddy{-2} + \dy{3})Ae^{-t} &= \forced{5e^{-t}} \\ Ae^{-t} &= \forced{5e^{-t}} \\ A &= 5 \end{aligned}

Putting A=5A = 5 into our modified guess gives the particular solution:

yp\displaystyle \forced{y_p} =5te−t\displaystyle = 5te^{-t}

So when we plug 5te−t5te^{-t} into the left side, its te−tte^{-t} pieces cancel out to 00, while the extra terms from the product rule leave the 5e−t\forced{5e^{-t}} we needed.

At the homogeneous roots r=−1r = -1 and r=−2r = -2, the left side turns ert\yh{e^{rt}} into 00. Multiplying by tt fixes that: the tertte^{rt} pieces still cancel to 00, leaving behind the plain erte^{rt} terms from the product rule.

At the two decay rates where the left side turns the plain exponential into zero, multiplying the input by time wipes out its matching piece too and leaves only one extra exponential from the product rule.
7

Four Classic Overlap Traps

Many problems only ask you to write down the form of the guess yp\forced{y_p} without solving for the constants, which tests whether you can spot hidden overlaps between a derivative family and yh\yh{y_h}.

Four Classic Overlap Traps
y′′+3y′+2y\displaystyle \ddy{y''} + \dy{3y'} + \yy{2y} =24e2t+5e−t\displaystyle = \forced{24e^{2t}} + \forced{5e^{-t}}
yh=c1e−t+c2e−2typ=  ?\displaystyle \begin{aligned}\yh{y_h} &= \yh{c_1 e^{-t}} + \yh{c_2 e^{-2t}}\\[2pt]\forced{y_p} &= \;?\end{aligned}

Here is how the overlap rule works in four common situations:

8

Initial Value Problems and the Full Game Plan

Finally, we want to find the specific solution curve that passes through a given starting height and starting slope:

y′′+3y′+2y=6et,y(0)=1,y′(0)=0\displaystyle \begin{aligned}\ddy{y''} + \dy{3y'} + \yy{2y} &= \forced{6e^t}, \\ \yy{y(0)} &= 1, \\ \dy{y'(0)} &= 0\end{aligned}

To find the constants c1c_1 and c2c_2, we have to wait until we have found yp\forced{y_p} and put together the full curve y(t)=yh+yp\yy{y(t)} = \yh{y_h} + \forced{y_p}, because yp\forced{y_p} adds its own height and slope at t=0t = 0.

Initial Value Problems and the Full Game Plan
y′′+3y′+2y=6ety(0)=1y′(0)=0y(t)=  ?\displaystyle \begin{aligned}\ddy{y''} + \dy{3y'} + \yy{2y} &= \forced{6e^{t}}\\[6pt]\yy{y(0)} &= 1\\[6pt]\dy{y'(0)} &= 0\\[6pt]\yy{y(t)} &= \;?\end{aligned}
Text solution
Find yh\yh{y_h} first and leave c1c_1 and c2c_2 unsolvedSetting the right side to 00 gives the homogeneous solution so we can check our guess for yp\forced{y_p}.
r2+3r+2\displaystyle r^2 + 3r + 2 =0  ⟹  r\displaystyle = 0 \implies r =−1,−2  ⟹  yh\displaystyle = -1, -2 \implies \yh{y_h} =c1e−t+c2e−2t\displaystyle = \yh{c_1 e^{-t}} + \yh{c_2 e^{-2t}}
Guess yp\forced{y_p} and solve for its undetermined coefficientSince Aet\forced{Ae^t} does not overlap e−t\yh{e^{-t}} or e−2t\yh{e^{-2t}} in yh\yh{y_h}, we plug yp=Aet\forced{y_p} = \forced{Ae^t} and its derivatives straight into the left side.
yp=Aet,yp′=Aet,yp′′=AetAet+3Aet+2Aet=6et6Aet=6et  ⟹  A=1  ⟹  yp=et\displaystyle \begin{aligned} \forced{y_p} &= \forced{Ae^t}, \quad \dy{y_p'} = Ae^t, \quad \ddy{y_p''} = Ae^t \\ \ddy{Ae^t} + \dy{3Ae^t} + \yy{2Ae^t} &= \forced{6e^t} \\ 6Ae^t &= \forced{6e^t} \implies A = 1 \implies \forced{y_p} = e^t \end{aligned}
Combine y(t)=yh+yp\yy{y(t)} = \yh{y_h} + \forced{y_p} and differentiate the total solutionWe need both the full function y(t)\yy{y(t)} and its derivative y′(t)\dy{y'(t)} before plugging in t=0t = 0.
y(t)=c1e−t+c2e−2t+ety′(t)=−c1e−t−2c2e−2t+et\displaystyle \begin{aligned} \yy{y(t)} &= \yh{c_1 e^{-t}} + \yh{c_2 e^{-2t}} + \forced{e^t} \\ \dy{y'(t)} &= \yh{-c_1 e^{-t}} - \yh{2c_2 e^{-2t}} + \forced{e^t} \end{aligned}
Plug in the initial conditions at t=0t = 0 to solve for c1c_1 and c2c_2Because e0=1e^0 = 1, the particular solution et\forced{e^t} already adds 1\forced{1} to both the starting height and the starting slope.
y(0)=1:c1+c2+1⏟from et=1  ⟹  c1+c2=0y′(0)=0:−c1−2c2+1⏟from et=0  ⟹  −c1−2c2=−1Add equations:−c2=−1  ⟹  c2=1,c1=−1\displaystyle \begin{aligned} \yy{y(0)} = 1: \quad c_1 + c_2 + \underbrace{\forced{1}}_{\text{from }\forced{e^t}} &= 1 \implies c_1 + c_2 = 0 \\ \dy{y'(0)} = 0: \quad -c_1 - 2c_2 + \underbrace{\forced{1}}_{\text{from }\forced{e^t}} &= 0 \implies -c_1 - 2c_2 = -1 \\ \text{Add equations:} \quad -c_2 &= -1 \implies c_2 = 1, \quad c_1 = -1 \end{aligned}

Putting c1=−1c_1 = -1 and c2=1c_2 = 1 into y(t)\yy{y(t)} gives the exact solution curve:

y(t)\displaystyle \yy{y(t)} =−e−t+e−2t+et\displaystyle = -e^{-t} + e^{-2t} + e^t

So y(t)=−e−t+e−2t+et\yy{y(t)} = -e^{-t} + e^{-2t} + e^t satisfies the differential equation while starting at height 11 with slope 00 at t=0t = 0.

Because the initial conditions apply to the total curve y(t)=yh(t)+yp(t)\yy{y(t)} = \yh{y_h(t)} + \forced{y_p(t)}, yh(t)\yh{y_h(t)} has to adjust to make up for whatever height and slope yp(t)\forced{y_p(t)} already has at t=0t = 0.

Because the total solution is fixed at a starting height of 1 and a flat starting slope, the homogeneous solution has to make up the rest: its starting height is 1 minus the particular solution's, and its starting slope is the negative of the particular solution's.

Key concepts

Before starting Undetermined Coefficients, check two things: the left side must have constant coefficients, and the right side must be built by adding or multiplying exponentials, polynomials, and sines or cosines. If the left side has variable coefficients (like ty′′+y′+y=et\ddy{ty''} + \dy{y'} + \yy{y} = \forced{e^t}) or the right side has a function whose derivatives never stay inside a finite family (like 1t\forced{\frac{1}{t}}, ln⁡(t)\forced{\ln(t)}, tan⁡(t)\forced{\tan(t)}, or sec⁡(t)\forced{\sec(t)}), educated guessing will not work and you need Variation of Parameters instead.

When Undetermined Coefficients applies, follow the same four steps every time:

Find yh\yh{y_h} first by setting the right side to 00

For y′′+3y′+2y=0\ddy{y''} + \dy{3y'} + \yy{2y} = 0, solving r2+3r+2=0r^2 + 3r + 2 = 0 gives yh=c1e−t+c2e−2t\yh{y_h} = \yh{c_1 e^{-t}} + \yh{c_2 e^{-2t}}. Leave c1c_1 and c2c_2 alone for now; write yh\yh{y_h} down first so you can spot overlaps.

Write the full derivative family for yp\forced{y_p}

Include every term that will come out when you differentiate:

ekt  ⟹  Aekt(for 24e2t, guess Ae2t)tn  ⟹  Atn+Btn−1+⋯+C(for 4t2, guess At2+Bt+C)sin⁡(ωt) or cos⁡(ωt)  ⟹  Asin⁡(ωt)+Bcos⁡(ωt)(for 10sin⁡(t), guess Asin⁡(t)+Bcos⁡(t))\displaystyle \begin{aligned} &\forced{e^{kt}} \implies \forced{Ae^{kt}} \\ &\quad \text{(for } \forced{24e^{2t}}\text{, guess } \forced{Ae^{2t}}\text{)} \\[6pt] &\forced{t^n} \implies \forced{At^n + Bt^{n-1} + \dots + C} \\ &\quad \text{(for } \forced{4t^2}\text{, guess } \forced{At^2 + Bt + C}\text{)} \\[6pt] &\forced{\sin(\omega t)} \text{ or } \forced{\cos(\omega t)} \\ &\quad \implies \forced{A\sin(\omega t) + B\cos(\omega t)} \\ &\quad \text{(for } \forced{10\sin(t)}\text{, guess } \\ &\qquad \forced{A\sin(t) + B\cos(t)}\text{)} \end{aligned}
For products of these functions, multiply their families together (for 36tet\forced{36te^t}, guess (At+B)et\forced{(At + B)e^t}).

Check each family against yh\yh{y_h} for overlap

If any piece inside a guessed family matches a term in yh\yh{y_h}, multiply that entire family by tt, or by t2t^2 for a repeated root, until no piece overlaps yh\yh{y_h} (for y′′+3y′+2y=t2e−t\ddy{y''} + \dy{3y'} + \yy{2y} = \forced{t^2 e^{-t}}, the Ce−t\forced{Ce^{-t}} term inside (At2+Bt+C)e−t\forced{(At^2 + Bt + C)e^{-t}} matches c1e−t\yh{c_1 e^{-t}}, so the guess becomes t(At2+Bt+C)e−tt\forced{(At^2 + Bt + C)e^{-t}}).

Find A,B,CA, B, C first, then use initial conditions on y(t)=yh+yp\yy{y(t)} = \yh{y_h} + \forced{y_p} last

Differentiate yp\forced{y_p}, substitute into the left side, and match like terms to find the undetermined coefficients. Only after writing the complete sum y(t)=yh+yp\yy{y(t)} = \yh{y_h} + \forced{y_p} do you plug in y(0)\yy{y(0)} and y′(0)\dy{y'(0)} to find c1c_1 and c2c_2.

9

Practice

1

Find a particular solution yp\forced{y_p} to y′′−y′−6y=18e4t\ddy{y''} - \dy{y'} - \yy{6y} = \forced{18e^{4t}}.

What happens to e4te^{4t} each time you differentiate it, and is e4te^{4t} part of yh\yh{y_h}?

The characteristic equation r2−r−6=(r−3)(r+2)=0r^2 - r - 6 = (r - 3)(r + 2) = 0 gives yh=c1e3t+c2e−2t\yh{y_h} = \yh{c_1 e^{3t}} + \yh{c_2 e^{-2t}}, so our guess yp=Ae4t\forced{y_p} = \forced{Ae^{4t}} does not overlap yh\yh{y_h}. Differentiating gives yp′=4Ae4t\dy{y_p'} = 4Ae^{4t} and yp′′=16Ae4t\ddy{y_p''} = 16Ae^{4t} (watch out for forgetting the second chain-rule factor of 44 and writing yp′′=4Ae4ty_p'' = 4Ae^{4t}, which leads to −6A=18-6A = 18 and the wrong answer yp=−3e4ty_p = -3e^{4t}). Substituting into the left side gives:
(16−4−6)Ae4t\displaystyle (\ddy{16} - \dy{4} - \yy{6})Ae^{4t} =18e4t  ⟹  6A\displaystyle = \forced{18e^{4t}} \implies 6A =18  ⟹  A\displaystyle = 18 \implies A =3\displaystyle = 3
Answeryp=3e4t\forced{y_p} = 3e^{4t}
2

Find a particular solution yp\forced{y_p} to y′′+2y′+y=2t2\ddy{y''} + \dy{2y'} + \yy{y} = \forced{2t^2}.

Which lower powers of tt will come out when you differentiate t2t^2?

Guess the full polynomial family yp=At2+Bt+C\forced{y_p} = \forced{At^2 + Bt + C} (guessing only At2At^2 leaves 4At+2A4At + 2A uncancelled and gives the wrong answer yp=2t2y_p = 2t^2). With yp′=2At+B\dy{y_p'} = 2At + B and yp′′=2A\ddy{y_p''} = 2A, substituting into y′′+2y′+y=2t2\ddy{y''} + \dy{2y'} + \yy{y} = \forced{2t^2} gives:
At2+(4A+B)t+(2A+2B+C)\displaystyle At^2 + (4A + B)t + (2A + 2B + C) =2t2+0t+0\displaystyle = \forced{2t^2 + 0t + 0}
Matching powers from highest to lowest gives A=2A = 2, then 4(2)+B=0  ⟹  B=−84(2) + B = 0 \implies B = -8, and finally 2(2)+2(−8)+C=0  ⟹  C=122(2) + 2(-8) + C = 0 \implies C = 12 (be careful not to drop the factor of 22 on 2B2B from 2y′\dy{2y'}, which gives 4−8+C=04 - 8 + C = 0 and the wrong answer yp=2t2−8t+4y_p = 2t^2 - 8t + 4).
Answeryp=2t2−8t+12\forced{y_p} = 2t^2 - 8t + 12
3

Find a particular solution yp\forced{y_p} to y′′+y′−2y=10cos⁡(t)\ddy{y''} + \dy{y'} - \yy{2y} = \forced{10\cos(t)}.

Differentiating cos⁡(t)\cos(t) inside y′\dy{y'} creates a sin⁡(t)\sin(t) term. What other function must you include with cos⁡(t)\cos(t) in your guess?

Guess both sin⁡(t)\sin(t) and cos⁡(t)\cos(t): yp=Asin⁡(t)+Bcos⁡(t)\forced{y_p} = \forced{A\sin(t) + B\cos(t)}, with yp′=Acos⁡(t)−Bsin⁡(t)\dy{y_p'} = A\cos(t) - B\sin(t) and yp′′=−Asin⁡(t)−Bcos⁡(t)\ddy{y_p''} = -A\sin(t) - B\cos(t) (watch the minus sign on −Bsin⁡(t)-B\sin(t) in yp′\dy{y_p'}; flipping it to +Bsin⁡(t)+B\sin(t) gives B=3AB = 3A instead of B=−3AB = -3A). Substituting into y′′+y′−2y=10cos⁡(t)\ddy{y''} + \dy{y'} - \yy{2y} = \forced{10\cos(t)} gives:
(−3A−B)sin⁡(t)+(A−3B)cos⁡(t)\displaystyle (-3A - B)\sin(t) + (A - 3B)\cos(t) =0sin⁡(t)+10cos⁡(t)\displaystyle = \forced{0\sin(t) + 10\cos(t)}
From the sine terms, −3A−B=0  ⟹  B=−3A-3A - B = 0 \implies B = -3A. Substituting into the cosine equation gives A−3(−3A)=10  ⟹  10A=10  ⟹  A=1A - 3(-3A) = 10 \implies 10A = 10 \implies A = 1 and B=−3B = -3.
Answeryp=sin⁡(t)−3cos⁡(t)\forced{y_p} = \sin(t) - 3\cos(t)
4

Find a particular solution yp\forced{y_p} to y′′−y′−2y=12tet\ddy{y''} - \dy{y'} - \yy{2y} = \forced{12te^t}.

When you differentiate tette^t with the product rule, what extra term comes out besides tette^t?

Since r2−r−2=(r−2)(r+1)=0r^2 - r - 2 = (r - 2)(r + 1) = 0, ete^t does not overlap yh\yh{y_h}. Multiply the full polynomial family for tt by ete^t: yp=(At+B)et=Atet+Bet\forced{y_p} = \forced{(At + B)e^t} = \forced{Ate^t + Be^t} (leaving off +Bet+ \forced{Be^t} leaves nothing to cancel the ete^t term from the product rule and gives the wrong answer yp=−6tety_p = -6te^t). Differentiating gives yp′=Atet+(A+B)et\dy{y_p'} = Ate^t + (A + B)e^t and yp′′=Atet+(2A+B)et\ddy{y_p''} = Ate^t + (2A + B)e^t. Substituting into y′′−y′−2y=12tet\ddy{y''} - \dy{y'} - \yy{2y} = \forced{12te^t} gives:
−2Atet+(A−2B)et\displaystyle -2Ate^t + (A - 2B)e^t =12tet+0et\displaystyle = \forced{12te^t + 0e^t}
Matching the tette^t and ete^t terms gives −2A=12  ⟹  A=−6-2A = 12 \implies A = -6, and −6−2B=0  ⟹  B=−3-6 - 2B = 0 \implies B = -3.
Answeryp=(−6t−3)et\forced{y_p} = (-6t - 3)e^t
5

Which of the equations (a) y′′+4y′+5y=e−tcos⁡(2t)y'' + 4y' + 5y = e^{-t}\cos(2t), (b) y′′+4y′+5y=ln⁡(t)y'' + 4y' + 5y = \ln(t), and (c) ty′′+y′+y=etty'' + y' + y = e^t can be solved by the Method of Undetermined Coefficients, and why do the others fail?

Check both sides of each equation: are the coefficients on the left constant, and do the derivatives of the right side stay inside a finite family?

Check the left-side coefficients as well as the right-side function (a common mistake is picking both (a) and (c) because ete^t has a finite derivative family, while overlooking the variable tt multiplying y′′\ddy{y''} in (c)).
AnswerOnly (a) can be solved by Undetermined Coefficients, using the guess yp=e−t(Asin⁡(2t)+Bcos⁡(2t))\forced{y_p} = e^{-t}(A\sin(2t) + B\cos(2t)). Equation (b) fails because the derivatives of ln⁡(t)\forced{\ln(t)} do not stay inside a finite family, and (c) fails because the left side does not have constant coefficients.
6

Find the general solution to y′′−4y′+3y=6e3t\ddy{y''} - \dy{4y'} + \yy{3y} = \forced{6e^{3t}}.

Find yh\yh{y_h} first. Does your normal guess for 6e3t\forced{6e^{3t}} appear inside yh\yh{y_h}?

From r2−4r+3=(r−1)(r−3)=0r^2 - 4r + 3 = (r - 1)(r - 3) = 0, we get yh=c1et+c2e3t\yh{y_h} = \yh{c_1 e^t} + \yh{c_2 e^{3t}}. Because Ae3t\forced{Ae^{3t}} overlaps c2e3t\yh{c_2 e^{3t}}, multiply by tt to guess yp=Ate3t\forced{y_p} = \forced{A}t\forced{e^{3t}}. Differentiating gives yp′=3Ate3t+Ae3t\dy{y_p'} = 3Ate^{3t} + Ae^{3t} and yp′′=9Ate3t+6Ae3t\ddy{y_p''} = 9Ate^{3t} + 6Ae^{3t} (forgetting the chain-rule factor of 33 on the Ae3tAe^{3t} term and writing yp′′=9Ate3t+2Ae3ty_p'' = 9Ate^{3t} + 2Ae^{3t} leads to −2A=6-2A = 6 and the wrong answer y(t)=c1et+c2e3t−3te3ty(t) = c_1 e^t + c_2 e^{3t} - 3te^{3t}). Substituting into y′′−4y′+3y=6e3t\ddy{y''} - \dy{4y'} + \yy{3y} = \forced{6e^{3t}} gives:
(9−12+3)Ate3t+(6−4)Ae3t\displaystyle (\ddy{9} - \dy{12} + \yy{3})Ate^{3t} + (\ddy{6} - \dy{4})Ae^{3t} =6e3t  ⟹  2Ae3t\displaystyle = \forced{6e^{3t}} \implies 2Ae^{3t} =6e3t  ⟹  A\displaystyle = \forced{6e^{3t}} \implies A =3\displaystyle = 3
Adding yh\yh{y_h} and yp=3te3t\forced{y_p} = 3te^{3t} gives the general solution.
Answery(t)=c1et+c2e3t+3te3t\yy{y(t)} = \yh{c_1 e^t} + \yh{c_2 e^{3t}} + \forced{3te^{3t}}
7

Write the form of the particular solution yp\forced{y_p} (do not solve for the coefficients) for y′′+16y=sin⁡(4t)+e4t\ddy{y''} + \yy{16y} = \forced{\sin(4t)} + \forced{e^{4t}}.

Compare the two separate families on the right side against yh\yh{y_h}. Which one matches yh\yh{y_h}?

Solving r2+16=0r^2 + 16 = 0 gives r=±4ir = \pm 4i, so yh=c1cos⁡(4t)+c2sin⁡(4t)\yh{y_h} = \yh{c_1\cos(4t)} + \yh{c_2\sin(4t)}. The trig family Asin⁡(4t)+Bcos⁡(4t)\forced{A\sin(4t) + B\cos(4t)} overlaps yh\yh{y_h} and gets multiplied by tt, whereas Ce4t\forced{Ce^{4t}} does not overlap yh\yh{y_h} (watch out for multiplying the entire right-hand side guess by tt, which gives the wrong answer yp=t(Asin⁡(4t)+Bcos⁡(4t)+Ce4t)y_p = t(A\sin(4t) + B\cos(4t) + Ce^{4t})).
Answeryp=t(Asin⁡(4t)+Bcos⁡(4t))+Ce4t\forced{y_p} = t(A\sin(4t) + B\cos(4t)) + Ce^{4t}
8

Write the form of the particular solution yp\forced{y_p} (do not solve for the coefficients) for y′′−5y′=4t2\ddy{y''} - \dy{5y'} = \forced{4t^2}.

Notice that the y\yy{y} term is missing on the left side. What does that put inside yh\yh{y_h}?

Solving r2−5r=r(r−5)=0r^2 - 5r = r(r - 5) = 0 gives r=0,5r = 0, 5, so yh=c1+c2e5t\yh{y_h} = \yh{c_1} + \yh{c_2 e^{5t}}. The constant C\forced{C} at the end of the normal polynomial guess At2+Bt+C\forced{At^2 + Bt + C} overlaps c1\yh{c_1} in yh\yh{y_h}, so the entire polynomial family must be multiplied by tt (missing the r=0r = 0 overlap leaves the wrong answer yp=At2+Bt+Cy_p = At^2 + Bt + C).
Answeryp=t(At2+Bt+C)=At3+Bt2+Ct\forced{y_p} = t(At^2 + Bt + C) = At^3 + Bt^2 + Ct
9

Write the form of the particular solution yp\forced{y_p} (do not solve for the coefficients) for y′′+4y′+4y=t2e−2t\ddy{y''} + \dy{4y'} + \yy{4y} = \forced{t^2 e^{-2t}}.

Factor the characteristic equation to find yh\yh{y_h}, then check whether multiplying the normal family for t2e−2t\forced{t^2 e^{-2t}} by a single tt is enough to remove every overlapping term.

Solving r2+4r+4=(r+2)2=0r^2 + 4r + 4 = (r + 2)^2 = 0 gives a repeated root r=−2,−2r = -2, -2, so yh=c1e−2t+c2te−2t\yh{y_h} = \yh{c_1 e^{-2t}} + \yh{c_2 te^{-2t}}. Starting from the normal family (At2+Bt+C)e−2t\forced{(At^2 + Bt + C)e^{-2t}}, multiplying by a single tt still leaves Cte−2t\forced{C}t\forced{e^{-2t}} overlapping c2te−2t\yh{c_2 te^{-2t}} (stopping at a single tt gives the wrong answer yp=t(At2+Bt+C)e−2ty_p = t(At^2 + Bt + C)e^{-2t}), so we must multiply the entire family by t2t^2.
Answeryp=t2(At2+Bt+C)e−2t=(At4+Bt3+Ct2)e−2t\forced{y_p} = t^2(At^2 + Bt + C)e^{-2t} = (At^4 + Bt^3 + Ct^2)e^{-2t}
10

Solve the initial value problem y′′+4y′+3y=8et\ddy{y''} + \dy{4y'} + \yy{3y} = \forced{8e^t}, y(0)=2\yy{y(0)} = 2, y′(0)=2\dy{y'(0)} = 2.

Find yh\yh{y_h} and yp\forced{y_p} first, and wait until they are added together before plugging in y(0)=2\yy{y(0)} = 2 and y′(0)=2\dy{y'(0)} = 2.

From r2+4r+3=(r+1)(r+3)=0r^2 + 4r + 3 = (r + 1)(r + 3) = 0, we have yh=c1e−t+c2e−3t\yh{y_h} = \yh{c_1 e^{-t}} + \yh{c_2 e^{-3t}}. Guessing yp=Aet\forced{y_p} = \forced{Ae^t} gives (1+4+3)Aet=8et  ⟹  A=1(\ddy{1} + \dy{4} + \yy{3})Ae^t = \forced{8e^t} \implies A = 1, so yp=et\forced{y_p} = e^t. Write the full solution and its derivative before using the initial conditions (plugging y(0)=2y(0) = 2 and y′(0)=2y'(0) = 2 into yhy_h alone ignores the height and slope of et\forced{e^t} at t=0t = 0, giving c1=4,c2=−2c_1 = 4, c_2 = -2 and the wrong answer y(t)=4e−t−2e−3t+ety(t) = 4e^{-t} - 2e^{-3t} + e^t):
y(t)=c1e−t+c2e−3t+et  ⟹  y(0)=c1+c2+1=2  ⟹  c1+c2=1y′(t)=−c1e−t−3c2e−3t+et  ⟹  y′(0)=−c1−3c2+1=2  ⟹  −c1−3c2=1\displaystyle \begin{aligned} \yy{y(t)} &= \yh{c_1 e^{-t}} + \yh{c_2 e^{-3t}} + \forced{e^t} \implies \yy{y(0)} = c_1 + c_2 + \forced{1} = 2 \implies c_1 + c_2 = 1 \\ \dy{y'(t)} &= \yh{-c_1 e^{-t}} - \yh{3c_2 e^{-3t}} + \forced{e^t} \implies \dy{y'(0)} = -c_1 - 3c_2 + \forced{1} = 2 \implies -c_1 - 3c_2 = 1 \end{aligned}
Adding the two equations gives −2c2=2  ⟹  c2=−1-2c_2 = 2 \implies c_2 = -1 and c1=2c_1 = 2.
Answery(t)=2e−t−e−3t+et\yy{y(t)} = 2e^{-t} - e^{-3t} + e^t