Diff. EquationsSecond-Order Linear Equations

Undetermined Coefficients

Guess a particular solution shaped like the forcing term.

Not started Jump to practice

To solve $ay'' + by' + cy = g(t)$ we need one particular solution $y_p$; then $y = y_p + y_h$ by superposition. When $g$ is a polynomial, an exponential, a sine or cosine, or a product of these, a good guess finds $y_p$ with simple algebra.

Key idea

Guess $y_p$ with the same shape as $g$, including every term that its derivatives produce, with unknown coefficients. If any term of the guess already solves the homogeneous equation, multiply the whole guess by $t$ (by $t^{2}$ for a double root). Substitute and match coefficients.
Then multiply by $t$ if a term solves the homogeneous equation.
Forcing $g(t)$Try $y_p$
$Ge^{kt}$$Ae^{kt}$
polynomial of degree $n$$A_nt^{n} + \dots + A_1t + A_0$
$G\cos\omega t$ or $G\sin\omega t$$A\cos\omega t + B\sin\omega t$
$e^{kt}\cos\omega t$$e^{kt}(A\cos\omega t + B\sin\omega t)$

Why it works

These families are closed under differentiation, so $L[\text{guess}]$ lands back in the same family and coefficients can be matched. For example $L[Ae^{kt}] = A(ak^{2} + bk + c)e^{kt}$ $= AP(k)e^{kt}$. That fails only when $P(k) = 0$, that is, when $k$ is a root and the guess is invisible to $L$. Then $L[Ate^{kt}] = AP'(k)e^{kt}$, which works when $k$ is a simple root.

Worked example: Exponential forcing

Find $y_p$ for $y'' - y' - 2y = 4e^{3t}$.
  1. Roots of $r^{2} - r - 2$: $2$ and $-1$; 3 is not a root, so try $Ae^{3t}$.
  2. $L[Ae^{3t}] = A(9 - 3 - 2)e^{3t}$ $= 4Ae^{3t}$.
  3. $4A = 4$, so $A = 1$.

Answer: $y_p = e^{3t}$

Worked example: Cosine forcing

Find $y_p$ for $y'' + 2y' + 5y = 10\cos t$.
  1. Try $y_p = A\cos t + B\sin t$: $y_p' = -A\sin t + B\cos t$, $y_p'' = -A\cos t - B\sin t$.
  2. Collect: $(4A + 2B)\cos t$ $+ (4B - 2A)\sin t$ $= 10\cos t$.
  3. So $4A + 2B = 10$ and $-2A + 4B = 0$: $A = 2$, $B = 1$.

Answer: $y_p = 2\cos t + \sin t$

Worked example: When the guess is already a solution

Find $y_p$ for $y'' - y' - 2y = 6e^{2t}$.
  1. $r = 2$ is a root, so $Ae^{2t}$ would give $L[Ae^{2t}] = 0$. Try $y_p = Ate^{2t}$.
  2. $y_p' = A(1 + 2t)e^{2t}$, $y_p'' = A(4 + 4t)e^{2t}$.
  3. $L[y_p]$ $= A[(4 + 4t) - (1 + 2t)$ $- 2t]e^{2t}$ $= 3Ae^{2t}$, so $3A = 6$.

Answer: $y_p = 2te^{2t}$

Common mistake

Guessing a term that already solves the homogeneous equation: for $y'' - y' - 2y = 6e^{2t}$, the guess $Ae^{2t}$ leads to $0 = 6e^{2t}$, which is impossible. Always find the homogeneous roots first and compare. Another slip: using only $A\cos\omega t$ when $g$ is a cosine; the derivative produces a sine, so the guess needs $B\sin\omega t$ too.
The solution of $y'' + 2y' + 5y = 10\cos t$ that starts at rest (solid) and the particular solution $2\cos t + \sin t$ (dashed). The homogeneous part dies out, so after a few seconds only $y_p$ is left: the steady response.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax Calculus Volume 3, 7.2 Nonhomogeneous Linear Equations
  • Paul's Online Math Notes, Differential Equations: Undetermined Coefficients
  • MIT OpenCourseWare 18.03SC Differential Equations (Fall 2011), Unit II: Second Order Constant Coefficient Linear Equations
@teddyrookbook GitHub