Differential Equations › Section C · Second order differential equations › Topic C.9

Undetermined coefficients

For the inputs met most often in practice, such as constants, polynomials, exponentials, sines and cosines, a particular solution can be found by an educated guess with unknown coefficients. The method is quick and purely algebraic, as long as you know what to guess and when to adjust it.

Guessing with a purpose

The topic "Nonhomogeneous equations" showed that the general solution of \(ay'' + by' + cy = g(t)\) is \(y_c + y_p\), but left open how to find \(y_p\). The method of undetermined coefficients rests on one observation: for certain inputs, differentiating never leaves the family of functions you started with. The derivatives of \(e^{2t}\) are multiples of \(e^{2t}\); the derivatives of \(\cos 3t\) are combinations of \(\cos 3t\) and \(\sin 3t\); the derivatives of a quadratic are polynomials of lower degree. So guess a \(y_p\) of the same form as \(g\), with unknown coefficients, substitute it, and choose the coefficients to make both sides match.

When the method works

Two conditions are needed. The equation must have constant coefficients, and \(g(t)\) must be built from polynomials, exponentials \(e^{at}\), and \(\cos\beta t\) or \(\sin\beta t\), through sums and products. Inputs such as \(\tan t\), \(\frac{1}{t}\) or \(\ln t\) are out of reach, because their derivatives keep producing new kinds of function, so no finite guess can close up. For those, the next topic, "Variation of parameters", provides a method that always applies. Before guessing, always find \(y_c\) first; you will need it to check the guess, as the card on the modification rule explains.

The basic guesses

For \(g = ke^{at}\), guess \(Ae^{at}\). For \(g = k\cos\beta t\), or \(k\sin\beta t\), or any combination of the two, guess \(A\cos\beta t + B\sin\beta t\), always with both terms, because differentiating turns each into the other. For a polynomial of degree \(n\), guess a complete polynomial of degree \(n\), \(A_nt^n + \dots + A_1t + A_0\), including every lower power even if \(g\) lacks some of them. A constant counts as a polynomial of degree 0. For example, for \(y'' - 2y' - 3y = 6e^{2t}\), the guess \(Ae^{2t}\) gives \((4A - 4A - 3A)e^{2t} = 6e^{2t}\), so \(A = -2\) and \(y_p = -2e^{2t}\).

Worked example: a cosine input

Find \(y_p\) for \(y'' + 3y' + 2y = 10\cos t\). 1. Here \(y_c = c_1e^{-t} + c_2e^{-2t}\), with no sines or cosines. 2. Guess \(y_p = A\cos t + B\sin t\), so \(y_p' = -A\sin t + B\cos t\) and \(y_p'' = -A\cos t - B\sin t\). 3. Collect: the \(\cos t\) terms give \(-A + 3B + 2A = A + 3B\), and the \(\sin t\) terms give \(-B - 3A + 2B = B - 3A\). 4. Match: \(A + 3B = 10\) and \(B - 3A = 0\). 5. So \(B = 3A\), then \(10A = 10\), giving \(A = 1\) and \(B = 3\). 6. Answer: \(y_p = \cos t + 3\sin t\). The input had no sine, yet the answer needs one, so both terms belong in the guess.

Worked example: a polynomial input

Find \(y_p\) for \(y'' - y' - 2y = 4t^2\). 1. The input has degree 2, so guess \(y_p = At^2 + Bt + C\), with \(y_p' = 2At + B\) and \(y_p'' = 2A\). 2. Substitute:

2A - (2At + B) - 2(At^2 + Bt + C) = 4t^2

3. Match powers of \(t\). For \(t^2\): \(-2A = 4\), so \(A = -2\). For \(t\): \(-2A - 2B = 0\), so \(B = 2\). For the constant: \(2A - B - 2C = 0\), so \(-6 = 2C\) and \(C = -3\). 4. Answer: \(y_p = -2t^2 + 2t - 3\). 5. Check:

-4 - (-4t + 2) - 2(-2t^2 + 2t - 3) = 4t^2

Leaving out \(Bt + C\) would have made step 3 impossible to satisfy.

When the guess fails: the modification rule

Try \(Ae^{2t}\) for \(y'' - y' - 2y = 6e^{2t}\). The roots of \(r^2 - r - 2\) are 2 and \(-1\), so \(e^{2t}\) already solves the homogeneous equation, and substituting gives \(0 = 6e^{2t}\), which no \(A\) can fix. The cure is the modification rule: if any term of your guess appears in \(y_c\), multiply the whole guess, or the whole group of terms that came from that piece of \(g\), by \(t\). If a term still appears in \(y_c\), as happens with a repeated root, multiply by \(t\) again. Never multiply by more powers of \(t\) than you need; for a second order equation, \(t^2\) is the most that is ever needed.

Worked example: an input that matches y_c

Find \(y_p\) for \(y'' - y' - 2y = 6e^{2t}\). 1. Since \(e^{2t}\) is in \(y_c = c_1e^{2t} + c_2e^{-t}\), guess \(y_p = Ate^{2t}\). 2. Product rule: \(y_p' = A(1 + 2t)e^{2t}\) and \(y_p'' = A(4 + 4t)e^{2t}\). 3. Substitute:

Ae^{2t}\big[(4 + 4t) - (1 + 2t) - 2t\big] = 3Ae^{2t}

The \(t\) terms cancel, as they must. 4. So \(3A = 6\) and \(A = 2\), giving \(y_p = 2te^{2t}\). 5. The general solution is \(y = c_1e^{2t} + c_2e^{-t} + 2te^{2t}\). With a repeated root the same reasoning needs \(t^2\): for \(y'' - 4y' + 4y = e^{2t}\), both \(e^{2t}\) and \(te^{2t}\) are in \(y_c\), and \(y_p = \frac{1}{2}t^2e^{2t}\).

Products and sums

For a product, multiply the guesses together, keeping one unknown for every distinct term. A polynomial times an exponential, such as \(te^{-t}\), needs \((At + B)e^{-t}\). An exponential times a sine or cosine, such as \(e^t\cos 2t\), needs \(e^t(A\cos 2t + B\sin 2t)\). A polynomial times a trigonometric function, such as \(t\sin t\), needs \((At + B)\cos t + (Ct + D)\sin t\), with separate polynomials for cosine and sine. For a sum of different kinds of input, treat each piece separately and add the results, as "Nonhomogeneous equations" showed, applying the modification rule to each piece on its own.

Worked example: writing the guess

Write, without solving, the guess for \(y'' + 4y = 3\sin 2t + te^t\). 1. Find \(y_c\): \(r = \pm 2i\), so \(y_c = c_1\cos 2t + c_2\sin 2t\). 2. The piece \(3\sin 2t\) suggests \(A\cos 2t + B\sin 2t\), but both terms are in \(y_c\), so multiply by \(t\): \(t(A\cos 2t + B\sin 2t)\). 3. The piece \(te^t\) suggests \((Ct + D)e^t\), and neither term is in \(y_c\), so it stays. 4. The full guess is

y_p = t(A\cos 2t + B\sin 2t) + (Ct + D)e^t

Solving gives \(A = -\frac{3}{4}\), \(B = 0\), \(C = \frac{1}{5}\) and \(D = -\frac{2}{25}\).

Common mistakes to avoid

First, guessing only \(A\cos\beta t\) for a cosine input; the sine partner is almost always needed. Second, leaving out lower powers in a polynomial guess. Third, skipping \(y_c\) and so missing the need for the modification rule, which shows up as an impossible equation like \(0 = 6e^{2t}\). Fourth, multiplying only part of a group by \(t\), such as \(At\cos 2t + B\sin 2t\). Fifth, using one shared unknown for terms that need their own, such as \(A(t + 1)e^{-t}\) instead of \((At + B)e^{-t}\).

Key takeaways

For constant coefficient equations with polynomial, exponential or sine and cosine inputs, guess \(y_p\) in the same form with unknown coefficients and match terms. Always include both cosine and sine, and full polynomials. Find \(y_c\) first: if a guess term appears in it, multiply that group by \(t\), or by \(t^2\) for a repeated root. Products get product guesses, and sums are handled piece by piece. Other inputs need variation of parameters.

Flashcards

Flashcard

Undetermined coefficients

Guess y_p in the form of g(t) with unknown coefficients

Then substitute and match terms.

Test your understanding

Question 1 of 5

What is the correct form of guess for y_p in y″ + y = 4 cos 3t?

Question 2 of 5

What is the correct form of guess for y_p in y″ − 5y′ + 6y = 7e^(3t)?

Question 3 of 5

What is a particular solution of y″ + 4y = 8e^(2t)?

Question 4 of 5

What is a particular solution of y″ + 2y′ + y = 3t?

Question 5 of 5

What is the correct form of guess for y_p in y″ − 4y′ + 4y = e^(2t)?

← Previous topicNext topic →