Having found a particular solution \(y_p\) by this method, we can write the general solution of Equation \ref{eq:5.7.1} as
\[y=y_p+c_1y_1+c_2y_2. \nonumber \]
Since we need only one nontrivial solution of Equation \ref{eq:5.7.2} to find the general solution of Equation \ref{eq:5.7.1} by reduction of order, it is natural to ask why we are interested in variation of parameters, which requires two linearly independent solutions of Equation \ref{eq:5.7.2} to achieve the same goal. Here’s the answer:
If we already know two linearly independent solutions of Equation \ref{eq:5.7.2} then variation of parameters will probably be simpler than reduction of order.
Variation of parameters generalizes naturally to a method for finding particular solutions of higher order linear equations (Section 9.4) and linear systems of equations (Section 10.7), while reduction of order doesn’t.
Variation of parameters is a powerful theoretical tool used by researchers in differential equations. Although a detailed discussion of this is beyond the scope of this book, you can get an idea of what it means from Exercises 5.7.37–5.7.39.
We’ll now derive the method. As usual, we consider solutions of Equation \ref{eq:5.7.1} and Equation \ref{eq:5.7.2} on an interval \((a,b)\) where \(P_0\), \(P_1\), \(P_2\), and \(F\) are continuous and \(P_0\) has no zeros. Suppose that \(\{y_1,y_2\}\) is a fundamental set of solutions of the complementary equation Equation \ref{eq:5.7.2}. We look for a particular solution of Equation \ref{eq:5.7.1} in the form
\[\label{eq:5.7.3} y_p=u_1y_1+u_2y_2 \]
where \(u_1\) and \(u_2\) are functions to be determined so that \(y_p\) satisfies Equation \ref{eq:5.7.1}. You may not think this is a good idea, since there are now two unknown functions to be determined, rather than one. However, since \(u_1\) and \(u_2\) have to satisfy only one condition (that \(y_p\) is a solution of Equation \ref{eq:5.7.1}), we can impose a second condition that produces a convenient simplification, as follows.
As our second condition on \(u_1\) and \(u_2\) we require that
\[\label{eq:5.7.5} u_1'y_1+u_2'y_2=0. \]
Then Equation \ref{eq:5.7.4} becomes
\[y_p'=u_1y_1'+u_2y_2'; \label{eq:5.7.6} \]
that is, Equation \ref{eq:5.7.5} permits us to differentiate \(y_p\) (once!) as if \(u_1\) and \(u_2\) are constants. Differentiating Equation \ref{eq:5.7.4} yields
(There are no terms involving \(u_1''\) and \(u_2''\) here, as there would be if we hadn’t required Equation \ref{eq:5.7.5}.) Substituting Equation \ref{eq:5.7.3}, Equation \ref{eq:5.7.6}, and Equation \ref{eq:5.7.7} into Equation \ref{eq:5.7.1} and collecting the coefficients of \(u_1\) and \(u_2\) yields
As in the derivation of the method of reduction of order, the coefficients of \(u_1\) and \(u_2\) here are both zero because \(y_1\) and \(y_2\) satisfy the complementary equation. Hence, we can rewrite the last equation as
\[\label{eq:5.7.8} P_0(u_1'y_1'+u_2'y_2')=F. \]
Therefore \(y_p\) in Equation \ref{eq:5.7.3} satisfies Equation \ref{eq:5.7.1} if
where the first equation is the same as Equation \ref{eq:5.7.5} and the second is from Equation \ref{eq:5.7.8}.
We’ll now show that you can always solve Equation \ref{eq:5.7.9} for \(u_1'\) and \(u_2'\). (The method that we use here will always work, but simpler methods usually work when you’re dealing with specific equations.) To obtain \(u_1'\), multiply the first equation in Equation \ref{eq:5.7.9} by \(y_2'\) and the second equation by \(y_2\). This yields
Since \(\{y_1,y_2\}\) is a fundamental set of solutions of Equation \ref{eq:5.7.2} on \((a,b)\), Theorem 5.1.6 implies that the Wronskian \(y_1y_2'-y_1'y_2\) has no zeros on \((a,b)\). Therefore we can solve Equation \ref{eq:5.7.10} for \(u_1'\), to obtain
We can now obtain \(u_1\) and \(u_2\) by integrating \(u_1'\) and \(u_2'\). The constants of integration can be taken to be zero, since any choice of \(u_1\) and \(u_2\) in Equation \ref{eq:5.7.3} will suffice.
You should not memorize Equation \ref{eq:5.7.11} and Equation \ref{eq:5.7.12}. On the other hand, you don’t want to rederive the whole procedure for every specific problem. We recommend the a compromise:
Write \[\label{eq:5.7.13} y_p=u_1y_1+u_2y_2 \] to remind yourself of what you’re doing.
Write the system \[\label{eq:5.7.14} \begin{array}{rcl} u_1'y_1+u_2'y_2 &= 0 \\[4pt] u_1'y_1'+u_2'y_2' &= {F\over P_0} \end{array} \] for the specific problem you’re trying to solve.
Solve Equation \ref{eq:5.7.14} for \(u_1'\) and \(u_2'\) by any convenient method.
Obtain \(u_1\) and \(u_2\) by integrating \(u_1'\) and \(u_2'\), taking the constants of integration to be zero.
Substitute \(u_1\) and \(u_2\) into Equation \ref{eq:5.7.13} to obtain \(y_p\).
Example 5.7.1
Find a particular solution \(y_p\) of
\[\label{eq:5.7.15} x^2y''-2xy'+2y=x^{9/2}, \]
given that \(y_1=x\) and \(y_2=x^2\) are solutions of the complementary equation
\[x^2y''-2xy'+2y=0. \nonumber \]
Then find the general solution of Equation \ref{eq:5.7.15}.
From the first equation, \(u_1'=-u_2'x\). Substituting this into the second equation yields \(u_2'x=x^{5/2}\), so \(u_2'=x^{3/2}\) and therefore \(u_1'=-u_2'x=-x^{5/2}\). Integrating and taking the constants of integration to be zero yields
Subtracting the first equation from the second yields \(-u_1'(x-1)=x-1\), so \(u_1'=-1\). From this and the first equation, \(u_2'=-xe^{-x}u_1'=xe^{-x}\). Integrating and taking the constants of integration to be zero yields
However, since \(c_1\) is an arbitrary constant, so is \(c_1-1\); therefore, we improve the appearance of this result by renaming the constant and writing the general solution as
\[\label{eq:5.7.18} y= -x^2-1+c_1x+c_2e^x. \]
There’s nothing wrong with leaving the general solution of Equation \ref{eq:5.7.16} in the form Equation \ref{eq:5.7.17}; however, we think you’ll agree that Equation \ref{eq:5.7.18} is preferable. We can also view the transition from Equation \ref{eq:5.7.17} to Equation \ref{eq:5.7.18} differently. In this example the particular solution \(y_p=-x^2-x-1\) contained the term \(-x\), which satisfies the complementary equation. We can drop this term and redefine \(y_p=-x^2-1\), since \(-x^2-x-1\) is a solution of Equation \ref{eq:5.7.16} and \(x\) is a solution of the complementary equation; hence, \(-x^2-1=(-x^2-x-1)+x\) is also a solution of Equation \ref{eq:5.7.16}. In general, it is always legitimate to drop linear combinations of \(\{y_1,y_2\}\) from particular solutions obtained by variation of parameters. (See Exercise 5.7.36 for a general discussion of this question.) We’ll do this in the following examples and in the answers to exercises that ask for a particular solution. Therefore, don’t be concerned if your answer to such an exercise differs from ours only by a solution of the complementary equation.
Example 5.7.3
Find a particular solution of
\[\label{eq:5.7.19} y''+3y'+2y={1\over 1+e^x}. \]
Then find the general solution.
Solution
The characteristic polynomial of the complementary equation
\[\label{eq:5.7.20} y''+3y'+2y=0 \]
is \(p(r)=r^2+3r+2=(r+1)(r+2)\), so \(y_1=e^{-x}\) and \(y_2=e^{-2x}\) form a fundamental set of solutions of Equation \ref{eq:5.7.20}. We look for a particular solution of Equation \ref{eq:5.7.19} in the form
as the solution of Equation \ref{eq:5.7.21}. Figure 5.7.1
is a graph of the solution.
We’ve now considered three methods for solving nonhomogeneous linear equations: undetermined coefficients, reduction of order, and variation of parameters. It’s natural to ask which method is best for a given problem. The method of undetermined coefficients should be used for constant coefficient equations with forcing functions that are linear combinations of polynomials multiplied by functions of the form \(e^{\alpha x}\), \(e^{\lambda x}\cos \omega x\), or \(e^{\lambda x}\sin \omega x\). Although the other two methods can be used to solve such problems, they will be more difficult except in the most trivial cases, because of the integrations involved.
If the equation isn’t a constant coefficient equation or the forcing function isn’t of the form just specified, the method of undetermined coefficients does not apply and the choice is necessarily between the other two methods. The case could be made that reduction of order is better because it requires only one solution of the complementary equation while variation of parameters requires two. However, variation of parameters will probably be easier if you already know a fundamental set of solutions of the complementary equation.