Undetermined Coefficients: Solve ODEs Step by Step
The method of undetermined coefficients finds a particular solution to a nonhomogeneous linear ODE with constant coefficients, like y″ + y′ − 2y = 6e^{2x}. When the right-hand side is a polynomial, exponential, sine, cosine, or a product of these, you guess a trial solution of the same family with unknown coefficients and solve for them.
This matters because real systems are driven: circuits have voltage sources, springs have external forces, and populations have harvesting. The homogeneous solution describes the system's natural behavior; undetermined coefficients quickly produce the forced response.
Key Concepts
- Particular solution. Any single solution yp of the nonhomogeneous equation; the general solution is yh + yp.
- Trial form. For RHS e^{ax}, try Ae^{ax}; for polynomials of degree n, try a degree-n polynomial; for sin/cos, try Acos + Bsin.
- Resonance (duplication). If the trial form overlaps the homogeneous solution, multiply the trial by x^s, where s is the smallest power removing the overlap.
- Superposition. For a sum of RHS terms, guess a sum of trials and solve each part's coefficients.
- Scope. Works only for constant-coefficient equations whose RHS is built from polynomials, exponentials, sines, and cosines.
Formulas
- Resonance rule: if e^{ax} (or the trig/polynomial piece) solves the homogeneous equation with multiplicity s, use x^s times the basic trial.
- Trig trials: for Ccos(βx) or Csin(βx), always guess Acos(βx) + Bsin(βx), since derivatives mix sine and cosine.
- Product trials: for P_n(x)e^{ax}, guess Q_n(x)e^{ax} with Q_n a full degree-n polynomial.
- Assumptions and limits: constant coefficients are essential; for RHS like ln x, 1/x, or tan x, use variation of parameters instead.
Worked Example
Solve y″ + y′ − 2y = 6e^{2x}.
- Homogeneous equation: r² + r − 2 = 0 gives (r + 2)(r − 1) = 0, so r = 1, −2 and yh = C1e^x + C2e^{−2x}.
- Trial: the RHS is 6e^{2x}, and e^{2x} is not a homogeneous solution (roots are 1 and −2), so guess yp = Ae^{2x} with no x-multiplier.
- Derivatives: yp′ = 2Ae^{2x}, yp″ = 4Ae^{2x}.
- Substitute: 4Ae^{2x} + 2Ae^{2x} − 2Ae^{2x} = 6e^{2x}, so (4A + 2A − 2A)e^{2x} = 6e^{2x}, giving 4A = 6 and A = 3/2.
- Particular solution: yp = (3/2)e^{2x}. General solution: y = C1e^x + C2e^{−2x} + (3/2)e^{2x}.
- Verify: yp″ + yp′ − 2yp = (3/2)(4e^{2x}) + (3/2)(2e^{2x}) − (3/2)(2e^{2x}) = (3/2)(4)e^{2x} = 6e^{2x}. Correct.
Common Misconceptions
- Skipping the resonance check. For y″ − 4y = e^{2x}, e^{2x} solves the homogeneous equation, so the trial must be Axe^{2x}, not Ae^{2x}.
- Guessing only cosine for a cosine RHS. Derivatives turn cosines into sines, so a pure Acos(βx) trial can never match; include both.
- Using it on variable-coefficient equations. The coefficient-matching algebra collapses without constant coefficients; variation of parameters is the fallback.
Real-World Applications
- Forced vibrations: a spring driven by F0cos(ωt) has its steady-state response found by a trig trial.
- Electric circuits: an RLC circuit with an AC source E0sin(ωt) yields its particular current the same way.
- Control systems: step and ramp responses of linear systems are polynomial/exponential trials in disguise.
Undetermined coefficients turns a driven constant-coefficient ODE into algebra: guess the RHS's family, multiply by x^s on resonance, and match coefficients. For y″ + y′ − 2y = 6e^{2x} the guess Ae^{2x} gives A = 3/2 immediately, and substitution back confirms it.
Related blogs
- First-Order ODE Methods: Complete Review and Guide
- Existence and Uniqueness Theorems: Explained with Examples
- Higher-Order Linear ODEs with Constant Coefficients
- Wronskian and Linear Independence of ODE Solutions
- Variation of Parameters: Solve Nonhomogeneous ODEs Easily
- Cauchy Euler Equations: Concepts, Formulas and Examples