Recipe
Find a particular solution with undetermined coefficients
Use when: you have a nonhomogeneous linear ODE ay''+by'+cy=g(x), including the case where the naive trial function duplicates a term already in y_c
Goal: a particular solution y_p that actually works, even when the naive guess collides with the homogeneous solution
Taught in The resonance modification rule · extends Find a particular solution with undetermined coefficients
Quick recipe
-
1
Write y_p with the same kind of terms as g(x): a polynomial for a polynomial, an exponential for an exponential, a sine-and-cosine pair for a sine or cosine forcing, each carrying an unknown coefficient.
Example
For y''-3y'+2y=e^x, the forcing g(x)=e^x is a pure exponential, so the naive guess is y_p=Ae^x
Why: differentiating a polynomial, exponential, or sine/cosine stays inside that same family of functions, and that closure is exactly what makes the coefficients solvable by matching.
-
2
Solve the homogeneous equation first (Chapter 7's recipe) and compare its solution y_c against the naive trial.
Example
The characteristic equation r^2-3r+2=0 factors as (r-1)(r-2)=0, so r=1 and r=2, giving y_c=C_1e^x+C_2e^{2x}. The naive trial Ae^x duplicates the C_1e^x term already in y_c; the matching root r=1 is simple, so s=1. Multiplying the entire trial by x^1: y_p=Axe^x
- the naive trial shares no term with y_c — use it as written, and continue to Step 4.
- the naive trial duplicates a term already in y_c — multiply the ENTIRE trial by x^s, where s is the matching characteristic root's multiplicity (s=1 for a simple root, s=2 for a repeated one), then continue.
Why: a trial that already satisfies the homogeneous equation substitutes to 0=g(x), unsolvable for any coefficients, because it can't tell itself apart from the forcing; multiplying by x^s breaks that tie while staying closed under differentiation.
-
3
Compute y_p' and y_p'' for whichever trial Step 2 left you with, then substitute all three into ay''+by'+cy=g(x).
Example
For y_p=Axe^x: y_p'=Ae^x(1+x) and y_p''=Ae^x(2+x). Substituting into y''-3y'+2y=e^x: Ae^x(2+x)-3Ae^x(1+x)+2Axe^x=e^x
Why: this is the step that turns an unknown function into a system of unknown numbers, exactly as it would for a trial with no resonance to worry about.
-
4
Group the substituted equation by term type and set each side's coefficients equal.
Example
Expanding the left side of Step 3's equation: Ae^x[(2+x)-3(1+x)+2x]=Ae^x[-1+0x]=-Ae^x. So the equation reduces to -Ae^x=e^x matching the (only) e^x-coefficient on each side: -A=1.
Why: two polynomials (or exponential/trig combinations) are equal only if they agree term by term.
-
5
Solve the resulting system, then write y=y_c+y_p.
Example
From -A=1: A=-1, so y_p=-xe^x. Adding to y_c=C_1e^x+C_2e^{2x} from Step 2: y=C_1e^x+C_2e^{2x}-xe^x
Why: a nonhomogeneous equation's general solution is always the homogeneous solution plus any one particular solution, whether or not that particular solution needed the resonance fix.
Common mistakes
- Writing the naive trial and substituting without ever checking it against y_c first, which is exactly what produces the nonsense equation 0=g(x).
- Multiplying only PART of the trial by x^s instead of the entire trial function.
- Using s=1 when the matching root is actually repeated (s should be 2).
- Forgetting that a modified trial is still checked against y_c the same way: for a doubly-repeated collision, x^s may itself still overlap and need a second bump.