Method of Undetermined Coefficients
Suppose a mass on a spring is pushed not just by its own restoring force. An external engine also produces a force, like , , or . The homogeneous theory tells us how the system moves on its own. But it says nothing about how it responds to such a push. We need one function that satisfies the full, forced equation. This is called a particular solution. We then add it to the general homogeneous solution to get everything. This matters because forced linear systems are everywhere. Examples include driven oscillators, RLC circuits with an applied voltage, and population models with constant immigration. The Method of Undetermined Coefficients is the fastest tool for finding a particular solution. It works when the forcing term is a polynomial, exponential, sine, cosine, or a product/sum of these. These are the same family of functions that keeps reproducing itself under differentiation. Rather than integrating (as Variation of Parameters does), we guess the shape of the answer up to unknown constants. We then plug into the equation, and solve for those constants by matching coefficients. The big picture is a bridge between algebra and analysis. Differentiating a polynomial, exponential, or sinusoid returns a function in the same finite-dimensional family. This closure property is exactly what makes "guess and match" work. It is also exactly why the method fails for forcing terms like or . Their derivatives escape any finite family. Building on Complex and Repeated Roots for the homogeneous side, this article develops the method rigorously. It states the precise dictionary of guesses. It proves why the method succeeds via a clean superposition and derivative-closure argument. It handles the delicate resonance case when the guess overlaps a homogeneous solution. And it works two nontrivial examples end to end. By the end, you will be able to write down the correct trial form for any admissible forcing term. You will be able to justify the "multiply by " fix for resonance. And you will know precisely when the method must be abandoned in favor of Variation of Parameters.
- Solves by guessing in the same "family" as , with unknown coefficients to be found.
- Works only for built from polynomials, exponentials , and sinusoids (and their products/sums).
- If the naive guess solves the homogeneous equation, multiply it by , where is the smallest power making the guess independent of the homogeneous solution.
- Superposition splits multi-term forcing into separate, simpler subproblems solved and then summed.
- The general solution is always , combining Complex and Repeated Roots with the particular piece found here.
- Key idea: differentiation keeps polynomials, exponentials, and sinusoids inside a fixed finite-dimensional function family, so a finite guess with unknown coefficients can absorb the forcing exactly.
Where this lives today
Driven mechanical and electrical oscillators — a mass-spring-damper system pushed by a periodic force, or an RLC circuit driven by an AC voltage source — are modeled by exactly the constant-coefficient linear ODEs this method solves, with typically or a polynomial ramp. Control engineers use the method to find steady-state responses to step, ramp, and sinusoidal reference inputs before layering on feedback design. In signal processing, the particular solution corresponding to a sinusoidal input directly yields the system's frequency response (magnitude and phase shift), the starting point for Bode-plot analysis. The resonance case — multiplying the guess by or — is the mathematical explanation for the amplitude blow-up (or linear-in- growth) seen when a forcing frequency matches a natural frequency, a phenomenon engineers must actively design around in bridges, buildings, and RF circuits. In numerical analysis and computer algebra systems, symbolic solvers implement this exact case analysis (checking root multiplicities against ) as a fast, closed-form alternative to numerically integrating the Variation of Parameters formula whenever the forcing term matches the polynomial-exponential-sinusoidal pattern.
Ask the tutor: How does the resonance case ( or ) connect to the repeated-root case in Complex and Repeated Roots, and why does multiplying by "fix" both problems in the same algebraic way?
Consider the linear, constant-coefficient, second-order ODE
where is a finite sum of terms of the form
with a polynomial of degree and constants (the case recovers pure exponentials and polynomials). The method of undetermined coefficients seeks a particular solution by positing a trial function of the same exponential-polynomial-sinusoidal type as , with unspecified coefficients, then substituting into the differential equation and solving the resulting linear algebraic system for those coefficients. If the naive trial form contains a term that is already a solution of the associated homogeneous equation , the entire trial function is multiplied by , where is the smallest nonnegative integer making the trial function linearly independent from every term in the homogeneous solution . The method applies term-by-term to sums via superposition: solve for each separately to get , and set .
Intuition
Think of differentiation as an operator acting on a "library" of function shapes. If , its derivatives are , , — all polynomials of degree . If , every derivative is a constant multiple of itself. If , differentiating cycles you between and and back, never producing anything new. In each case, the set of functions reachable by repeated differentiation is finite-dimensional — spanned by a small, fixed list of building blocks. This is the entire mechanism of the method. Since is a linear combination of and its derivatives, if we choose from the same finite-dimensional family as , then the left side automatically lands back in that family too. Matching it to becomes solving a small linear system for the unknown coefficients — no integration required. The one subtlety is resonance: if our guessed family already contains a homogeneous solution, the substitution collapses to for that piece, so we shift the family up by multiplying by (or ) to break the coincidence, exactly as one uses an extra factor of for repeated roots in Complex and Repeated Roots.
Let with , and let the characteristic polynomial be . Let , let be an integer, and let or where has degree (if , take only the cosine case, i.e. ). Define to be the multiplicity of as a root of (so for this second-order equation, with meaning is not a root). Then there exist polynomials , each of degree at most , such that
is a solution of .
We use the method of undetermined coefficients via complexification, which converts the trigonometric case into the exponential case, and then a direct computation for the exponential case using the structure of .
Step 1: Reduction to the complex exponential case. Write . Since
both and can be recovered as the real and imaginary parts of :
Since are real, if (with real-valued) satisfies
then equating real and imaginary parts (using that differentiation and the real linear combination commute with taking real/imaginary parts) gives
So it suffices to solve the single complex equation and then take real and imaginary parts; this handles both sinusoidal cases (and the pure polynomial/exponential case is the sub-case , real, where we work directly with real ).
Step 2: Solving . Try where is an undetermined polynomial of degree and is the multiplicity of as a root of . Substitute into the left side. Using the product rule repeatedly (or the identity below), one computes directly that for any smooth function ,
where and . This identity follows by direct expansion: with ,
so
confirming the claimed identity. Now set , a polynomial of degree . We consider the three cases dictated by . Case ( not a root, so ). Then , a degree- polynomial, and we need
Write . Because , the coefficient of on the left is (the terms and contribute only degree and respectively), so matching the coefficient of determines uniquely. Having fixed , the coefficient of on the left is , again solvable uniquely for since . Proceeding downward by finite induction on the degree , every is uniquely determined. Thus a polynomial of degree exactly (matching ) exists solving the equation, and works. Case ( a simple root: , ). Then , degree , and , . The equation becomes, using ,
i.e.
Collect by degree: the highest-degree term of appearing multiplied by is , whose leading contribution to degree comes from the degree- coefficient of times , and since this again allows solving degree-by-degree from top to bottom for the coefficients of (an ordinary linear triangular system with nonzero diagonal entries ), exactly as in Case but shifted by one derivative. A polynomial of degree exists and is unique. Then solves the equation. Case ( a double root: and , which for a monic-normalized real quadratic forces and ). Then , and . Since , the equation collapses to
Here the coefficient of on the left, from the term (since and only reach degree via lower coefficients of multiplied up — more precisely by matching top degree : is the only degree- contribution from , while contributes at degree only through via , and contributes from the term of as well; summing, the coefficient of on the left is ), and since and , this determines uniquely. As in the previous cases, proceeding by finite downward induction on degree, since the coefficient multiplying at each stage is , every coefficient of is uniquely determined. So a degree- polynomial exists, and solves the equation.
Step 3: Assembling the real solution. In all cases we have produced solving , with a (complex, in general) polynomial of degree . Write with real polynomials of degree (degree exactly is not needed for the real decomposition to work — only for itself). Then
By Step 1, solves , and solves . Relabeling as the new (or renaming appropriately in the sine case), each of and has exactly the claimed form
with of degree at most . This is precisely the asserted for or respectively, completing the proof for a single term .
∎If with each of the admissible form in the theorem, and solves for each , then solves .
By linearity of the operator (immediate from linearity of differentiation),
Worked examples
Example 1 (polynomial forcing with resonance at a repeated root). Solve
The characteristic polynomial is , giving a repeated root (see Complex and Repeated Roots), so
Here is a polynomial (, degree ), and is not a root of since . So and we try
Then , . Substituting,
Matching coefficients:
- : .
- : .
- : .
So , and the general solution is
Apply initial conditions. . Differentiate:
At : .
Final answer:
Check at : ✓. And ✓.
Example 2 (exponential forcing that collides with a homogeneous root, i.e. true resonance). Solve
Characteristic polynomial , roots , so
Here has (real, so ), and is a simple root of (multiplicity ). The naive guess is a homogeneous solution and would give upon substitution — so we must multiply by :
Compute derivatives:
Substitute into :
Collect the bracket:
(The -terms cancel exactly, as they must — this is the algebraic signature that was a simple root, confirming was the right choice and not .) So .
Particular solution: , and the general solution is
As a check, differentiate directly: should equal ; substituting into gives ✓.
Consider
Here is not of the form or for any polynomial and constants : repeated differentiation of produces , then , and so on — an infinite, ever-growing family of distinct trigonometric-rational combinations, never closing up into a finite-dimensional span. There is no finite trial polynomial-exponential-sinusoidal ansatz whose derivatives could ever reproduce exactly, because has a pole at while every function of the admissible form is entire (analytic on all of , indeed all of ). Since is not even defined at , no finite linear combination of polynomials, exponentials, and sinusoids — all of which are smooth and bounded-order near any point — can equal it there or in its neighborhood. Undetermined coefficients gives no candidate ansatz at all; one must instead use Variation of Parameters, which handles arbitrary continuous forcing terms via an integral formula built from .
Scope, edge cases & common traps
| Situation | What to do |
|---|---|
| is a sum of admissible terms | Solve separately, superpose (Corollary above) |
| Guessed family overlaps | Multiply the entire trial function by ( or ) |
| has a product like | Use full ansatz with linear |
| Method inapplicable; use Variation of Parameters | |
| Coefficients of the ODE are not constant | Method inapplicable in general; requires constant coefficients |
| Forgetting to include both and in the guess even when has only | Always include both, since differentiation mixes them |
The mathematician behind it
Origins · 1 minLeonhard Euler and how this was discovered
Euler systematized the solution of linear differential equations with constant coefficients, introducing the characteristic-equation approach and studying particular solutions for polynomial and exponential forcing in the context of mechanics and astronomy. His prolific work across analysis, number theory, and mechanics laid the operational groundwork later formalized as the method of undetermined coefficients, which became a staple of engineering mathematics by the 19th and 20th centuries.
Why do we need to check whether the guess overlaps the homogeneous solution?
If the naive guess already satisfies , then substituting it into the full equation gives on the left, which can never equal a nonzero on the right — the coefficients would need to satisfy an impossible equation like . Multiplying by breaks this collision: as shown in the proof, the extra factor of changes the derivative structure so that the leading behavior of picks up a genuinely nonzero multiple of (via or depending on ), making the coefficient-matching system solvable. This is the same phenomenon as multiplying by for repeated characteristic roots.
Can the method handle forcing terms like t·e^(2t)·sin(3t)?
Yes — this is exactly the general product form covered by the theorem, with , , and (degree ). The trial solution is where are general linear polynomials and , and is the multiplicity of as a root of the characteristic polynomial (typically for a real characteristic equation, since is non-real and roots are either real or come in genuinely matching complex-conjugate pairs).
What if g(t) is a constant, like g(t) = 7?
Treat it as the degree-0 polynomial case: , . The trial solution is for a constant , where is the multiplicity of as a root of the characteristic polynomial. If in , then is not a root (), so and with . If (so is a root), you need ; this is the classic "forcing matches a constant homogeneous solution" resonance case.
How does this relate to variation of parameters?
Undetermined coefficients is a shortcut valid only for the specific finite family of forcing terms (polynomial × exponential × sinusoidal), while Variation of Parameters is a general method that works for any continuous forcing term, expressed via an integral formula built from two independent homogeneous solutions. When both apply, undetermined coefficients is usually much faster since it avoids integration entirely. When the forcing term is not of the admissible type — like , , or — only variation of parameters (or other techniques) applies.
Does the method work for higher-order linear equations, not just second order?
Yes, with the natural generalization: the multiplicity can now be any nonnegative integer up to the order of the equation, since a root of the characteristic polynomial of an th-order equation can have multiplicity up to . The trial-function dictionary (polynomial × exponential × sinusoidal, multiplied by ) is unchanged in spirit; only the bookkeeping for possible multiplicities grows, a topic developed further under Higher-Order Linear Equations.
What is the role of complex numbers in the proof, if the final answer is always real?
Complexification is a technical device that unifies the cosine and sine forcing cases into a single exponential computation. Writing lets us solve one complex equation instead of two separate real trigonometric computations. Because the coefficients are real, taking real and imaginary parts of the complex solution automatically yields two real solutions, one for cosine forcing and one for sine forcing — this trick, using Complex and Repeated Roots machinery, shortens the proof substantially without ever requiring a complex final answer.
Why must the entire trial function be multiplied by t^s, not just part of it?
The resonance issue arises from the exponential-times-polynomial structure as a whole colliding with a homogeneous solution, not from an isolated piece. If only part of the guess were multiplied by , the identity derived in the proof would not apply cleanly, since that identity depends on the entire factor being treated as a single polynomial multiplying . Multiplying only a subset of terms breaks the algebra needed to guarantee a nonzero leading coefficient in the matching system.