6.4 Nonhomogeneous Linear ODEs: Undetermined Coefficients and Variation of Parameters
Key Takeaways
- The general solution to a nonhomogeneous linear ODE $L[y] = g(x)$ is $y(x) = y_h(x) + y_p(x)$, where $y_h$ is the general complementary solution to $L[y] = 0$ and $y_p$ is any particular solution.
- The method of undetermined coefficients constructs particular trial solutions for polynomial, exponential, and sinusoidal forcing terms; if any term in the trial solution duplicates a term in $y_h$, it must be multiplied by $x^s$, where $s$ is the multiplicity of the corresponding characteristic root.
- The method of variation of parameters applies to any continuous forcing function $g(x)$, yielding $y_p(x) = -y_1(x) \int \frac{y_2(x) g(x)}{W(x)}\,dx + y_2(x) \int \frac{y_1(x) g(x)}{W(x)}\,dx$, provided the ODE is in standard form with leading coefficient 1.
- In harmonic oscillators $m x'' + b x' + k x = F_0 \cos(\omega t)$, pure resonance occurs when damping $b = 0$ and the driving frequency matches the natural frequency $\omega = \omega_0 = \sqrt{k/m}$, producing an unbounded response $x_p(t) \propto t \sin(\omega_0 t)$.
6.4 Nonhomogeneous Linear ODEs: Undetermined Coefficients and Variation of Parameters
Nonhomogeneous linear differential equations appear frequently on the GRE Mathematics Subject Test in both theoretical contexts and physical applications. Candidates must master two distinct techniques for finding particular solutions: the algebraic Method of Undetermined Coefficients (with its critical multiplication rule) and the universal Method of Variation of Parameters.
Structure of the General Solution
Consider the second-order nonhomogeneous linear differential equation: where $P(x)$, $Q(x)$, and $g(x)$ are continuous on an interval $I$.
- Complementary (Homogeneous) Solution: The solution to the corresponding homogeneous equation $L[y] = 0$ is $y_h(x) = c_1 y_1(x) + c_2 y_2(x)$, where {y_1, y_2} is a fundamental set of solutions.
- Particular Solution: Any single function $y_p(x)$ that satisfies $L[y_p] = g(x)$.
- Structure Theorem: If $y(x)$ is any solution to $L[y] = g(x)$, then $L[y - y_p] = L[y] - L[y_p] = g(x) - g(x) = 0$. Therefore, $y - y_p$ must be a complementary solution $y_h$, establishing:
- Superposition of Forcing Terms: If $g(x) = g_1(x) + g_2(x)$, and $y_{p1}, y_{p2}$ satisfy $L[y_{p1}] = g_1$ and $L[y_{p2}] = g_2$, then $y_p = y_{p1} + y_{p2}$ satisfies $L[y_p] = g_1 + g_2$.
Method of Undetermined Coefficients
The Method of Undetermined Coefficients applies to linear differential equations with constant coefficients: where the forcing function $g(x)$ is a linear combination of polynomials, exponentials, sines, and cosines.
Standard Trial Forms
| Forcing Term $g(x)$ | Basic Trial Form for $y_p(x)$ |
|---|---|
| Polynomial $P_m(x) = a_m x^m + \dots + a_0$ | $A_m x^m + A_{m-1} x^{m-1} + \dots + A_0$ |
| Exponential $e^{\alpha x}$ | $A e^{\alpha x}$ |
| Sinusoid $\cos(\beta x)$ or $\sin(\beta x)$ | $A \cos(\beta x) + B \sin(\beta x)$ |
| Product $P_m(x) e^{\alpha x}$ | $(A_m x^m + \dots + A_0) e^{\alpha x}$ |
| Product $e^{\alpha x}\cos(\beta x)$ or $e^{\alpha x}\sin(\beta x)$ | $e^{\alpha x}[A \cos(\beta x) + B \sin(\beta x)]$ |
| Combination $P_m(x) e^{\alpha x} \cos(\beta x)$ | $e^{\alpha x}[(A_m x^m + \dots) \cos(\beta x) + (B_m x^m + \dots) \sin(\beta x)]$ |
The Multiplication Rule
If any term in the basic trial form duplicates a solution to the homogeneous equation $a y'' + b y' + c y = 0$, the entire trial form associated with that root must be multiplied by $x^s$: where $s$ is the smallest non-negative integer ($s = 0, 1,$ or $2$) such that no term in $y_p(x)$ is a solution to the homogeneous equation.
- Equivalently, $s$ is the algebraic multiplicity of the forcing frequency $\alpha + i\beta$ as a root of the characteristic equation $a r^2 + b r + c = 0$.
Method of Variation of Parameters
Variation of Parameters is a universal technique that works for any continuous forcing function $g(x)$—including non-elementary terms such as $\tan x$, $\sec x$, $\ln x$, or $\frac{1}{1 + e^x}$—and applies to equations with variable coefficients.
Derivation and Formulas
Given the standard form equation with leading coefficient 1: Let {y_1, y_2} be a fundamental set of solutions to the homogeneous equation with Wronskian $W(x) = y_1 y_2' - y_1' y_2 \neq 0$.
We replace the constants $c_1, c_2$ with functions $u_1(x), u_2(x)$: Imposing the standard auxiliary condition $u_1' y_1 + u_2' y_2 = 0$, differentiating, and substituting into the ODE yields the system:
Applying Cramer's rule yields the derivatives of the parameter functions: Integrating gives the particular solution formula:
Harmonic Oscillators: Free, Damped, and Forced Motion
The physical model for a damped mechanical oscillator or series RLC circuit is: where $m > 0$ is mass, $b \ge 0$ is the damping coefficient, and $k > 0$ is the spring stiffness constant.
Damping Regimes ($F(t) = 0$)
The characteristic equation is $m r^2 + b r + k = 0$ with discriminant $\Delta = b^2 - 4mk$:
- Overdamped ($b^2 - 4mk > 0$): Two distinct negative real roots $r_1, r_2 < 0$. Motion decays exponentially to equilibrium without oscillating.
- Critically Damped ($b^2 - 4mk = 0$): Repeated negative real root $r = -\frac{b}{2m}$. Represents the quasi-monotonic decay that returns to equilibrium most rapidly without oscillating ($x(t) = (c_1 + c_2 t)e^{r t}$).
- Underdamped ($b^2 - 4mk < 0$): Complex roots $-\gamma \pm i\omega_d$, where $\gamma = \frac{b}{2m}$ is the damping factor and $\omega_d = \sqrt{\omega_0^2 - \gamma^2}$ is the quasi-frequency (with $\omega_0 = \sqrt{k/m}$). Motion consists of exponentially decaying oscillations: $x(t) = A e^{-\gamma t} \cos(\omega_d t - \phi)$.
Resonance in Driven Undamped Systems
Consider an undamped oscillator driven by a sinusoidal force:
- Non-Resonant Driving ($\omega \neq \omega_0$): Undetermined coefficients yields a bounded particular solution:
- Pure Resonance ($\omega = \omega_0$): The driving frequency matches the natural frequency. By the multiplication rule ($s = 1$), the trial form is $x_p(t) = t(A \cos(\omega_0 t) + B \sin(\omega_0 t))$. Substituting yields: The amplitude $\frac{F_0 t}{2\omega_0}$ grows linearly without bound as $t \to \infty$, demonstrating mechanical resonance.
Step-by-Step Worked Problems
Problem 1: Variation of Parameters with a Tangent Forcing Term
Find the general solution to $y'' + y = \tan x$ on the interval $(-\pi/2, \pi/2)$.
Solution:
- Solve the homogeneous equation: $r^2 + 1 = 0 \implies y_1 = \cos x$, $y_2 = \sin x$.
- Compute the Wronskian:
- The forcing term is $g(x) = \tan x$. Set up integrals for $u_1$ and $u_2$:
- Assemble the particular solution:
- The general solution is $y(x) = c_1 \cos x + c_2 \sin x - \cos x \ln|\sec x + \tan x|$.
Problem 2: Undetermined Coefficients with Resonance
Find a particular solution to $y'' + 4y = 6 \sin(2x) + 8 e^{2x}$.
Solution:
- Solve homogeneous equation: $r^2 + 4 = 0 \implies r = \pm 2i$. Homogeneous basis: ${\cos(2x), \sin(2x)}$.
- Decompose $g(x) = g_1(x) + g_2(x)$ where $g_1 = 6\sin(2x)$ and $g_2 = 8e^{2x}$.
- For $g_1(x)$: The driving frequency $2i$ matches the characteristic root with multiplicity $s = 1$. The trial form is: Computing derivatives: Equating coefficients: $-4A = 6 \implies A = -\frac{3}{2}$, and $4B = 0 \implies B = 0$. Thus $y_{p1} = -\frac{3}{2} x \cos(2x)$.
- For $g_2(x)$: The exponent $r = 2$ is not a characteristic root ($s = 0$). Trial form: $y_{p2} = C e^{2x}$. Thus $y_{p2} = e^{2x}$.
- Combine to get $y_p(x) = -\frac{3}{2} x \cos(2x) + e^{2x}$.
GRE Exam Traps & Pitfalls
Trap 1: Leading Coefficient Omission in Variation of Parameters The variation of parameters formulas $u_1' = -y_2 g/W$ and $u_2' = y_1 g/W$ strictly assume the standard form $y'' + P y' + Q y = g(x)$. If the equation is presented as $a y'' + b y' + c y = f(x)$, you must use $g(x) = f(x)/a$. Failing to divide by $a$ overestimates the particular solution by a factor of $a$.
Trap 2: Incomplete Trial Form for Sinusoidal Forcing When $g(x) = \sin(\beta x)$, students often propose $y_p = A \sin(\beta x)$. Because the first derivative produces $\cos(\beta x)$, the trial form must contain both sine and cosine terms: $y_p = A \cos(\beta x) + B \sin(\beta x)$.
Trap 3: Multiplying Only the Duplicated Sub-Term by $x^s$ If $g(x) = (2x + 1)e^{2x}$ and $e^{2x}$ belongs to $y_h$, the entire polynomial block must be multiplied by $x$: $y_p = x(Ax + B)e^{2x} = (Ax^2 + Bx)e^{2x}$, not $Ax^2 e^{2x} + B e^{2x}$.
What is the correct trial form y_p(x) for the method of undetermined coefficients for the differential equation y'' - 4y' + 4y = 3x^2 e^{2x} + 5 \cos(2x)?
A particular solution to the differential equation y'' + 4y = 4 \sec(2x) on the interval (-\pi/4, \pi/4) obtained via variation of parameters is given by which expression?
An undamped harmonic oscillator governed by x'' + 9x = 12 \cos(3t) satisfies initial conditions x(0) = 0 and x'(0) = 1. What is the position x(t) for all t >= 0?