Differential Equations › Section C · Second order differential equations › Topic C.10
Variation of parameters
Undetermined coefficients only handles a short list of inputs and needs constant coefficients. Variation of parameters has neither limit: given a fundamental set for the homogeneous equation, it produces a particular solution for any continuous input, at the price of two integrals.
Beyond educated guesses
The method of "Undetermined coefficients" cannot cope with an input like \(\sec 2t\) or \(\frac{e^t}{t}\), because no finite guess closes up under differentiation. Nor does it apply when the coefficients vary with \(t\). Variation of parameters, usually credited to Joseph-Louis Lagrange in the eighteenth century, works in both situations. It needs only one thing: a fundamental set \(y_1, y_2\) for the associated homogeneous equation, found by the methods earlier in this section or given to you. The idea is to take the complementary solution \(c_1y_1 + c_2y_2\) and let the constants vary.
Setting up the method
Write the equation in standard form, with leading coefficient 1:
Look for a particular solution \(y_p = u_1y_1 + u_2y_2\), where \(u_1\) and \(u_2\) are functions to be found. The product rule gives
Two unknown functions allow two conditions, and we have only one equation to satisfy, so we are free to impose a second condition. The convenient choice is
which removes the bracket and stops second derivatives of \(u_1\) and \(u_2\) from appearing when \(y_p'\) is differentiated again.
Deriving the formulas
With that choice, \(y_p' = u_1y_1' + u_2y_2'\) and
Substitute into the equation. The terms with \(u_1\) collect into \(u_1\) times the equation applied to \(y_1\), which is zero, and likewise for \(u_2\). What remains is \(u_1'y_1' + u_2'y_2' = g\). Together with the imposed condition, this is a linear system for \(u_1'\) and \(u_2'\) whose determinant is the Wronskian \(W = y_1y_2' - y_1'y_2\), nonzero for a fundamental set. Solving it gives
The recipe
1. Put the equation in standard form and read off \(g(t)\). 2. Find a fundamental set \(y_1, y_2\) and its Wronskian \(W\). 3. Integrate the two formulas to get \(u_1\) and \(u_2\); constants of integration can be dropped, since they only add multiples of \(y_1\) and \(y_2\) to the answer. 4. Form \(y_p = u_1y_1 + u_2y_2\) and simplify, discarding any terms that belong to \(y_c\). In one line,
Memorise the signs: the minus goes with \(u_1\), whose integrand contains \(y_2\).
Worked example: a secant input
Find \(y_p\) for \(y'' + 4y = 8\sec 2t\) on \(-\frac{\pi}{4} < t < \frac{\pi}{4}\). 1. Take \(y_1 = \cos 2t\) and \(y_2 = \sin 2t\), so \(W = 2\cos^2 2t + 2\sin^2 2t = 2\). 2. \(u_1' = -\frac{\sin 2t \cdot 8\sec 2t}{2} = -4\tan 2t\), so \(u_1 = 2\ln(\cos 2t)\), using \(\cos 2t > 0\) on this interval. 3. \(u_2' = \frac{\cos 2t \cdot 8\sec 2t}{2} = 4\), so \(u_2 = 4t\). 4. Then
5. The general solution adds \(c_1\cos 2t + c_2\sin 2t\). Undetermined coefficients could never have produced the logarithm.
Worked example: a repeated root
Find \(y_p\) for \(y'' - 2y' + y = \frac{e^t}{t}\), \(t > 0\). 1. The root 1 is repeated, so \(y_1 = e^t\) and \(y_2 = te^t\), with \(W = e^{2t}\), as "Fundamental sets and the Wronskian" showed. 2. \(u_1' = -\frac{te^t \cdot e^t/t}{e^{2t}} = -1\), so \(u_1 = -t\). 3. \(u_2' = \frac{e^t \cdot e^t/t}{e^{2t}} = \frac{1}{t}\), so \(u_2 = \ln t\). 4. Then \(y_p = -te^t + te^t\ln t\). 5. The term \(-te^t\) is part of \(y_c\), so drop it: \(y_p = te^t\ln t\). 6. Check: with \(y_p' = e^t(t\ln t + \ln t + 1)\) and \(y_p'' = e^t(t\ln t + 2\ln t + 2 + \frac{1}{t})\), the left side reduces to \(\frac{e^t}{t}\).
Worked example: variable coefficients
Find \(y_p\) for \(t^2y'' - 3ty' + 4y = t^3\), \(t > 0\). 1. "Reduction of order" gave \(y_1 = t^2\) and \(y_2 = t^2\ln t\), with \(W = t^3\). 2. Divide by \(t^2\) to reach standard form, so \(g = t\), not \(t^3\). 3. \(u_1' = -\frac{t^2\ln t \cdot t}{t^3} = -\ln t\), so integrating by parts, \(u_1 = t - t\ln t\). 4. \(u_2' = \frac{t^2 \cdot t}{t^3} = 1\), so \(u_2 = t\). 5. Then \(y_p = t^2(t - t\ln t) + t^3\ln t = t^3\). 6. Check: \(t^2(6t) - 3t(3t^2) + 4t^3 = t^3\). Using \(g = t^3\) by mistake would have given \(t^2\) times the correct integrands.
Choosing a method
Variation of parameters always works in principle, but the integrals can be hard or impossible to do in closed form; then \(y_p\) is left as an integral, which is still a valid answer. Undetermined coefficients, when it applies, is usually faster and avoids integration. A sensible rule: for constant coefficients and inputs built from polynomials, exponentials, sines and cosines, use undetermined coefficients; for anything else, or for variable coefficients, use variation of parameters. On a problem where both apply, they must agree up to terms in \(y_c\), which makes a useful check.
Common mistakes to avoid
First, forgetting to divide by the leading coefficient, so that the wrong \(g\) goes into the formulas. Second, losing the minus sign in \(u_1'\), or swapping \(y_1\) and \(y_2\) between the two formulas. Third, computing the Wronskian in the wrong order, which flips the sign of both \(u_1'\) and \(u_2'\) and so of \(y_p\). Fourth, stopping at \(u_1\) and \(u_2\) instead of forming \(u_1y_1 + u_2y_2\). Fifth, ignoring the interval: logarithms such as \(\ln(\cos 2t)\) need \(\cos 2t > 0\), or an absolute value.
Key takeaways
For \(y'' + p(t)y' + q(t)y = g(t)\) in standard form, with a fundamental set \(y_1, y_2\) and Wronskian \(W\), seek \(y_p = u_1y_1 + u_2y_2\) with \(u_1'y_1 + u_2'y_2 = 0\). Then \(u_1' = -y_2g/W\) and \(u_2' = y_1g/W\). Integrate, drop constants, form \(y_p\), and discard any part that lies in \(y_c\). The method handles any continuous input and variable coefficients, while undetermined coefficients is quicker where it applies.
Flashcards
Flashcard
Find y_p = u₁y₁ + u₂y₂ by letting the constants vary
Test your understanding
Question 1 of 5
In variation of parameters for y″ + p(t)y′ + q(t)y = g(t), which formula gives u₂′?
Question 2 of 5
For y″ + 9y = tan 3t with y₁ = cos 3t and y₂ = sin 3t, what is u₂′?
Question 3 of 5
Before using the formulas on 2y″ + 8y = 6 csc 2t, which g(t) must be used?
Question 4 of 5
Why does the method impose the condition u₁′y₁ + u₂′y₂ = 0?
Question 5 of 5
What does variation of parameters give as a particular solution of y″ + y = sec t on −π/2 < t < π/2?
