Variation of Parameters
Ch 11 — Part II — Higher-Order & Nonlinear
Variation of parameters constructs a particular solution of a linear ODE from a known basis of the homogeneous equation, for arbitrary continuous forcing \(g(t)\).
Formula (2nd order)
Let \(y_1, y_2\) be a basis of solutions of \(y'' + p y' + q y = 0\), with Wronskian \(W = y_1 y_2' - y_1' y_2\). For \(y'' + p y' + q y = g(t)\), $$y_p(t) = -y_1(t) \int \frac{y_2(t) g(t)}{W(t)}\,dt + y_2(t) \int \frac{y_1(t) g(t)}{W(t)}\,dt.$$
When to use
Use when undetermined coefficients doesn't apply (e.g. \(g(t) = \tan t\), \(1/t\), \(\ln t\)). Works for any continuous forcing, at the cost of computing two integrals.
Practice Problems
Hint
Solution
\(y_p = -\cos t \int \sin t \sec t \,dt + \sin t \int \cos t \sec t \,dt = -\cos t \int \tan t \,dt + \sin t \int 1\,dt = -\cos t(-\ln|\cos t|) + t \sin t = \cos t \ln|\cos t| + t \sin t\).
Answer: \(y_p = \cos t\,\ln|\cos t| + t\sin t.\)
Hint
Solution
\(y_p = -e^t \int \frac{e^{-t}\cdot e^t}{-2}\,dt + e^{-t} \int \frac{e^t \cdot e^t}{-2}\,dt = \tfrac{1}{2} e^t \cdot t - \tfrac{1}{4} e^{-t} e^{2t} = \tfrac{t}{2} e^t - \tfrac{1}{4} e^t\). The second term is in the homogeneous kernel and can be absorbed.
Answer: \(y_p = \tfrac{t}{2} e^t\) (up to homogeneous).
Hint
Solution
\(y_1, y_2\) linearly independent solutions of the homogeneous equation; \(p, q, g\) continuous on the interval.
Answer: See solution.