4.6.15 · D2Ordinary Differential Equations

Visual walkthrough — Non-homogeneous — variation of parameters

2,091 words10 min readBack to topic

Step 1 — Start with the balanced seesaw

WHAT. Before any pushing, look at the homogeneous equation — the same equation with the right side set to zero: Its two independent solutions we call and . "Independent" means neither is just a scaled copy of the other — they are genuinely different shapes. Any combination with constant numbers also solves it.

WHY. These two shapes are our raw building material. They already make the left side collapse to zero all by themselves — that is exactly the property we will exploit. (Where do come from? For constant you get them from the characteristic equation — see Second-order linear homogeneous ODE.)

PICTURE. Two smooth curves, our "blocks." Below them, the same two blocks mixed with fixed strengths into one combined curve. Constant strengths = a curve that solves the zero equation but cannot cope with a push.

Figure — Non-homogeneous — variation of parameters

Step 2 — Let the constants breathe

WHAT. Replace the frozen numbers by moving functions . We guess a particular solution of the shape This educated guess is called the ansatz (German for "attempt/setup").

WHY. Constant strengths cannot absorb a moving push . If we let the strengths change moment-to-moment, we get a live dial we can turn exactly enough to cancel the push. This is where the name comes from: we let the parameters vary.

PICTURE. The two fixed dials of Step 1 become knobs whose settings slide as moves. The blended curve now flexes to follow a wiggly target.

Figure — Non-homogeneous — variation of parameters

Step 3 — We have one equation, two unknowns — so we buy a free choice

WHAT. Differentiate the ansatz once. Using the product rule (rate of a product = firstrate-of-second + secondrate-of-first) on each term:

Here is the key observation. We are trying to pin down two unknown functions , but the ODE is only one equation. Two unknowns, one constraint — we are underdetermined, so we are allowed to invent one extra equation of our own choosing. We choose:

WHY. Look at the second bracket above. If we let it survive, differentiating again would produce and — second derivatives of the unknowns, which is harder than the problem we started with. Killing that bracket now keeps the whole system first-order in the strengths. It is a bargain we are entitled to make because of the extra freedom.

PICTURE. A balance beam: the two "strength-change" terms and are equal and opposite, so they cancel to zero — we deliberately set them against each other.

Figure — Non-homogeneous — variation of parameters

Step 4 — Differentiate again and feed it to the ODE

WHAT. After Condition 1, the first derivative simplifies to . Differentiate this (product rule again): Now substitute into and gather terms by and :

WHY. Each big bracket is exactly the homogeneous equation applied to or — and those are zero by Step 1. That is the entire magic: our building blocks were chosen precisely so these terms vanish. What survives is

PICTURE. Two columns of terms marked "" (crossed out because solve the homogeneous ODE), leaving only the small green survivor that must equal the push .

Figure — Non-homogeneous — variation of parameters

Step 5 — Two blocks became two tidy equations

WHAT. Collect Conditions 1 and 2: Read the unknowns as and — the rates at which our strengths change. Write it as a matrix acting on those rates:

WHY. A two-by-two linear system is something we can crank open by Cramer's Rule — no cleverness needed. The only thing that can go wrong is if the matrix has no inverse, which is the next step's warning.

PICTURE. The system as a machine: known matrix (built from the blocks and their slopes) times the unknown rate-vector equals the demand vector .


Step 6 — Cramer's rule, and the Wronskian appears

WHAT. Cramer's Rule says: to get each unknown, replace its column with the right-hand side and divide by the matrix determinant. The determinant of our matrix is called the Wronskian. Applying the rule:

Term by term: in the numerator determinant is — that stray minus is not a mistake to fix, it is Cramer's rule doing its job. In it is .

WHY. sits in the denominator, so we need . The Wronskian is exactly the honesty-check that are truly independent: would mean one block is a copy of the other, the matrix is singular, and there is no unique solution. Independence guarantees , so we may divide.

PICTURE. The Wronskian as the signed area of the parallelogram spanned by the vectors and — nonzero area = genuinely different directions = the method runs.


Step 7 — Integrate the rates back into strengths, then assemble

WHAT. We now know the rates . To recover the strengths we undo the derivative — we integrate: Feed these back into the ansatz to get the finished particular solution:

WHY. A derivative told us the slope of each strength; integration recovers the strength itself. We drop the constants of integration: a constant times or is just a homogeneous solution, which the part already covers. We only need one particular solution.

PICTURE. Left panel: the two rate curves . Middle: integration accumulates area to build the strength curves . Right: blocks strengths add up to the particular solution that tracks the push.


Step 8 — Degenerate and edge cases (never left unshown)

WHAT & WHY — three ways it can go sideways, and what happens:

  • (blocks secretly identical). Then for some constant ; the parallelogram in Step 6 flattens to a line of zero area. Cramer's rule divides by zero — the method stalls. Fix: find a genuinely independent second solution first (e.g. via Reduction of Order).
  • (no push). Then , so are constants and collapses back into . The machinery correctly reports "nothing extra to do" — a reassuring consistency check.
  • overlaps a homogeneous solution (e.g. when ). Undetermined coefficients would need an awkward -multiplier rule here; variation of parameters just integrates and the needed factor of appears automatically (as in the parent's Example 2, where ). No special-casing.

PICTURE. Three mini-panels: (1) two collapsed parallel blocks with crossed out; (2) a flat "no push" line where is just the homogeneous curve; (3) a resonant case where the answer naturally grows an factor.


The one-picture summary

Everything at once: start with two balanced blocks → let their strengths vary → the free choice (Condition 1) and the ODE (Condition 2) give two equations → Cramer's rule with the Wronskian below → integrate the rates → assemble .

Recall Feynman retelling of the whole walkthrough

You own two "wiggle blocks" that perfectly balance a still seesaw — mix them in any fixed amounts and the seesaw stays solved (Step 1). Now someone pushes the seesaw; fixed amounts can't keep up, so you let the amounts change as time goes on (Step 2). Two unknown dials, but only one rule (the ODE) to satisfy — so you're allowed to invent one convenient rule of your own, and you pick the one that stops your algebra from exploding into second derivatives (Step 3). Differentiate again, drop it into the equation, and the block terms vanish because the blocks already solve the quiet seesaw — leaving one clean equation that says "the changing dials must exactly equal the push" (Step 4). Two rules, two unknown dial-rates: that's a baby 2×2 system (Step 5). Cramer's rule cracks it, and the number sitting underneath — the Wronskian — is your fairness scale checking the two blocks are really different (Step 6). The rules give you the dials' speeds; integrate to get the dials themselves, then mix blocks by dials to get your answer (Step 7). And if the blocks are secret twins the scale reads zero and you must fetch a new block; if nobody pushes, the dials freeze and you get nothing extra — exactly as it should be (Step 8).

Recall

Why is in the denominator, and what does mean? ::: is the determinant Cramer's rule divides by; means are linearly dependent (parallelogram of zero area), the system is singular, and the method fails. Which condition is a free choice and which comes from the ODE? ::: is our free choice; is forced by substituting into the ODE. Why does no special "resonance" rule appear in VoP? ::: The integration automatically produces any needed factor of ; there is no guess to correct.


Connections

  • Wronskian — the denominator ; nonzero = independent blocks = method runs.
  • Cramer's Rule — cracks the 2×2 system and supplies the minus sign in .
  • Second-order linear homogeneous ODE — where come from.
  • Reduction of Order — how to build a second independent block when .
  • Method of Undetermined Coefficients — the faster, narrower alternative.
  • Green's function — packaging this whole integral into a single kernel.