Variation of Parameters
Once you can solve the free problem , variation of parameters hands you the forced problem almost for nothing. The trick is disarmingly simple and, in hindsight, inevitable. The homogeneous general solution is a linear combination of a fundamental system with constant coefficients. Freeze those constants and the trajectory can only trace free motions; let them vary — promote to functions — and the same combination acquires exactly enough freedom to bend, at every instant, into whatever shape an arbitrary forcing demands. Lagrange saw that the extra freedom is more than you need: unknown functions are pinned down by the single equation , so you may impose auxiliary constraints for free. Choose them to annihilate the higher derivatives of the before they can appear, and substitution into collapses from a tangle of second derivatives to one clean algebraic line. What is left is a linear algebraic system for the derivatives whose coefficient matrix is the Wronskian of the fundamental system — and because linear independence guarantees , that system is always solvable by Cramer's rule. Integrate the resulting and you have a particular solution in closed form: an integral of the forcing against a kernel built purely from homogeneous data. That kernel is the Green's function in embryo, and the whole construction is the bridge from elementary ODE technique to boundary-value problems, Sturm–Liouville theory, and the impulse-response calculus of driven physical systems. Where undetermined coefficients stalls — on , , , a measured drive — variation of parameters simply works, at the honest price of an integral.
- Variation of parameters builds a particular solution of an inhomogeneous linear ODE by letting the constants of the homogeneous general solution become unknown functions .
- For with fundamental pair , write and impose the gauge constraint to reduce the order.
- Cramer's rule then gives the master formulae and , with the Wronskian — always nonzero for an independent pair, so the method never fails to be solvable.
- It handles any continuous forcing (, , , tabulated data), unlike undetermined coefficients which needs exponential–polynomial drives.
- The integrated answer is a convolution of against a kernel of homogeneous solutions — the Green's function of the problem, and the impulse (Duhamel) response of a driven oscillator.
- Key idea: promote the integration constants to functions, impose one fewer constraint than the order, and the inhomogeneous equation collapses to a linear system for the whose coefficient matrix is the Wronskian.
Promote the integration constants of the homogeneous solution to functions, then impose just enough auxiliary constraints — one fewer than the order — so that the inhomogeneous equation reduces to a solvable linear system for the derivatives , whose coefficient matrix is the Wronskian.
Where this lives today
The method is quiet infrastructure, present whenever a system is driven. In classical and quantum mechanics the Duhamel integral is the exact response of an oscillator to any force history — the workhorse behind vibration analysis, control theory, and the impulse-response formalism of linear systems. In electromagnetism and acoustics the same kernel, upgraded to satisfy boundary conditions, is the Green's function whose numerical evaluation underlies boundary-element solvers. In quantum scattering the radial Schrödinger equation is solved by treating the free spherical waves as the fundamental system and the potential as forcing, and variation of parameters reproduces the Lippmann–Schwinger integral equation that is the foundation of scattering theory and the Born series. Where the homogeneous solutions are special functions — Bessel, Legendre, hypergeometric — the tabulated Wronskians (for instance ) turn the method into closed-form integral representations of inhomogeneous special-function equations. As a computational primitive it is the analytic backbone of Sturm–Liouville eigenfunction expansions and of the Green's-function machinery in every graduate methods course.
The physical picture
Picture the fundamental solutions as a moving frame in solution space. With constant coefficients, sweeps out every possible free motion of the system and nothing more. To follow a forced motion you let the coefficients drift, , tuning them continuously so the trajectory tracks the driving force at every instant. But two drifting functions carry one redundant degree of freedom, because they must satisfy only the single equation . Lagrange spends that redundancy on a deliberate gauge choice — the constraint — picked precisely so that the second derivatives of the never appear. What survives after substitution is a linear system whose determinant is the Wronskian, sitting in the denominator of the answer. The first figure traces that logic as a pipeline: forcing in, particular solution out, Wronskian at the pivot.
The pipeline is abstract; the payoff is concrete. Feed the method a forcing that undetermined coefficients cannot touch — say driving the unit oscillator — and out comes . The bounded piece is the routine response; the term is the fingerprint of resonance, a secular growth that appears because overlaps the natural frequency . The second figure plots that solution, with real numbers, so you can watch the amplitude climb.
The core equations
Everything begins from the equation in normalized form — leading coefficient one — because the master formulae are derived by substituting into the operator with a unit coefficient on . Any deviation from this normalization is the single most common source of error in the whole method.
where: — continuous coefficient functions, with the leading coefficient already divided out; — the continuous forcing or source term; — the unknown function of . Reading it: the left side is the linear operator ; the right side is what drives it away from free motion. The construction rests on knowing a fundamental system of the homogeneous equation. The ansatz then replaces each constant by a function, and this is the one genuinely creative act — everything after it is forced.
where: — a fundamental (linearly independent) pair solving ; — the unknown functions that have replaced the integration constants. Reading it: two unknown functions where before there were two numbers. Two unknown functions constrained by one equation leave a degree of freedom to spend. We spend it on a gauge choice designed to make the algebra collapse — set the "coefficient-velocity" contribution to to zero.
where: — the derivative of the -th coefficient function. Reading it: the part of coming from the changing coefficients is switched off, so looks formally like a homogeneous combination. With the constraint imposed, differentiating once more and substituting into makes every term multiplied by an undifferentiated vanish (because each solves the homogeneous equation), leaving a single surviving line.
where: — the forcing that the surviving first-derivative terms must reproduce. Reading it: this is the second algebraic equation, partnering the constraint (3) to pin down both . Equations (3) and (4) form a linear system in . Its coefficient matrix is exactly the Wronskian matrix, and its determinant is the Wronskian — the quantity that decides solvability.
where: — the Wronskian of the fundamental pair. Reading it: by Abel's identity is either everywhere zero or nowhere zero on the interval, and for an independent pair it is nowhere zero — so the system is always invertible. Cramer's rule on the system delivers the master formulae, the two equations worth memorizing.
where: — the derivatives obtained by inverting the system. Reading it: the forcing is weighted by the other solution and divided by the Wronskian; the sign flips between the two. Integrating (6) reconstructs the coefficient functions and hence the particular solution in indefinite-integral form.
where: — indefinite integral, whose constants of integration merely add homogeneous pieces and are absorbed into the general solution. Reading it: two quadratures finish the job. Choosing definite limits from a base point fuses the two integrals into a single convolution against a kernel built only from homogeneous data — the Green's-function form.
where: — base point, chosen so that ; — the integration (source) variable. Reading it: the response at is the accumulated effect of the source at every earlier point , propagated by the kernel . The whole scheme lifts verbatim to order : impose constraints that zero the lower-derivative combinations, and one final equation carries the forcing, all solved by Cramer's rule on the full Wronskian.
where: — the fundamental solutions; — the -th derivative of ; — solved via Cramer's rule with the full Wronskian in the denominator. Reading it: the second-order case is just .
The goal is to show, with no gaps, why the single operator equation is equivalent to the tidy pair of algebraic equations (3) and (4), and hence why the master formulae (6) follow by Cramer's rule. We start from the ansatz , differentiate twice, deploy the gauge constraint at exactly the right moment to kill the second derivatives of the , and lean on the fact that each annihilates the operator. The result is that two functions constrained by one equation are made determinate by one freely chosen extra equation.
Step 1. Differentiate the ansatz once: . The first bracket carries the derivatives of the unknown coefficients; the second looks like an ordinary homogeneous derivative. Why: isolating the terms is what lets us cancel them by a choice, rather than being forced to carry later.
Step 2. Impose the gauge constraint , so that . We are entitled to one extra condition because two functions answer to only one equation; this particular one is chosen so that can never appear. Why: without it, the next differentiation would produce , and the problem would be harder than the one we started with.
Step 3. Differentiate again: . Only first derivatives of the survive, exactly as the gauge choice intended. Why: the constraint has done its work — the second derivatives of the coefficients are gone for good.
Step 4. Substitute into and regroup by and : . Why: collecting terms exposes that the bracketed factors are just and .
Step 5. Each solves the homogeneous equation, so and both bracketed groups vanish, leaving . Setting this equal to gives the second equation (4). Why: this is the whole magic — the operator, applied to the ansatz, distils to a single first-order combination of the .
Step 6. Equations (3) and (4) are a linear system with determinant . Cramer's rule gives and . Why: for an independent pair, so the inversion is legitimate everywhere on the interval — the method cannot break down.
Go deeper · Derivation B · 1 minThe kernel and its built-in zero initial conditions
The aim is to turn the indefinite-integral answer (7) into a definite integral against a single kernel , and to prove that this particular choice of limits makes the particular solution satisfy homogeneous initial conditions . This is what promotes variation of parameters from a bookkeeping recipe into the Green's-function representation used throughout boundary-value and Sturm–Liouville theory. We fix a base point , combine the two integrals, and differentiate under the integral sign with the Leibniz rule.
Step 1. Replace the indefinite integrals in (7) with definite ones from to : . Why: definite limits fix the arbitrary constants, selecting one specific particular solution rather than a family.
Step 2. The factors are constants with respect to , so pull them inside and combine: . Why: writing the integrand as one kernel makes the causal structure explicit — the source at acts through .
Step 3. Evaluate at : the integration range collapses, . Why: the first homogeneous initial condition is automatic, with no extra algebra.
Step 4. Differentiate with the Leibniz rule: , and note . At the remaining integral is again empty, so . Why: the diagonal value is precisely the property that keeps the boundary term from spoiling the derivative — it is the signature of a second-order Green's function.
Go deeper · Derivation C · 1 minThe Duhamel impulse response of a driven oscillator
The purpose here is to specialize the kernel to the constant-coefficient oscillator and recover the impulse-response (Duhamel) integral that physicists use for arbitrarily forced oscillators — step forces, ramps, measured or noisy drives — where undetermined coefficients is powerless. We take , , compute the Wronskian, and read off the convolution kernel, showing it is the free response to a unit impulse.
Step 1. For the homogeneous solutions are and , with forcing . Why: these are the free oscillations, the natural building blocks the method demands.
Step 2. Compute the Wronskian: . It is constant, as Abel's identity predicts for an equation with no first-derivative term. Why: a constant makes the kernel a pure function of , which is the hallmark of a time-invariant system.
Step 3. Insert into the kernel (8): using the sine subtraction identity. Why: the kernel depends only on the elapsed time — it is the memory of the oscillator.
Step 4. Assemble the particular solution: . This is the Duhamel integral; is literally the response to a delta-function impulse . Why: it recasts "solve the ODE" as "convolve the force with the impulse response", the working definition of a Green's function in physics. *The kernel satisfies with and at — the defining conditions of the impulse-response Green's function.*
Limiting cases
Variation of parameters is the general case from which several familiar methods drop out as limits, and into which physical intuition can be read directly.
| Case | Result | Meaning |
|---|---|---|
| Only one solution known | , one constraint | The method degenerates to reduction of order; a single unknown and a first-order equation for reconstruct en route. |
| Exponential–polynomial forcing | Undetermined coefficients is faster; variation of parameters still works but demands integrals you could have guessed the form of. | |
| Constant coefficients, sinusoidal drive | Reproduces the standard resonance curve; at the integral exposes the secular growth automatically. | |
| Boundary conditions imposed | Choosing to satisfy the left and right conditions turns the kernel into the Green's function of the two-point boundary-value problem. | |
| Time-invariant system | A constant Wronskian makes the kernel a convolution — the Duhamel impulse response of a driven physical system. |
Worked examples
1 · The secant-driven oscillator (fully worked, with check)
Solve — a forcing undetermined coefficients cannot handle, since is not of exponential–polynomial type.
Step 1. The homogeneous equation has fundamental pair , . Wronskian: . The equation is already normalized, so .
Step 2. Master formula for : . Integrate: , using .
Step 3. Master formula for : , which integrates to . The neat collapse to a constant is a small gift of this particular forcing.
Step 4. Assemble: . So the general solution is . The particular solution is .
Step 5. Check by substitution. (the terms cancel), and . Then . **Check: exactly.* The term is the secular signature of driving at the natural frequency ; it is the unbounded growth plotted in the second figure.
2 · Cauchy–Euler equation, and the normalization trap
Solve for .
Step 1. The homogeneous Cauchy–Euler equation is solved by : substituting gives , so and , .
Step 2. Normalize first. Divide by : , so the forcing seen by the formulae is — not . This is the trap from the warning box.
Step 3. Wronskian: , nonzero for , confirming independence.
Step 4. Master formulae: and . Integrate: , .
Step 5. Assemble: . The particular solution is .
Step 6. Check against the original (un-normalized) equation: . Verified. The check uses on the right because we back-substitute into the original equation, while the formula used — the factor of is exactly the normalization.
Physics of the portrait
Variation of parameters is where three centuries of mechanics and analysis converge: a computational trick born in the perturbation theory of the planets, sharpened into a general method for linear equations, and eventually recognized as the classical shadow of the Green's function.
Origins · 1 minJoseph-Louis Lagrange and how this was discovered
Joseph-Louis Lagrange gave the method its name and its rigour. Working on the slow, cumulative perturbations of planetary orbits — problems where the "constants" of a Keplerian ellipse drift over centuries under the tug of other planets — he developed the variation of arbitrary constants (la variation des constantes arbitraires), promoting orbital elements to slowly varying functions of time. Euler had already varied constants in specific perturbation calculations from the 1740s, but it was Lagrange who, in memoirs of the 1770s and then decisively in his celestial-mechanics work around 1808–1810, turned the device into a systematic algorithm and extended it to general linear differential equations. The auxiliary constraint that makes the method collapse so cleanly is precisely his — a deliberate choice among the redundant freedoms, the same instinct for economical structure that runs through his Mécanique analytique of 1788, where he banished geometric diagrams in favour of pure analysis. The coefficient matrix of his linear system would later be named the Wronskian, after Józef Hoene-Wroński, and the kernel his integrals produce would be recognized as George Green's function. What Lagrange bequeathed is the enduring idea that the solution of the forced problem is encoded entirely in the free problem — you need only let its constants breathe.
Going further
Texts. Boyce & DiPrima, Elementary Differential Equations, §3.6 (variation of parameters, second order) · Arfken & Weber, Mathematical Methods for Physicists, 7th ed., Ch. 7 (ODEs) and Ch. 10 (Green's functions) · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., §15.2 · Stone & Goldbart, Mathematics for Physics, Ch. 1–2 (ODE methods and Green's functions) · Hassani, Mathematical Physics, Ch. 14 · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 2. The master formulae , follow from Cramer's rule on the Wronskian system. The secant example is confirmed by direct substitution (). The Cauchy–Euler example is confirmed by back-substitution (). The Duhamel kernel and the Bessel Wronskian are standard results.
Prerequisites. Linear Second-Order ODEs · The Wronskian and Linear Independence · Reduction of Order · First-Order Ordinary Differential Equations. Leads to. Two-Point Boundary-Value Problems · Sturm–Liouville Theory · Existence and Uniqueness Theorems for ODEs.
Ask the tutor: Bring me any inhomogeneous linear ODE and I will walk you through normalizing it, building the Wronskian, and turning the master formulae into a checked particular solution.
When should I use variation of parameters instead of undetermined coefficients?
Use undetermined coefficients when the forcing is of exponential–polynomial–sinusoidal type (, , , and products thereof), because guessing a trial form and matching coefficients is faster and avoids integration. Reach for variation of parameters the moment the forcing falls outside that family — , , , , or tabulated/measured data — or when the coefficients are variable rather than constant. Variation of parameters is strictly more general: it works for any continuous forcing once the homogeneous solutions are known, at the cost of possibly non-elementary integrals. In short, undetermined coefficients is the specialist shortcut; variation of parameters is the universal tool.
Why can I choose the auxiliary constraint so freely?
Because the ansatz introduces two unknown functions but the original ODE imposes only one equation on them. That mismatch leaves exactly one degree of freedom, and you are entitled to spend it however you like without changing the set of achievable . Lagrange's choice is not the only legal constraint — infinitely many would do — but it is the one engineered so that the second derivatives of the coefficients never appear, leaving a first-order algebraic system instead of a harder second-order one. A different constraint would still give a correct particular solution, just via messier algebra. The freedom is real; the constraint is a smart convention, not a law.
How is variation of parameters related to reduction of order?
Reduction of order is variation of parameters with a single known solution. If you know only , you can still write — the ansatz with one drifting coefficient — and because there is only one unknown function, there is no redundant freedom and no auxiliary constraint to impose. Substituting into the ODE yields a first-order equation for , which you solve to recover the missing second solution and, with the same stroke, a particular solution. So the two methods are one idea at different ranks: reduction of order is the rank-one case, variation of parameters the full-rank generalization once a complete fundamental system is available.
Why does a periodic forcing like sec x produce a non-periodic answer?
Because contains spectral content that overlaps the oscillator's natural frequency. Driving a lossless oscillator at (or overlapping) its resonance pumps energy in coherently, and the amplitude grows without bound — the mathematical signature is a secular term, here , whose envelope rises linearly with . This is the same mechanism that makes produce . The bounded part of the answer, , is the ordinary forced response; the unbounded part is resonance made visible. Real systems have damping, which caps the growth, but the undamped model exposes the resonant tendency cleanly.
What happens to the arbitrary constants from the indefinite integrals?
Nothing harmful. When you integrate and you may add arbitrary constants and ; these contribute to , which is just another homogeneous solution. Since the general solution already carries a complementary function , those extra pieces merge into it and shift the meaning of but change nothing physical. This is why textbooks drop the constants when computing : any specific antiderivative gives a valid particular solution, and the family of all particular solutions differs only by homogeneous terms. Choosing definite limits from a base point is the systematic way to fix them, and it is what yields the Green's-function kernel with zero initial conditions.
Does the method extend to systems and higher-order equations?
Yes, cleanly. For an -th order equation you promote all constants to functions and impose constraints that zero the successive lower-derivative combinations for ; the final equation carries the forcing. The resulting linear system has the full Wronskian as its determinant and is solved by Cramer's rule. For first-order systems the same idea reads , where is a fundamental matrix — the matrix Wronskian — and plays the role of dividing by . The structure is identical at every rank.