Differential Equations · Undergraduate
Nonhomogeneous Equations and Undetermined Coefficients
Quick answer
The general solution of ay″ + by′ + cy = g(x) is the homogeneous solution y_h plus any one particular solution y_p. When g is a polynomial, an exponential, a sine or cosine, or a product of these, y_p has the same form with unknown coefficients; substituting the guess and matching terms finds them. If the guess already solves the homogeneous equation, multiply it by x. Initial conditions are applied to the full solution y_h + y_p, last.
What you'll learn
- Explain why the general solution is y_h + y_p
- Choose the form of y_p from the right-hand side
- Find the coefficients by substituting and matching terms
- Fix a guess that overlaps the homogeneous solution by multiplying by x
A homogeneous part plus one particular solution
When the right side is not zero,
the equation is nonhomogeneous. Its general solution has two parts:
where is the general solution of the homogeneous equation (with replaced by ) and is any one solution of the full equation.
Why one particular solution is enough
If and both solve the full equation, subtract: by linearity, solves the equation with right side . So is one of the homogeneous solutions, and . Every solution is the one particular solution shifted by a homogeneous solution, the same way every solution of a linear system is one solution plus the null space. Finding a single , by any means, finishes the problem.
Guessing the form
The derivatives of polynomials, exponentials, sines and cosines stay in the same family, so can be guessed with unknown coefficients:
| Guess for | |
|---|---|
| constant | |
| polynomial of degree | |
| or |
The overlap rule: if any term of the guess already solves the homogeneous equation, multiply the whole guess by , and by again if needed.
Worked examples
Common mistakes
Practice problems
-
Find a particular solution of .
Answer
Full solution
Guess : .
-
Find a particular solution of .
Answer
Full solution
Guess : , so , .
-
Find a particular solution of .
Answer
Full solution
Guess : .
-
Find a particular solution of .
Answer
Full solution
Guess : , so , .
-
Find a particular solution of .
Answer
Full solution
A constant solves the homogeneous equation (root ), so guess . Then gives , .
-
Find a particular solution of .
Answer
Full solution
solves the homogeneous equation, so guess . Substituting gives .
-
Write, without solving, the form of for .
Answer
Full solution
is a double root, so both and solve the homogeneous equation. Multiply by .
-
A student guesses for and gets . What went wrong?
Answer
solves the homogeneous equation; the guess must be , giving .
Full solution
Substituting a homogeneous solution always gives on the left. Multiplying by creates a function that does not.
Frequently asked questions
What is the general solution of a nonhomogeneous equation?
y = y_h + y_p: the general solution of the homogeneous equation, with its two constants, plus any one particular solution of the full equation.
How do you choose the form of the particular solution?
Copy the form of g(x) with unknown coefficients: a polynomial of the same degree for a polynomial, Ae^(kx) for e^(kx), and A cos ωx + B sin ωx for either sin ωx or cos ωx.
What do you do if the guess solves the homogeneous equation?
Multiply the guess by x, or by x² if x times the guess still solves it. Otherwise substituting gives 0 on the left and no coefficient can match g.
When do you apply the initial conditions?
After adding y_h and y_p. The constants belong to y_h, but the conditions describe the whole solution.
Why must a sine guess include a cosine too?
Differentiating sin turns it into cos, so both appear after substitution. The guess needs both to have enough freedom to match.