What is left after the homogeneous part
The previous guides cracked the homogeneous equation — the one with zero on the right, like y'' + a y' + b y = 0. You built its characteristic equation, read off the roots, and assembled a fundamental set of solutions y_1, y_2 whose combinations C_1 y_1 + C_2 y_2 sweep out every solution. That combination is the complementary solution y_c. But real problems are rarely silent on the right: a spring is pushed, a circuit is driven, a beam is loaded. The equation becomes y'' + a y' + b y = g(x), with a genuine forcing term g(x), and y_c alone no longer satisfies it.
Here is the structural fact that makes the whole rest of the guide possible — and it is the gift of linearity. Write the equation as L[y] = g, where L is the linear differential operator L = d^2/dx^2 + a d/dx + b. Suppose you can find just one function y_p that L sends to g, so L[y_p] = g. Then the general solution of the forced equation is exactly y = y_c + y_p: the whole family of homogeneous solutions, shifted bodily by that single particular answer. Check it in one line — L[y_c + y_p] = L[y_c] + L[y_p] = 0 + g = g — and you see the linearity doing the work.
Undetermined coefficients: an educated guess
When the forcing g(x) is one of a short list of especially well-behaved shapes — a polynomial, an exponential e^{r x}, a sine or cosine, or a product of these — the method of undetermined coefficients gives you y_p almost for free. The idea is wonderfully literal: those functions reproduce their own kind under differentiation. Differentiate a polynomial and you get a polynomial; differentiate e^{r x} and you get a multiple of e^{r x}; differentiate sin and cos and you only ever shuffle between sin and cos. So a particular solution must live in the same small family as the forcing — you guess a copy of g(x) with unknown coefficients, and let the equation tell you what they are.
Picture it concretely with y'' - y' - 2y = 4x^2. The forcing is a degree-two polynomial, so guess the full degree-two polynomial y_p = A x^2 + B x + C — never just A x^2, because the derivatives spill into lower-degree terms you must be ready to match. Differentiate twice, substitute, and collect: you get -2A x^2 + (-2A - 2B) x + (2A - B - 2C) on the left, which must equal 4x^2 + 0x + 0. Matching the powers of x one at a time gives three plain algebraic equations, and out drops A = -2, B = 2, C = -3, so y_p = -2x^2 + 2x - 3. The calculus problem has dissolved into solving a small linear system — that is the whole charm of the method.
Variation of parameters: always works
Undetermined coefficients is fast but fragile: it only works for that short menu of forcing terms. What if g(x) = tan(x), or sec(x), or anything off the list? Then you reach for variation of parameters, a method that asks nothing of g except that you can integrate, and so handles any forcing. Its idea is a small stroke of genius. The homogeneous solution is C_1 y_1 + C_2 y_2 with constant C_1, C_2. Variation of parameters says: let those constants vary. Look for y_p = u_1(x) y_1 + u_2(x) y_2, promoting the two numbers into two unknown functions and bending the homogeneous solutions just enough to absorb the forcing.
Two unknown functions need two conditions. One is the equation itself; the other we get to choose, and a clever choice keeps the algebra clean: demand u_1' y_1 + u_2' y_2 = 0, which kills the messy second-derivative terms before they appear. With that, the equation collapses to u_1' y_1' + u_2' y_2' = g. Now you have two linear equations for the two unknown derivatives u_1' and u_2', and their determinant is exactly the Wronskian W = y_1 y_2' - y_2 y_1' — the same quantity that, being nonzero, certified y_1 and y_2 as independent in the first place. Solve, then integrate, and y_p is yours.
Given y'' + a y' + b y = g(x), with homogeneous basis y_1, y_2: Wronskian W = y_1 y_2' - y_2 y_1' (nonzero since y_1, y_2 independent) u_1' = - y_2 g / W u_2' = + y_1 g / W u_1 = INTEGRAL( - y_2 g / W ) dx u_2 = INTEGRAL( + y_1 g / W ) dx particular solution: y_p = u_1 y_1 + u_2 y_2 Example y'' + y = sec(x): y_1=cos x, y_2=sin x, W=1 u_1 = INTEGRAL(-sin x sec x)dx = ln|cos x|, u_2 = INTEGRAL(cos x sec x)dx = x y_p = cos(x) ln|cos x| + x sin(x) (undetermined coefficients cannot touch sec x)
Be honest about what "always works" means here. The method always produces the right two integrals — that part never fails. But the integrals themselves can be non-elementary, meaning no formula in elementary functions exists for them, the same way the Gaussian integral of e^{-x^2} has no elementary antiderivative. "Non-elementary" does not mean uncomputable: you can still leave the answer as an honest integral, or evaluate it numerically to any precision. Variation of parameters always reduces the problem to integration; whether that integration is pretty is a separate question, and not always a kind one.
Reduction of order: one solution into two
Both methods above quietly assumed you already had the full homogeneous basis y_1, y_2. For constant-coefficient equations the characteristic equation hands you both. But for variable-coefficient equations — where a and b depend on x — there is no characteristic equation, and often you can find only one homogeneous solution, by inspection or luck. Reduction of order is the tool that turns that single y_1 into a complete pair. Its premise is the same shape-shifting trick: look for the second solution as y_2 = v(x) y_1, the known solution multiplied by an unknown function v.
Substitute y_2 = v y_1 into the homogeneous equation and watch the magic. Because y_1 already satisfies the equation, all the terms with v (undifferentiated) cancel exactly — that cancellation is precisely why y_1 had to be a known solution. What survives involves only v' and v'', never v itself. Set w = v', and a second-order equation for v becomes a first-order equation for w — the order has genuinely dropped by one, which is the name of the method. Solve the first-order equation (a separable or linear one), integrate w to get v, and y_2 = v y_1 is your independent second solution.
A vivid case: x^2 y'' - x y' + y = 0 (an Euler equation) has the obvious solution y_1 = x. Set y_2 = v x; the substitution and the w = v' switch leave x w' + w = 0, a separable first-order equation giving w = 1/x, hence v = ln(x), and the second solution is y_2 = x ln(x). The two together, x and x ln(x), are independent — their Wronskian is x, nonzero for x > 0 — so they form the basis you needed. And the very same y_2 = v y_1 idea, pushed onto the forced equation instead of the homogeneous one, is exactly variation of parameters in disguise: reduction of order is its one-solution ancestor.
Choosing among the three
These three are not rivals; they are a decision tree, and the choice is almost mechanical once you see the structure. The deciding questions are: do I already have the full homogeneous basis, and how nice is the forcing? Run the questions in order and the right tool announces itself.
- Do you have both homogeneous solutions? If you have only one — typically because the coefficients vary and there is no characteristic equation — use reduction of order first to manufacture the second one. Now you have a full basis y_1, y_2 and can proceed.
- Is the forcing g(x) a polynomial, exponential, sine/cosine, or a product of these? If yes, undetermined coefficients is fastest — guess a copy with unknown coefficients, multiply by x if it collides with a homogeneous solution (resonance), and match. No integration needed at all.
- Is the forcing anything else — a tangent, a secant, a logarithm, a ratio? Then variation of parameters is the universal fallback. It costs you two integrals built from the Wronskian, but it never asks the forcing to be nice and never fails to deliver the formula.
- Finally, assemble. Add the homogeneous solution back: y = C_1 y_1 + C_2 y_2 + y_p. Only now apply the initial conditions to fix C_1 and C_2 — on the full y, never on y_c alone.
Step back and notice the unity. Every method here is the same gesture — take the homogeneous solutions you trust and let their constant coefficients become functions of x, bending what you already know just enough to meet the forcing. That single idea, superposition of a complementary part and a particular part, is the entire architecture of linear differential equations, and it generalizes upward without complaint: the same y_c + y_p split organizes higher-order equations, governs systems solved by the matrix exponential, and reappears when the Laplace transform turns the whole problem into algebra. Master finding y_p here, and you have mastered the forced response everywhere it will ever appear.