linear odes
Variation of Parameters
You should know: second order differential equation
Overview
Variation of parameters is a general method for finding a particular solution yₚ of a non-homogeneous linear ODE ay″+by′+cy = g(x), once the homogeneous solutions y₁, y₂ are known. Unlike the method of undetermined coefficients, it works for any forcing function g(x) — not just polynomials, exponentials, sines, and cosines — because it does not guess a form but instead solves directly for coefficient functions u₁(x), u₂(x) that replace the constants C₁, C₂ in the homogeneous solution. The price is that it requires computing the Wronskian and two integrals, which can be messy but always exist in principle. It is the ODE analogue of the variation-of-constants technique used for first-order linear equations.
Intuition
Start from the homogeneous solution C₁y₁+C₂y₂, which solves ay″+by′+cy=0. To handle a nonzero forcing term, let the 'constants' become functions of x, u₁(x) and u₂(x), and ask what those functions must do to make u₁y₁+u₂y₂ satisfy the full equation. Imposing one convenient constraint (u₁′y₁+u₂′y₂=0) to keep the algebra linear turns the problem into a simple 2×2 linear system for u₁′ and u₂′, which integrates to give the particular solution — like adjusting the 'mixing weights' of two fixed ingredient functions as you move along x to match whatever forcing is applied.
Formal Definition
For ay″+by′+cy=g(x) with homogeneous solutions y₁, y₂ and Wronskian W = y₁y₂′ − y₂y₁′, the particular solution is:
Worked Examples
Homogeneous solutions and their Wronskian.
Compute u₁′ and u₂′ from the standard formulas (a=1, g=tan x).
Integrate u₂′ directly.
Integrate u₁′ = -sin x tan x = -(sin²x)/cos x = cos x - sec x.
Assemble yₚ = u₁y₁ + u₂y₂.
Answer: y = C₁cos x + C₂sin x − cos x·ln|sec x + tan x| (this is the standard textbook result; verify by substitution: yₚ″+yₚ reduces to tan x after differentiating twice and using the identity d/dx[ln|sec x+tan x|] = sec x).
Practice Problems
Solve y″ + y = sec x (0<x<π/2) using variation of parameters.
Solve y″ − 4y = e^{2x} using variation of parameters.
A forced oscillator obeys x″ + x = f(t) where f is an arbitrary continuous forcing function measured from a sensor (not a simple polynomial/exponential/sinusoid). Explain why variation of parameters, rather than undetermined coefficients, is the appropriate solution method.
Quiz
Summary
- Variation of parameters finds a particular solution yₚ = u₁y₁+u₂y₂ for ay″+by′+cy=g(x), letting the 'constants' become functions of x.
- It requires the homogeneous solutions y₁, y₂ and their Wronskian, and works for any continuous forcing g(x), unlike undetermined coefficients.
- The formula involves two integrals of g(x) weighted by the homogeneous solutions and divided by the Wronskian.
Mathematics