SECTION 1
Historical Context & Motivation
Throughout the 1700s and 1800s, mathematicians and physicists were racing to model real-world phenomena — from planetary orbits to vibrating strings — using differential equations. They quickly discovered that many physical systems lead to nonhomogeneous differential equations, equations where an external force or input drives the system. The simplest method for solving these, called undetermined coefficients, only works when the driving force has a very specific, "nice" form — like a polynomial, exponential, or sine function. But what happens when the driving force is something messier, like tan(x) or 1/x? That's the gap the method of variation of parameters was designed to fill.
1748 • Euler's Early Work
1774 • Lagrange Introduces Variation of Parameters
1809 • Refinement Through Celestial Mechanics
1900s • Modern Textbook Standard
The key question that variation of parameters answers is this: if we already know how to solve the homogeneous equation (with no driving force), can we cleverly modify that solution to handle any driving force? The answer, as Lagrange showed, is yes — and the trick is to let the "constants" in the homogeneous solution become functions. That's why the method is called variation of parameters: the parameters (constants) are allowed to vary.
SECTION 2
Core Principles & Definitions
Before diving into the method itself, you need to understand a few foundational ideas. Each of these concepts plays a critical role in how variation of parameters works, so take a moment to internalize each one.
Homogeneous vs. Nonhomogeneous
Complementary Solution yc
Particular Solution yp
The Wronskian W
The Key Idea: Let Constants Vary
KEY TAKEAWAY
SECTION 3
Visual Explanation
The diagram below shows the overall logic of variation of parameters. You start with a nonhomogeneous ODE, find the homogeneous (complementary) solution with its two independent solutions y₁ and y₂, compute the Wronskian, and then use integration formulas to find the unknown functions u₁ and u₂. Finally, you assemble the particular solution and add it to the complementary solution to get the general answer.
The flowchart highlights the sequential, step-by-step nature of the method. Each box depends on the previous one. The most common source of errors is in Step 3, where you must correctly set up and solve the system of equations for u₁′ and u₂′. We'll see how that system is derived in the next section.
SECTION 4
Mathematical Framework
Let's set up the mathematics carefully. We begin with a second-order linear nonhomogeneous ODE in standard form, meaning the coefficient of y″ is 1. If it isn't already 1, divide the entire equation by the leading coefficient before applying the method.
STANDARD FORM
Here, p(x) and q(x) are the coefficient functions, and g(x) is the nonhomogeneous (driving) term. The leading coefficient of y″ must be 1.
We assume we already know two linearly independent solutions y₁ and y₂ of the corresponding homogeneous equation (where g(x) = 0). The particular solution takes the form:
PARTICULAR SOLUTION FORM
The functions u₁(x) and u₂(x) are the "varied parameters" — they replace the constants c₁ and c₂ from the complementary solution.
When we substitute this guess into the ODE and simplify, we impose an extra condition — called the Lagrange condition — to keep things manageable: u₁′y₁ + u₂′y₂ = 0. This constraint, combined with the ODE itself, produces a clean system of two equations in the two unknowns u₁′ and u₂′.
SYSTEM FOR u₁′ AND u₂′
Solving this 2×2 system using Cramer's rule (or substitution) gives the formulas for u₁′ and u₂′ in terms of the Wronskian.
VARIATION OF PARAMETERS FORMULAS
Where W is the Wronskian: W = y₁y₂′ − y₂y₁′. You then integrate u₁′ and u₂′ to find u₁ and u₂.
Don't Forget!
SECTION 5
The Wronskian — Your Key Tool
The Wronskian is the single most important computational tool in variation of parameters. Named after the Polish mathematician Józef Hoene-Wroński, it is a 2×2 determinant that tells you whether two solutions y₁ and y₂ are truly independent — and it appears in every formula for u₁′ and u₂′. If the Wronskian is zero everywhere, the two solutions are not independent, and the method cannot proceed.
In practice, computing the Wronskian is straightforward. You write down your two solutions y₁ and y₂, differentiate each one to get y₁′ and y₂′, and then evaluate the 2×2 determinant. For constant-coefficient equations (the kind you'll see most often at this level), the Wronskian often turns out to be a simple exponential or even a constant — as in the cos x, sin x example above, where W = 1.
| Homogeneous Solutions | y₁′, y₂′ | Wronskian W |
|---|---|---|
| y₁ = eˣ, y₂ = e²ˣ | eˣ, 2e²ˣ | eˣ · 2e²ˣ − e²ˣ · eˣ = e³ˣ |
| y₁ = cos 2x, y₂ = sin 2x | −2 sin 2x, 2 cos 2x | 2cos²2x + 2sin²2x = 2 |
| y₁ = e⁻ˣ, y₂ = xe⁻ˣ | −e⁻ˣ, e⁻ˣ − xe⁻ˣ | e⁻ˣ(e⁻ˣ − xe⁻ˣ) − xe⁻ˣ(−e⁻ˣ) = e⁻²ˣ |
Common Wronskian calculations for frequently encountered solution pairs
SECTION 6
Worked Example
Let's walk through a complete example to see every step of variation of parameters in action. We'll solve the equation y″ + y = sec x. Notice that the right side, sec x, is not an exponential, polynomial, or simple sine/cosine — so the method of undetermined coefficients would fail here. This is exactly the kind of problem where variation of parameters shines.
Solve y″ + y = sec x
- 1
Step 1 — Verify Standard Form
The equation y″ + y = sec x is already in standard form: the coefficient of y″ is 1, p(x) = 0, q(x) = 1, and g(x) = sec x. No division is needed.Standard form confirmed: g(x) = sec x - 2
Step 2 — Solve the Homogeneous Equation
The homogeneous equation is y″ + y = 0. The characteristic equation is r² + 1 = 0, giving r = ±i. The two independent solutions are y₁ = cos x and y₂ = sin x, so the complementary solution is yc = c₁ cos x + c₂ sin x.y₁ = cos x, y₂ = sin x - 3
Step 3 — Compute the Wronskian
We need y₁′ = −sin x and y₂′ = cos x. Then W = y₁y₂′ − y₂y₁′ = (cos x)(cos x) − (sin x)(−sin x) = cos²x + sin²x.W = 1 - 4
Step 4 — Find u₁′ and u₂′
Using the formulas: u₁′ = −y₂ · g(x) / W = −(sin x)(sec x) / 1 = −sin x · sec x = −sin x / cos x = −tan x. And u₂′ = y₁ · g(x) / W = (cos x)(sec x) / 1 = cos x · sec x = 1.u₁′ = −tan x, u₂′ = 1 - 5
Step 5 — Integrate to Find u₁ and u₂
u₁ = ∫(−tan x) dx = ln|cos x| (we drop the constant of integration since we only need one particular solution). u₂ = ∫ 1 dx = x.u₁ = ln|cos x|, u₂ = x - 6
Step 6 — Assemble the General Solution
The particular solution is yp = u₁y₁ + u₂y₂ = (ln|cos x|)(cos x) + (x)(sin x) = cos x · ln|cos x| + x sin x. The general solution is y = yc + yp.y = c₁ cos x + c₂ sin x + cos x · ln|cos x| + x sin x
Why This Matters
SECTION 7
Strengths, Limitations & Comparison
You might wonder: if variation of parameters works for any g(x), why do we even bother with undetermined coefficients? The answer is efficiency. When undetermined coefficients applies, it's often faster because it avoids integration. But it only applies to a limited set of right-hand-side functions. Here's a side-by-side comparison of the two methods.
| Feature | Undetermined Coefficients | Variation of Parameters |
|---|---|---|
| Types of g(x) handled | Polynomials, exponentials, sines, cosines, and products/sums of these | Any continuous g(x) |
| Coefficient requirements | Constant coefficients only | Constant or variable coefficients |
| Guesswork needed? | Yes — you must guess the form of yₚ | No guessing — systematic formulas |
| Integration required? | No (only algebra) | Yes — two integrals needed |
| Typical speed | Faster when applicable | Slower but always works |
| Best used when | g(x) is a standard form | g(x) is non-standard (tan x, sec x, 1/x, etc.) |
Comparison of the two main methods for finding particular solutions
KEY TAKEAWAY
SECTION 8
Connection to Higher-Order & Advanced Theory
Variation of parameters is not limited to second-order equations. The same idea — replace constants in the complementary solution with unknown functions — extends naturally to third-order, fourth-order, and even n-th order linear ODEs. The Wronskian becomes a larger n×n determinant, and you solve an n×n system of equations for u₁′, u₂′, …, uₙ′. The algebra grows, but the principle is identical.
| Feature | Second-Order (This Lesson) | Higher-Order / Advanced |
|---|---|---|
| Number of solutions needed | 2 (y₁, y₂) | n (y₁, y₂, …, yₙ) |
| Wronskian size | 2×2 determinant | n×n determinant |
| System to solve | 2 equations, 2 unknowns | n equations, n unknowns |
| Integrals needed | 2 | n |
| Related advanced topics | Basic application | Green's functions, integral transforms, systems of ODEs |
From second-order to the general n-th order case
In more advanced courses (college-level differential equations and beyond), you'll encounter Green's functions, which can be viewed as a generalization of variation of parameters. The particular solution formula can be rewritten as an integral involving a special function G(x, t) called the Green's function. This perspective connects variation of parameters to powerful tools used in physics, engineering, and applied mathematics.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
The method of variation of parameters is a systematic technique for finding a particular solution to any second-order linear nonhomogeneous ODE y″ + p(x)y′ + q(x)y = g(x). The method works by replacing the constants c₁ and c₂ in the complementary solution with unknown functions u₁(x) and u₂(x). The Wronskian W = y₁y₂′ − y₂y₁′ must be nonzero, confirming that y₁ and y₂ are linearly independent.
The formulas u₁′ = −y₂g(x)/W and u₂′ = y₁g(x)/W give you the derivatives of the unknown functions, which you then integrate to find u₁ and u₂. The general solution is y = c₁y₁ + c₂y₂ + u₁y₁ + u₂y₂. Unlike undetermined coefficients, this method works for any continuous g(x), making it the go-to approach when the driving function has a non-standard form like sec x, tan x, or 1/x.