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 that satisfies
y′′+3y′+2y=24e2t
Because the left side only takes derivatives of y, multiplies them by constants, and adds them together, the function we plug in must differentiate into e2t. Since e2t is the only function whose derivatives are multiples of e2t, we already know the shape of the answer and just need to find the multiplier in front.
Educated Guessing for Exponentials
Text solution
Guess a multiple of e2t and differentiate twiceWe put an unknown multiplier A in front of e2t and take the first and second derivatives so we can plug them into the left side.
y=Ae2t,y′=2Ae2t,y′′=4Ae2t
Substitute into the equation and match the multiplierEvery term on the left has Ae2t in common, so we can add them up and set the total multiplier equal to 24.
Putting A=2 back into our guess gives the solution (the subscript p just marks it as a single function that produces the right-hand side, rather than a family with arbitrary constants):
particular solutionyp=2e2t
So yp=2e2t is the specific function whose derivatives combine on the left side to leave 24e2t.
2
Polynomials and Derivative Families
Now let's change the right side to a polynomial and find a particular solution to
y′′+3y′+2y=4t2
Unlike e2t, differentiating t2 lowers the power to 2t and then 2. If we only guess At2, its derivatives will leave extra t and constant terms on the left side with nothing there to cancel them.
Polynomials and Derivative Families
y′′+3y′+2yyp=4t2=?
Text solution
Guess the full polynomial family down to the constantWe include Bt and C alongside At2 so they can cancel the lower powers of t that come out when At2 is differentiated.
y=At2+Bt+C,y′=2At+B,y′′=2A
Substitute into the left side and group by powers of tCollecting the t2,t, and constant terms into separate groups lets us match each power against the right side 4t2+0t+0.
Solve for A,B, and C from the highest power downFinding A from the t2 terms first tells us what t term A leaves behind for B to cancel, which then tells us what constant term A and B leave behind for C to cancel.
Putting A=2,B=−6, and C=7 into our guess gives the particular solution:
yp=2t2−6t+7
So 2t2 produces the 4t2 on the right side, while −6t+7 cancels the extra t and constant terms that 2t2 leaves behind in 3y′ and y′′.
3
Sines and Cosines
Next, let's put a trigonometric function on the right side:
y′′+3y′+2y=10sin(t)
As soon as sin(t) goes through the first derivative 3y′, it turns into cos(t), so our guess needs both functions from the sine-and-cosine derivative family.
Sines and Cosines
y′′+3y′+2yyp=10sin(t)=?
Text solution
Guess both sin(t) and 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.
Substitute into the left side and group the sin(t) and cos(t) termsSeparating the sines from the cosines shows how A and B combine across the derivatives.
Putting A=1 and B=−3 into our guess gives the particular solution:
yp=sin(t)−3cos(t)
So sin(t)−3cos(t) is the combination of sine and cosine whose cosine pieces cancel out across y′′+3y′+2y while its sine pieces add up to 10sin(t).
Because the first derivative 3y′ turns sin(t) into cos(t), a pure sine can never produce a pure sine on the right side by itself. Including −3cos(t) in yp cancels that extra cosine so only 10sin(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=36tet
Because t and et are multiplied together, differentiating tet uses the product rule: differentiating et keeps tet, while differentiating t into 1 brings out a plain et.
Products of Functions
y′′+3y′+2yyp=36tet=?
Text solution
Multiply the polynomial family by et and differentiateMultiplying At+B by et gives us Bet to cancel the plain et terms that come out of the product rule.
Putting A=6 and B=−5 into our guess gives the particular solution:
yp=(6t−5)et
So 6tet produces the 36tet on the right side, while −5et cancels the plain et 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)
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
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 t1,ln(t),tan(t), or sec(t) create a new kind of term every time you differentiate them:
t1→−t21→t32→−t46→⋯
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=5e−t
To see why, look first at the homogeneous equation y′′+3y′+2y=0, which tells us which functions the left side turns into 0.
When the Guess Overlaps the Homogeneous Solution
y′′+3y′+2yyp=5e−t=?
Because the left side turns yh into 0, adding yh to any particular solution yp 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=yh (turns into 0)c1e−t+c2e−2t+makes the right sideyp
When the right side of y′′+3y′+2y=5e−t is 5e−t, our normal guess Ae−t is already part of yh, so the left side turns it into 0 before we can solve for A.
Text solution
Multiply the overlapping guess by t and differentiateGuessing y=Ate−t brings in the product rule, which produces plain e−t terms whenever t is differentiated into 1.
yy′y′′=Ate−t=−Ate−t+Ae−t=Ate−t−2Ae−t
Substitute into the left side and group the te−t and e−t termsAll the te−t terms cancel out to 0 for the same reason e−t did, leaving only the e−t terms from the product rule to match 5e−t.
Putting A=5 into our modified guess gives the particular solution:
yp=5te−t
So when we plug 5te−t into the left side, its te−t pieces cancel out to 0, while the extra terms from the product rule leave the 5e−t we needed.
At the homogeneous roots r=−1 and r=−2, the left side turns ert into 0. Multiplying by t fixes that: the tert pieces still cancel to 0, leaving behind the plain ert 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 without solving for the constants, which tests whether you can spot hidden overlaps between a derivative family and yh.
Four Classic Overlap Traps
y′′+3y′+2y=24e2t+5e−t
yhyp=c1e−t+c2e−2t=?
Here is how the overlap rule works in four common situations:
A sum of separate families on the right side (y′′+3y′+2y=24e2t+5e−t, where yh=c1e−t+c2e−2t). Check each family against yh on its own so that only the overlapping family gets multiplied by t.
yp=Ae2t+Bte−t
A missing y term on the left side (y′′+3y′=4t2, where r2+3r=0⟹yh=c1+c2e−3t). Because a constant c1 is part of yh, the +C at the end of the polynomial family At2+Bt+C gets turned into 0. Multiply the entire polynomial family by t (multiplying only C by t would just combine Bt+Ct into a single t term).
yp=t(At2+Bt+C)=At3+Bt2+Ct
Matching sine and cosine frequency (y′′+9y=cos(3t), where r2+9=0⟹yh=c1cos(3t)+c2sin(3t)). Both terms in the trig family match yh, so the whole pair gets multiplied by t.
yp=t(Asin(3t)+Bcos(3t))
Overlap at the bottom of a product family (y′′+3y′+2y=t2e−t, where yh=c1e−t+c2e−2t). Even though t2e−t is not in yh, its derivative family (At2+Bt+C)e−t includes Ce−t at the end, which overlaps c1e−t. Multiply the whole family by t, or by t2 if r=−1 is a repeated root (y′′+2y′+y=t2e−t, where yh=c1e−t+c2te−t):
Finally, we want to find the specific solution curve that passes through a given starting height and starting slope:
y′′+3y′+2yy(0)y′(0)=6et,=1,=0
To find the constants c1 and c2, we have to wait until we have found yp and put together the full curve y(t)=yh+yp, because yp adds its own height and slope at t=0.
Initial Value Problems and the Full Game Plan
y′′+3y′+2yy(0)y′(0)y(t)=6et=1=0=?
Text solution
Find yh first and leave c1 and c2 unsolvedSetting the right side to 0 gives the homogeneous solution so we can check our guess for yp.
r2+3r+2=0⟹r=−1,−2⟹yh=c1e−t+c2e−2t
Guess yp and solve for its undetermined coefficientSince Aet does not overlap e−t or e−2t in yh, we plug yp=Aet and its derivatives straight into the left side.
Combine y(t)=yh+yp and differentiate the total solutionWe need both the full function y(t) and its derivative y′(t) before plugging in t=0.
y(t)y′(t)=c1e−t+c2e−2t+et=−c1e−t−2c2e−2t+et
Plug in the initial conditions at t=0 to solve for c1 and c2Because e0=1, the particular solution et already adds 1 to both the starting height and the starting slope.
Putting c1=−1 and c2=1 into y(t) gives the exact solution curve:
y(t)=−e−t+e−2t+et
So y(t)=−e−t+e−2t+et satisfies the differential equation while starting at height 1 with slope 0 at t=0.
Because the initial conditions apply to the total curve y(t)=yh(t)+yp(t),yh(t) has to adjust to make up for whatever height and slope yp(t) already has at t=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) or the right side has a function whose derivatives never stay inside a finite family (like t1,ln(t),tan(t), or 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 first by setting the right side to 0
For y′′+3y′+2y=0, solving r2+3r+2=0 gives yh=c1e−t+c2e−2t. Leave c1 and c2 alone for now; write yh down first so you can spot overlaps.
Write the full derivative family for yp
Include every term that will come out when you differentiate:
For products of these functions, multiply their families together (for 36tet, guess (At+B)et).
Check each family against yh for overlap
If any piece inside a guessed family matches a term in yh, multiply that entire family by t, or by t2 for a repeated root, until no piece overlaps yh (for y′′+3y′+2y=t2e−t, the Ce−t term inside (At2+Bt+C)e−t matches c1e−t, so the guess becomes t(At2+Bt+C)e−t).
Find A,B,C first, then use initial conditions on y(t)=yh+yp last
Differentiate yp, substitute into the left side, and match like terms to find the undetermined coefficients. Only after writing the complete sum y(t)=yh+yp do you plug in y(0) and y′(0) to find c1 and c2.
9
Practice
1
Find a particular solution yp to y′′−y′−6y=18e4t.
What happens to e4t each time you differentiate it, and is e4t part of yh?
The characteristic equation r2−r−6=(r−3)(r+2)=0 gives yh=c1e3t+c2e−2t, so our guess yp=Ae4t does not overlap yh. Differentiating gives yp′=4Ae4t and yp′′=16Ae4t (watch out for forgetting the second chain-rule factor of 4 and writing yp′′=4Ae4t, which leads to −6A=18 and the wrong answer yp=−3e4t). Substituting into the left side gives:
(16−4−6)Ae4t=18e4t⟹6A=18⟹A=3
Answeryp=3e4t
2
Find a particular solution yp to y′′+2y′+y=2t2.
Which lower powers of t will come out when you differentiate t2?
Guess the full polynomial family yp=At2+Bt+C (guessing only At2 leaves 4At+2A uncancelled and gives the wrong answer yp=2t2). With yp′=2At+B and yp′′=2A, substituting into y′′+2y′+y=2t2 gives:
At2+(4A+B)t+(2A+2B+C)=2t2+0t+0
Matching powers from highest to lowest gives A=2, then 4(2)+B=0⟹B=−8, and finally 2(2)+2(−8)+C=0⟹C=12 (be careful not to drop the factor of 2 on 2B from 2y′, which gives 4−8+C=0 and the wrong answer yp=2t2−8t+4).
Answeryp=2t2−8t+12
3
Find a particular solution yp to y′′+y′−2y=10cos(t).
Differentiating cos(t) inside y′ creates a sin(t) term. What other function must you include with cos(t) in your guess?
Guess both sin(t) and cos(t):yp=Asin(t)+Bcos(t), with yp′=Acos(t)−Bsin(t) and yp′′=−Asin(t)−Bcos(t) (watch the minus sign on −Bsin(t) in yp′; flipping it to +Bsin(t) gives B=3A instead of B=−3A). Substituting into y′′+y′−2y=10cos(t) gives:
(−3A−B)sin(t)+(A−3B)cos(t)=0sin(t)+10cos(t)
From the sine terms, −3A−B=0⟹B=−3A. Substituting into the cosine equation gives A−3(−3A)=10⟹10A=10⟹A=1 and B=−3.
Answeryp=sin(t)−3cos(t)
4
Find a particular solution yp to y′′−y′−2y=12tet.
When you differentiate tet with the product rule, what extra term comes out besides tet?
Since r2−r−2=(r−2)(r+1)=0,et does not overlap yh. Multiply the full polynomial family for t by et:yp=(At+B)et=Atet+Bet (leaving off +Bet leaves nothing to cancel the et term from the product rule and gives the wrong answer yp=−6tet). Differentiating gives yp′=Atet+(A+B)et and yp′′=Atet+(2A+B)et. Substituting into y′′−y′−2y=12tet gives:
−2Atet+(A−2B)et=12tet+0et
Matching the tet and et terms gives −2A=12⟹A=−6, and −6−2B=0⟹B=−3.
Answeryp=(−6t−3)et
5
Which of the equations (a) y′′+4y′+5y=e−tcos(2t), (b) y′′+4y′+5y=ln(t), and (c) ty′′+y′+y=et 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 et has a finite derivative family, while overlooking the variable t multiplying y′′ in (c)).
AnswerOnly (a) can be solved by Undetermined Coefficients, using the guess yp=e−t(Asin(2t)+Bcos(2t)). Equation (b) fails because the derivatives of 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.
Find yh first. Does your normal guess for 6e3t appear inside yh?
From r2−4r+3=(r−1)(r−3)=0, we get yh=c1et+c2e3t. Because Ae3t overlaps c2e3t, multiply by t to guess yp=Ate3t. Differentiating gives yp′=3Ate3t+Ae3t and yp′′=9Ate3t+6Ae3t (forgetting the chain-rule factor of 3 on the Ae3t term and writing yp′′=9Ate3t+2Ae3t leads to −2A=6 and the wrong answer y(t)=c1et+c2e3t−3te3t). Substituting into y′′−4y′+3y=6e3t gives:
(9−12+3)Ate3t+(6−4)Ae3t=6e3t⟹2Ae3t=6e3t⟹A=3
Adding yh and yp=3te3t gives the general solution.
Answery(t)=c1et+c2e3t+3te3t
7
Write the form of the particular solution yp (do not solve for the coefficients) for y′′+16y=sin(4t)+e4t.
Compare the two separate families on the right side against yh. Which one matches yh?
Solving r2+16=0 gives r=±4i, so yh=c1cos(4t)+c2sin(4t). The trig family Asin(4t)+Bcos(4t) overlaps yh and gets multiplied by t, whereas Ce4t does not overlap yh (watch out for multiplying the entire right-hand side guess by t, which gives the wrong answer yp=t(Asin(4t)+Bcos(4t)+Ce4t)).
Answeryp=t(Asin(4t)+Bcos(4t))+Ce4t
8
Write the form of the particular solution yp (do not solve for the coefficients) for y′′−5y′=4t2.
The constant C at the end of the normal polynomial guess At2+Bt+C overlaps c1 in yh, so the entire polynomial family must be multiplied by t (missing the r=0 overlap leaves the wrong answer yp=At2+Bt+C).
Notice that the y term is missing on the left side. What does that put inside yh?
Solving r2−5r=r(r−5)=0 gives r=0,5, so yh=c1+c2e5t. The constant C at the end of the normal polynomial guess At2+Bt+C overlaps c1 in yh, so the entire polynomial family must be multiplied by t (missing the r=0 overlap leaves the wrong answer yp=At2+Bt+C).
Answeryp=t(At2+Bt+C)=At3+Bt2+Ct
9
Write the form of the particular solution yp (do not solve for the coefficients) for y′′+4y′+4y=t2e−2t.
Starting from the normal family (At2+Bt+C)e−2t, multiplying by a single t still leaves Cte−2t overlapping c2te−2t (stopping at a single t gives the wrong answer yp=t(At2+Bt+C)e−2t), so we must multiply the entire family by t2.
Factor the characteristic equation to find yh, then check whether multiplying the normal family for t2e−2t by a single t is enough to remove every overlapping term.
Solving r2+4r+4=(r+2)2=0 gives a repeated root r=−2,−2, so yh=c1e−2t+c2te−2t. Starting from the normal family (At2+Bt+C)e−2t, multiplying by a single t still leaves Cte−2t overlapping c2te−2t (stopping at a single t gives the wrong answer yp=t(At2+Bt+C)e−2t), so we must multiply the entire family by t2.
Answeryp=t2(At2+Bt+C)e−2t=(At4+Bt3+Ct2)e−2t
10
Solve the initial value problem y′′+4y′+3y=8et,y(0)=2,y′(0)=2.
Find yh and yp first, and wait until they are added together before plugging in y(0)=2 and y′(0)=2.
From r2+4r+3=(r+1)(r+3)=0, we have yh=c1e−t+c2e−3t. Guessing yp=Aet gives (1+4+3)Aet=8et⟹A=1, so yp=et. Write the full solution and its derivative before using the initial conditions (plugging y(0)=2 and y′(0)=2 into yh alone ignores the height and slope of et at t=0, giving c1=4,c2=−2 and the wrong answer y(t)=4e−t−2e−3t+et):