Nonhomogeneous equations and particular integrals
A homogeneous linear ODE only ever settles to zero on its right-hand side. The moment a real driving term — a polynomial force, an exponential input, a sinusoidal forcing — sits on the right, the complementary function alone can no longer satisfy the equation, and a second ingredient, the particular integral (PI) , must be added on top of it. This article picks up exactly where second-order constant-coefficient ODEs leave off. You already know how to find from the auxiliary equation. Here the tool is the method of undetermined coefficients: guess a trial form matching , substitute it into the ODE, and match coefficients — with one crucial twist, the resonance modification, whenever the trial form collides with .
For , guess a trial matching the type of , multiply it by (or ) if it duplicates a term of , then substitute and match coefficients to pin down , so that solves the full equation.
The core idea
For a linear constant-coefficient ODE
the general solution splits into two pieces added together,
where: is the complementary function, the general solution of the associated homogeneous equation , and is any single particular integral, one solution of the full nonhomogeneous equation . This split works because the operator is linear, so .
Choosing the trial form. For built from polynomials, exponentials , or / (and products of these), the trial has the same "shape" as , with unknown coefficients to be found:
- polynomial of degree trial polynomial of degree (every lower-degree term included, even if is a pure power)
- trial
- or trial (both terms, even if only one appears in )
- or trial
The resonance modification. If any term of the naive trial already appears in — i.e. it duplicates a root of the auxiliary equation — substituting the naive trial gives an impossible equation ( equals a nonzero constant). The fix is to multiply the entire trial by (or by if a single multiplication still duplicates ) before solving for coefficients. This is the one place students lose the most marks, and it is the subject of the derivation below.
The goal is to show, with nothing beyond substitution and algebra, why a trial fails whenever already solves the homogeneous equation, and why multiplying the trial by repairs it — this is the resonance modification used every time the driving term shares a root with the auxiliary equation, and it is the step students forget most often.
Step 1. Set up the resonance case concretely. Take . The auxiliary equation is , giving roots , so . The driving term matches the root exactly — this is what "duplicates " means.
Step 2. Try the naive trial and watch it collapse. If , then , so for every value of . Substituting into demands , an equation with no solution — the naive trial can never match the right-hand side, no matter how is chosen, because already solves the homogeneous equation and annihilates it.
Step 3. Multiply the trial by and retry. Let . Differentiating, and . Then . The terms have cancelled, leaving a clean nonzero multiple of — exactly the shape needed to match the right-hand side.
Step 4. Match coefficients and read off the general pattern. Setting gives , so solves the equation exactly. The mechanism is general: multiplying by shifts the trial out of the null space of (the space of solutions of ), so no longer annihilates it, and a genuine coefficient equation appears. If a single multiplication by still lands back in that null space (a repeated root duplicated twice), multiply by instead, for the same reason.
Worked example
Find the general solution of , then use initial conditions , to pin down a unique solution.
Step 1. Find the complementary function. The auxiliary equation is , which factors as , giving . So .
Step 2. Choose the trial PI. Since is a degree-2 polynomial, and no term of a polynomial trial duplicates (which is built from exponentials), try — all three terms, not just the leading one.
Step 3. Differentiate and substitute. With and ,
Step 4. Match coefficients against . From : . From : . From : . So , and the general solution is
Step 5. Apply the initial conditions to find . Differentiating, . At : , and . Adding the two equations eliminates : , so .
The particular solution is .
Competitive stretch
Check the answer quickly at without re-expanding: matches the given condition, confirming the algebra before trusting the full expression.
Common traps
- Forgetting the resonance modification. If a trial term duplicates , undetermined coefficients gives an impossible equation ( nonzero) unless the trial is multiplied by (or for a doubly repeated root).
- Using an incomplete trial polynomial. For a degree- polynomial, the trial must include every lower-degree term, , not just the leading power.
- Dropping sine or cosine. When contains only (or only ), the trial must still carry both and , since differentiating one produces the other.
- Losing at the end. The final general solution is always ; adding into the trial itself, or forgetting to re-attach it, throws away the arbitrary constants the problem needs.
Ask the tutor: Not sure which trial form fits a mixed right-hand side like , or want your resonance check verified before you substitute? Ask the AI tutor to walk through the trial selection with you.
Why does multiplying the trial by x fix resonance instead of, say, adding a constant?
Multiplying by works because the trouble is that the original trial already satisfies the homogeneous equation, so the differential operator sends it straight to zero and it can never match a nonzero right-hand side. Multiplying by moves the trial outside that set of homogeneous solutions while keeping the same exponential or trigonometric "flavour," so the operator applied to it no longer vanishes identically — it leaves behind exactly the kind of term needed to match . Adding a constant would not fix this, since constants (or other unrelated terms) do not track the structure of and would not survive coefficient matching correctly.
What if f(x) is a sum of two different types, like 4x squared plus e to the 2x?
Because the equation is linear, particular integrals add: find a particular integral for the polynomial part and, separately, a particular integral for the exponential part (checking each piece for resonance on its own), then take . This is the same superposition idea that lets work in the first place, just applied one more time, splitting into pieces that are each easy to match with a trial.
Does it matter which particular solution I pick for y sub p, since the trial method could give different constants?
No — any correct that satisfies the full nonhomogeneous equation works, because two different particular integrals for the same can only differ by a solution of the homogeneous equation, which is already absorbed into 's arbitrary constants. In practice the method of undetermined coefficients with a given trial form produces a unique once the coefficients are matched, so this ambiguity rarely shows up — but it is why you never need to worry about "the wrong" particular integral, only whether your trial form was complete and resonance-checked.