JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Undetermined Coefficients: Educated Guessing

When the forcing is a polynomial, an exponential, a sine or a cosine, you do not have to integrate your way to a particular solution — you can guess its shape, leave the numbers blank, and let the equation fill them in. This is the fastest tool in the nonhomogeneous toolbox, and it works for a beautifully simple reason.

One missing piece in a known structure

In the previous guide you met the master structure of every forced linear equation: the general solution is y = y_c + y_p, the complementary solution y_c (the full two-parameter answer to the homogeneous equation) plus any single particular solution y_p that the right-hand side picks out. You already know how to find y_c from the previous rung — you write down the characteristic equation, read off its roots, and assemble c1 * y1 + c2 * y2. So the only piece still missing is y_p: one function, any one, that actually satisfies a y'' + b y' + c y = g(x) with the forcing function g(x) on the right.

There are two honest ways to hunt for y_p. The slow, always-works way is variation of parameters, which you will meet in guide 4 — it integrates its way to an answer no matter how strange g(x) is. The fast, sometimes-works way is the method of undetermined coefficients, the subject of this guide. It is not a general algorithm; it is a clever shortcut that applies only when g(x) belongs to a short, friendly list. But when it does apply, it turns a calculus problem into a little algebra problem, and that is a trade worth making.

Why guessing is allowed

The method rests on one observation: certain families of functions are closed under differentiation. Differentiate a polynomial and you get a polynomial of lower or equal degree. Differentiate e^(rt) and you get a constant times e^(rt). Differentiate sin(wt) and you get cos(wt), differentiate that and you are back to a sine. Each of these families is a small, self-contained world — you can never differentiate your way out of it. So if g(x) lives in such a world, it is reasonable to suspect that some y_p lives there too, because the left side a y'' + b y' + c y only ever adds up derivatives, and derivatives keep you inside the family.

So the strategy is: guess that y_p has the same *form* as g(x), but write the coefficients as unknown letters instead of fixed numbers. Then substitute the guess into the equation. Because both sides now live in the same family, you can match like terms — all the e^(rt) parts on the left must equal the e^(rt) part on the right, all the cos terms must match the cos terms, and so on. Matching turns the differential equation into a handful of ordinary algebraic equations for those unknown letters. That is the whole trick, and the name says exactly what happens: the coefficients start out undetermined, and the equation determines them.

A worked guess, end to end

Take y'' - 3 y' + 2 y = 4 e^(3t). The forcing is a single exponential, so guess y_p = A e^(3t) with one undetermined coefficient A. Differentiate: y_p' = 3 A e^(3t) and y_p'' = 9 A e^(3t). Substitute into the left side and every term carries the same e^(3t), so you can factor it out: (9 A - 9 A + 2 A) e^(3t) = 2 A e^(3t). Set that equal to the right side, 4 e^(3t), cancel the common e^(3t), and you are left with the one-line algebra 2 A = 4, so A = 2. The particular solution is y_p = 2 e^(3t) — found without a single integral.

g(x) on the right            guess y_p (undetermined coeffs)
--------------------------   -------------------------------
constant  k                  A
polynomial deg n             A_n x^n + ... + A_1 x + A_0
k e^(rt)                     A e^(rt)
k cos(wt)  or  k sin(wt)     A cos(wt) + B sin(wt)
k e^(at) cos(wt)             e^(at) (A cos(wt) + B sin(wt))
sum of the above             sum of the matching guesses
The friendly list: read the form of g(x) on the left, copy the matching template on the right with blank coefficients.
  1. Solve the homogeneous equation first and write down y_c — you need its roots in hand for the warning in step 5.
  2. Read the form of g(x) and write the matching guess for y_p with letters A, B, ... in place of numbers.
  3. Differentiate the guess to get y_p' and y_p'', then substitute all three into the left side of the equation.
  4. Match like terms with the right side to get a small system of linear equations, and solve it for the coefficients.
  5. Before trusting the answer, check the guess does not overlap y_c — if it does, you must multiply by x (or x^2). That is the resonance rule, and the next guide is devoted to it.

Three habits that keep you out of trouble

First habit: always include the *whole* family, not just the part you see. If g(x) = 5 sin(2t), it is tempting to guess only y_p = B sin(2t), but differentiating a sine produces a cosine, so the cosine will appear on the left with nothing to balance it. The correct guess is A cos(2t) + B sin(2t), both pieces, even though the right side shows only a sine. Forgetting the partner term is the single most common mistake with this method, and it makes the algebra unsolvable rather than merely wrong.

Second habit: for a polynomial forcing, guess a *full* polynomial of the same degree, every power down to the constant. If g(x) = 3 t^2, guess y_p = A t^2 + B t + C, not just A t^2 — the derivatives feed lower powers back in, and you need slots for them. Third habit: keep y_p and y_c strictly separate in your head. The constants c1 and c2 in y_c stay free to the very end, fixed only by initial conditions; the coefficients A, B, C in y_p are pinned down by the equation itself and are never free. Mixing the two is how people accidentally try to satisfy the initial conditions with y_p, which cannot work.

Where the educated guess breaks down

There is one situation where the plain guess silently fails, and it is important enough that the next guide is built around it. Suppose you are solving y'' - 3 y' + 2 y = 4 e^(t). The forcing is e^(t), so the natural guess is A e^(t). But e^(t) is *already* a solution of the homogeneous equation — it sits inside y_c. Substitute A e^(t) and the left side collapses to zero, giving 0 = 4 e^(t), which no value of A can fix. The family you guessed in was swallowed by y_c, leaving no room for a particular solution of that shape.

This overlap is exactly a resonant forcing term — the equation is being pushed at one of its own natural frequencies, and the response wants to grow rather than settle. The fix is small and surgical: multiply the guess by x (and by x^2 if it is a repeated root) until it no longer overlaps y_c, then carry on as usual. That modification, and the resonance it encodes, is the whole story of the next guide. Worth saying plainly: resonance here is a feature of the math, not a mistake — it is the same phenomenon that makes a pushed swing climb higher, and it does not even require zero damping to show up.