Mathwords logoMathwords

Method of Undetermined Coefficients — Definition, Formula & Examples

The method of undetermined coefficients is a technique for finding a particular solution to a nonhomogeneous linear differential equation with constant coefficients. You guess the form of the solution based on the right-hand side of the equation, then solve for the unknown coefficients by substituting back in.

Given a linear constant-coefficient ODE of the form ay+by+cy=g(t)ay'' + by' + cy = g(t), where g(t)g(t) is a polynomial, exponential, sine, cosine, or a finite combination of such functions, the method of undetermined coefficients constructs a trial particular solution ypy_p whose functional form mirrors g(t)g(t). The unknown coefficients in ypy_p are determined by substituting ypy_p into the ODE and equating coefficients of like terms.

Key Formula

ay+by+cy=g(t)ay'' + by' + cy = g(t)
Where:
  • a,b,ca, b, c = Constant coefficients of the differential equation
  • g(t)g(t) = Nonhomogeneous forcing function (polynomial, exponential, sine/cosine, or combination)
  • yy = Unknown function of t

How It Works

First, solve the associated homogeneous equation ay+by+cy=0ay'' + by' + cy = 0 to find the complementary solution ycy_c. Next, examine g(t)g(t) and write down a trial form for ypy_p with undetermined coefficients. If any term in your trial solution duplicates a term in ycy_c, multiply the trial by tt (or t2t^2 if needed) to ensure linear independence. Substitute ypy_p into the original ODE, collect like terms, and set up a system of equations by matching coefficients on both sides. Solve that system to find the coefficients. The general solution is y=yc+ypy = y_c + y_p.

Worked Example

Problem: Find the general solution of y'' − 3y' − 4y = 3e^(2t).
Step 1: Solve the homogeneous equation: The characteristic equation is r² − 3r − 4 = 0, which factors as (r − 4)(r + 1) = 0. The roots are r = 4 and r = −1.
yc=C1e4t+C2ety_c = C_1 e^{4t} + C_2 e^{-t}
Step 2: Choose a trial particular solution: Since g(t) = 3e^(2t) and e^(2t) does not appear in y_c, guess:
yp=Ae2ty_p = Ae^{2t}
Step 3: Substitute and solve for A: Compute y_p' = 2Ae^(2t) and y_p'' = 4Ae^(2t). Substitute into the ODE: 4A − 6A − 4A = 3, so −6A = 3, giving A = −1/2.
4Ae2t3(2Ae2t)4(Ae2t)=3e2t    6A=3    A=124Ae^{2t} - 3(2Ae^{2t}) - 4(Ae^{2t}) = 3e^{2t} \implies -6A = 3 \implies A = -\tfrac{1}{2}
Answer: The general solution is y=C1e4t+C2et12e2ty = C_1 e^{4t} + C_2 e^{-t} - \tfrac{1}{2}e^{2t}.

Why It Matters

This method is a core tool in any introductory differential equations course and appears frequently in engineering and physics when modeling systems driven by external forces—spring-mass systems with sinusoidal forcing, RLC circuits with AC sources, and beam deflection problems. Mastering it also builds the algebraic instincts needed for more advanced techniques like variation of parameters.

Common Mistakes

Mistake: Using a trial solution that duplicates a term already in the complementary solution y_c.
Correction: If your guess for y_p contains a term that solves the homogeneous equation, multiply the entire trial by t (or t² for repeated roots) before proceeding.