Module III·Article II·~4 min read

Method of Variation of Constants

Higher-Order Linear ODEs

Turn this article into a podcast

Pick voices, format, length — AI generates the audio

Method of Variation of Constants and Undetermined Coefficients

Why the Method of Variation of Constants Is Needed

We know how to find the general solution of the homogeneous equation. But real systems must respond to external influences—F(t) in the pendulum equation, EMF in the electric circuit equation, input signal in a control system. This makes the equation nonhomogeneous: L[y] = f(x). The method of variation of constants (Lagrange's method) is the most general and elegant way to find a particular solution when the fundamental system of solutions (FSS) of the homogeneous equation is known.

The name "variation of constants" reflects the idea: in the general solution of the homogeneous equation c₁y₁ + c₂y₂ + ... + cₙyₙ, we replace the constants cᵢ by functions cᵢ(x)—"varying" them so as to satisfy the nonhomogeneous equation.

Method of Variation of Constants: General Scheme

Let {y₁, ..., yₙ} be the fundamental system of solutions of the homogeneous equation. We seek a particular solution:

y_p = c₁(x) y₁ + c₂(x) y₂ + ... + cₙ(x) yₙ.

We introduce additional conditions (so that the system is determined uniquely):

c₁' y₁ + ... + cₙ' yₙ = 0
c₁' y₁' + ... + cₙ' yₙ' = 0
...
c₁' y₁^{(n-2)} + ... + cₙ' yₙ^{(n-2)} = 0

and the equation c₁' y₁^{(n-1)} + ... + cₙ' yₙ^{(n-1)} = f(x).

This is a system of n linear equations for c₁', ..., cₙ'. The determinant of the system matrix is the Wronskian W ≠ 0. By Cramer's formulas: cᵢ'(x) = Wᵢ(x) / W(x), where Wᵢ is the Wronskian with the i-th column replaced by (0, 0, ..., 0, f(x)).

Formulas for Second-Order Equations

For y'' + p(x)y' + q(x)y = f(x) with FSS {y₁, y₂} and W = y₁y₂' − y₁'y₂:

c₁'(x) = −y₂(x)f(x) / W(x), c₂'(x) = y₁(x)f(x) / W(x).

y_p(x) = y₁(x) ∫{x₀}^x (−y₂(t)f(t) / W(t)) dt + y₂(x) ∫{x₀}^x (y₁(t)f(t) / W(t)) dt.

Expanded Example: Solve y'' − 2y' + y = eˣ/x.

Homogeneous: λ² − 2λ + 1 = 0 → λ = 1 (multiplicity 2). FSS: {y₁, y₂} = {eˣ, xeˣ}.

Wronskian: W = y₁y₂' − y₁'y₂ = eˣ(eˣ + xeˣ) − eˣ · xeˣ = e²ˣ + xe²ˣ − xe²ˣ = e²ˣ.

Find c₁', c₂': c₁' = −xeˣ · (eˣ/x) / e²ˣ = −1. c₂' = eˣ · (eˣ/x) / e²ˣ = 1/x.

Integrate: c₁ = −x + A; c₂ = ln x + B.

Particular solution: y_p = (−x)eˣ + (ln x)(xeˣ) = eˣ(−x + x ln x) = xeˣ(ln x − 1).

General solution: y = (C₁ + C₂ x)eˣ + xeˣ(ln x − 1).

Method of Undetermined Coefficients

For equations with constant coefficients and a right-hand side of a "special" type—it's easier to guess the structure of the particular solution.

If f(x) = Pₘ(x)e^{αx} (product of a polynomial of degree m and an exponential):

y_p = x^s · Qₘ(x) · e^{αx}, where Qₘ is an unknown polynomial of degree m, s = 0 if α is not a root of the characteristic equation, s = k if α is a root of multiplicity k.

If f(x) = e^{αx}[A cos(βx) + B sin(βx)]:

y_p = x^s · e^{αx} · [C cos(βx) + D sin(βx)], where s = 0 or s = multiplicity of the root α + βi.

Expanded Example: y'' − 2y' + y = xeˣ.

Root λ = 1—multiplicity 2. Right side: P₁(x)e^{1·x} = xeˣ. Here m = 1, α = 1, multiplicity s = 2.

y_p = x² · (ax + b) · eˣ = (ax³ + bx²) eˣ.

Find derivatives: y_p' = (3ax² + 2bx)eˣ + (ax³ + bx²)eˣ = eˣ(ax³ + (3a+b)x² + 2bx).
y_p'' = eˣ(ax³ + (6a+b)x² + (6a+4b)x + 2b).

Substitute into y'' − 2y' + y: all terms with ax³ and bx² drop out (consequence of multiple root). Remaining: eˣ · (6ax + 2b) = xeˣ. Hence: 6a = 1, 2b = 0. a = 1/6, b = 0.

Answer: y_p = (x³/6)eˣ. General: y = (C₁ + C₂x)eˣ + (x³/6)eˣ.

Resonance in Physics

The case s ≥ 1 (α is a root of the characteristic equation) in physics is called resonance. If the frequency of an external force matches the system's own frequency, the amplitude of oscillations grows as t (linearly with time). For ẍ + ω₀²x = cos(ω₀t): y_p = t·sin(ω₀t)/(2ω₀). Amplitude → ∞. This resonance growth destroyed the Tacoma Bridge in 1940 and is often taken into account in engineering calculations for earthquake resistance.

Green's Function: Principle of Superposition

Green's function G(x, t) is the solution of the equation L[G] = δ(x − t) with zero initial conditions. Physically: the system's response to an instantaneous unit impulse at moment t.

By linearity: y_p(x) = ∫_{x₀}^x G(x, t) f(t) dt.

Any loading f(t) can be represented as a sum of impulses, and the response is the sum of responses to each impulse. This is the principle of superposition in integral form.

Question for contemplation: Why does resonance arise precisely when the frequency of external influence matches the system's own frequency? How do engineers prevent destructive resonance in bridges and buildings?

§ Act · what next