9.4: Variation of Parameters for Higher Order Equations
( \newcommand{\kernel}{\mathrm{null}\,}\)
Derivation of the method
We assume throughout this section that the nonhomogeneous linear equation
\label{eq:9.4.1} P_0(x)y^{(n)}+P_1(x)y^{(n-1)}+\cdots+P_n(x)y=F(x)
is normal on an interval (a,b). We’ll abbreviate this equation as Ly=F, where
Ly=P_0(x)y^{(n)}+P_1(x)y^{(n-1)}+\cdots+P_n(x)y. \nonumber
When we speak of solutions of this equation and its complementary equation Ly=0, we mean solutions on (a,b). We’ll show how to use the method of variation of parameters to find a particular solution of Ly=F, provided that we know a fundamental set of solutions \{y_1,y_2,\dots,y_n\} of Ly=0.
We seek a particular solution of Ly=F in the form
\label{eq:9.4.2} y_p=u_1y_1+u_2y_2+\cdots+u_ny_n
where \{y_1,y_2,\dots,y_n\} is a known fundamental set of solutions of the complementary equation
P_0(x)y^{(n)}+P_1(x)y^{(n-1)}+\cdots+P_n(x)y=0\nonumber
and u_1, u_2, …, u_n are functions to be determined. We begin by imposing the following n-1 conditions on u_1,u_2,\dots,u_n:
\label{eq:9.4.3} \begin{array}{rcl} u'_1y_1+u'_2y_2+&\cdots&+u'_ny_n=0 \\[4pt] u'_1y'_1+u'_2y'_2+&\cdots&+u'_ny'_n=0 \\[4pt] \phantom{u'_1y^{(n_1)}+u'_2y_2^{(n-1)}}&\vdots& \phantom{\cdots+u'_ny^{(n-1)}_n=q} \\[4pt] u'_1y_1^{(n-2)}+u'_2y^{(n-2)}_2+&\cdots&+u'_ny^{(n-2)}_n =0. \end{array}
These conditions lead to simple formulas for the first n-1 derivatives of y_p:
\label{eq:9.4.4} y^{(r)}_p=u_1y^{(r)}_1+u_2y_2^{(r)}\cdots+u_ny^{(r)}_n,\ 0 \le r \le n-1.
These formulas are easy to remember, since they look as though we obtained them by differentiating Equation \ref{eq:9.4.2} n-1 times while treating u_1, u_2, …, u_n as constants. To see that Equation \ref{eq:9.4.3} implies Equation \ref{eq:9.4.4}, we first differentiate Equation \ref{eq:9.4.2} to obtain
y_p'=u_1y_1'+u_2y_2'+\cdots+u_ny_n'+u_1'y_1+u_2'y_2+\cdots+u_n'y_n,\nonumber
which reduces to
y_p'=u_1y_1'+u_2y_2'+\cdots+u_ny_n'\nonumber
because of the first equation in Equation \ref{eq:9.4.3}. Differentiating this yields
y_p''=u_1y_1''+u_2y_2''+\cdots+u_ny_n''+u_1'y_1'+u_2'y_2'+\cdots+u_n'y_n',\nonumber
which reduces to
y_p''=u_1y_1''+u_2y_2''+\cdots+u_ny_n''\nonumber
because of the second equation in Equation \ref{eq:9.4.3}. Continuing in this way yields Equation \ref{eq:9.4.4}.
The last equation in Equation \ref{eq:9.4.4} is
y_p^{(n-1)}=u_1y_1^{(n-1)}+u_2y_2^{(n-1)}+\cdots+u_ny_n^{(n-1)}.\nonumber
Differentiating this yields
y_p^{(n)}=u_1y_1^{(n)}+u_2y_2^{(n)}+\cdots+u_ny_n^{(n)}+ u_1'y_1^{(n-1)}+u_2'y_2^{(n-1)}+\cdots+u_n'y_n^{(n-1)}.\nonumber
Substituting this and Equation \ref{eq:9.4.4} into Equation \ref{eq:9.4.1} yields
u_1Ly_1+u_2Ly_2+\cdots+u_nLy_n+P_0(x)\left( u_1'y_1^{(n-1)}+u_2'y_2^{(n-1)}+\cdots+u_n'y_n^{(n-1)}\right)=F(x).\nonumber
Since Ly_i=0 (1 \le i \le n), this reduces to
u_1'y_1^{(n-1)}+u_2'y_2^{(n-1)}+\cdots+u_n'y_n^{(n-1)}={F(x)\over P_0(x)}.\nonumber
Combining this equation with Equation \ref{eq:9.4.3} shows that
y_p=u_1y_1+u_2y_2+\cdots+u_ny_n\nonumber
is a solution of Equation \ref{eq:9.4.1} if
\begin{array}{rcl} u'_1y_1+u'_2y_2+&\cdots&+u'_ny_n=0 \\[4pt] u'_1y'_1+u'_2y'_2+&\cdots&+u'_ny'_n=0 \\[4pt] \phantom{u'_1y^{(n_1)}+u'_2y_2^{(n-1)}}&\vdots& \phantom{\cdots+u'_ny^{(n-1)}_n=q} \\[4pt] u'_1y_1^{(n-2)}+u'_2y^{(n-2)}_2+&\cdots&+u'_ny^{(n-2)}_n =0 \\[4pt] u'_1y^{(n-1)}_1+u'_2y^{(n-1)}_2+&\cdots&+u'_n y^{(n-1)}_n=F/P_0, \end{array}\nonumber
which can be written in matrix form as
\label{eq:9.4.5} \left[\begin{array}{cccc} y_1&y_2&\cdots&y_n \\[4pt] y'_1&y'_2&\cdots&y_n'\\[4pt] \vdots&\vdots&\ddots&\vdots\\[4pt] y_1^{(n-2)}&y_2^{(n-2)}&\cdots&y_n^{(n-2)}\\[4pt] y_1^{(n-1)}&y_2^{(n-1)}&\cdots&y_n^{(n-1)} \end{array} \right] \left[\begin{array}{c}u_1'\\[4pt]u_2'\\[4pt]\vdots\\[4pt]u_{n-1}'\\[4pt]u_n'\end{array} \right]= \left[\begin{array}{c}0\\[4pt]0\\[4pt] \vdots\\[4pt]0\\[4pt]F/ P_0\end{array}\right].
The determinant of this system is the Wronskian W of the fundamental set of solutions \{y_1,y_2,\dots,y_n\}, which has no zeros on (a,b), by Theorem 9.1.4. Solving Equation \ref{eq:9.4.5} by Cramer’s rule yields
\label{eq:9.4.6} u'_j=(-1)^{n-j}{FW_j\over P_0W},\quad 1\le j\le n,
where W_j is the Wronskian of the set of functions obtained by deleting y_j from \{y_1,y_2,\dots,y_n\} and keeping the remaining functions in the same order. Equivalently, W_j is the determinant obtained by deleting the last row and j-th column of W.
Having obtained u_1', u_2', \dots,u_n', we can integrate to obtain u_1,\,u_2,\dots,u_n. As in Section 5.7, we take the constants of integration to be zero, and we drop any linear combination of \{y_1,y_2,\dots,y_n\} that may appear in y_p.
For efficiency, it's best to compute W_{1}, W_{2}, \cdots , W_{n} first, and then compute W by expanding in cofactors of the last row; thus, W=\sum_{j=1}^{n}(-1)^{n-j}y_{j}^{(n-1)}W_{j}.\nonumber
Third Order Equations
If n=3, then
W=\left| \begin{array}{ccc} y_1&y_2&y_3 \\[4pt] y'_1&y'_2&y'_3 \\[4pt] y''_1&y''_2&y''_3 \end{array} \right|.\nonumber
Therefore
W_1=\left| \begin{array}{cc} y_2&y_3 \\[4pt] y'_2&y'_3 \end{array} \right|, \quad W_2=\left| \begin{array}{cc} y_1&y_3 \\[4pt] y'_1&y'_3 \end{array} \right|, \quad W_3=\left| \begin{array}{cc} y_1&y_2 \\[4pt] y'_1&y'_2 \end{array} \right|,\nonumber
and Equation \ref{eq:9.4.6} becomes
\label{eq:9.4.7} u'_1={FW_1\over P_0W},\quad u'_2=-{FW_2\over P_0W},\quad u'_3={FW_3\over P_0W}.
Find a particular solution of
\label{eq:9.4.8} xy'''-y''-xy'+y=8x^2e^x,
given that y_1=x, y_2=e^x, and y_3=e^{-x} form a fundamental set of solutions of the complementary equation. Then find the general solution of Equation \ref{eq:9.4.8}.
Solution
We seek a particular solution of Equation \ref{eq:9.4.8} of the form
y_p=u_1x+u_2e^x+u_3e^{-x}.\nonumber
The Wronskian of \{y_1,y_2,y_3\} is
W(x)=\left| \begin{array}{ccr} x&e^x&e^{-x} \\[4pt] 1&e^x&-e^{-x} \\[4pt] 0&e^x&e^{-x} \end{array} \right|,\nonumber
so
\begin{aligned} W_1&= \left| \begin{array}{cr} e^x&e^{-x}\\[4pt] e^x&-e^{-x} \end{array} \right|=-2,\\[4pt] W_2&= \left| \begin{array}{cr} x&e^{-x}\\[4pt]1&-e^{-x} \end{array} \right|=-e^{-x}(x+1),\\[4pt] W_3&= \left| \begin{array}{cc} x&e^x\\[4pt]1&e^x \end{array} \right|=e^x(x-1).\end{aligned} \nonumber
Expanding W by cofactors of the last row yields
W=0W_1-e^x W_2+e^{-x}W_3=0(-2)-e^x\left(-e^{-x}(x+1)\right) +e^{-x}e^x(x-1)=2x.\nonumber
Since F(x)=8x^2e^x and P_0(x)=x,
{F\over P_0W}={8x^2e^x\over x\cdot 2x}=4e^x.\nonumber
Therefore, from Equation \ref{eq:9.4.7}
\begin{aligned} u'_1&=\phantom{-} 4e^xW_1=\phantom{-}4e^x(-2)=-8e^x,\\[4pt] u_2'&=-4e^xW_2=-4e^x\left(-e^{-x}(x+1)\right)=4(x+1),\\[4pt] u_3'&=\phantom{-}4e^xW_3=\phantom{-}4e^x\left(e^x(x-1)\right)=4e^{2x}(x-1).\end{aligned}\nonumber
Integrating and taking the constants of integration to be zero yields
u_1=-8e^x,\quad u_2=2(x+1)^2, u_3=e^{2x}(2x-3).\nonumber
Hence,
\begin{aligned} y_p&=u_1y_1+u_2y_2+u_3y_3\\[4pt] &=(-8e^x)x+e^x(2(x+1)^2)+e^{-x}\left(e^{2x}(2x-3)\right) \\[4pt]&=e^x(2x^2-2x-1).\end{aligned} \nonumber
Since -e^x is a solution of the complementary equation, we redefine
y_p=2xe^x(x-1).\nonumber
Therefore the general solution of Equation \ref{eq:9.4.8} is
y=2xe^x(x-1)+c_1x+c_2e^x+c_3e^{-x}.\nonumber
Fourth Order Equations
If n=4, then
W=\left| \begin{array}{cccc} y_1&y_2&y_3&y_4 \\[4pt] y'_1&y'_2&y'_3&y_4' \\[4pt] y''_1&y''_2&y''_3&y_4''\\[4pt] y'''_1&y'''_2&y'''_3&y_4''' \end{array} \right|,\nonumber
Therefore
W_1=\left| \begin{array}{ccc} y_2&y_3&y_4 \\[4pt] y'_2&y'_3&y_4'\\[4pt] y''_2&y''_3&y_4'' \end{array} \right|, \quad W_2=\left| \begin{array}{ccc} y_1&y_3&y_4 \\[4pt] y'_1&y'_3&y_4'\\[4pt] y''_1&y''_3&y_4'' \end{array} \right|,\nonumber
W_3=\left| \begin{array}{ccc} y_1&y_2&y_4 \\[4pt] y'_1&y'_2&y_4'\\[4pt] y''_1&y''_2&y_4'' \end{array} \right|,\quad W_4=\left| \begin{array}{ccc} y_1&y_2&y_3 \\[4pt] y_1'&y'_2&y_3'\\[4pt] y_1''&y''_2&y_3'' \end{array} \right|,\nonumber
and Equation \ref{eq:9.4.6} becomes
\label{eq:9.4.9} u'_1=-{FW_1\over P_0W},\quad u'_2={FW_2\over P_0W},\quad u'_3=-{FW_3\over P_0W},\quad u'_4={FW_4\over P_0W}.
Find a particular solution of
\label{eq:9.4.10} x^4y^{(4)}+6x^3y'''+2x^2y''-4xy'+4y=12x^2,
given that y_1=x, y_2=x^2, y_3=1/x and y_4=1/x^2 form a fundamental set of solutions of the complementary equation. Then find the general solution of Equation \ref{eq:9.4.10} on (-\infty,0) and (0,\infty).
Solution
We seek a particular solution of Equation \ref{eq:9.4.10} of the form
y_p=u_1x+u_2x^2+{u_3\over x}+{u_4\over x^2}.\nonumber
The Wronskian of \{y_1,y_2,y_3,y_4\} is
W(x)=\left| \begin{array}{cccr} x&x^2&1/x&-1/x^2 \\[4pt] 1&2x&-1/x^2&-2/x^3 \\[4pt] 0 &2&2/x^3&6/x^4\\[4pt] 0&0&-6/x^4&-24/x^5 \end{array} \right|,\nonumber
so
\begin{aligned} W_1&= \left| \begin{array}{ccr} x^2&1/x&1/x^2\\[4pt]2x&-1/x^2&-2/x^3\\[4pt] 2&2/x^3&6/x^4 \end{array} \right|=-{12\over x^4},\\[4pt] W_2&= \left| \begin{array}{ccr} x&1/x&1/x^2\\[4pt]1&-1/x^2&-2/x^3\\[4pt] 0&2/x^3&6/x^4 \end{array} \right|=-{6\over x^5},\\[4pt] W_3&= \left| \begin{array}{ccc} x&x^2&1/x^2\\[4pt]1&2x&-2/x^3\\[4pt] 0&2&6/x^4 \end{array} \right|={12\over x^2}, \\[4pt] W_4&= \left| \begin{array}{ccc} x&x^2&1/x\\[4pt]1&2x&-1/x^2\\[4pt] 0&2&2/x^3 \end{array} \right|={6\over x}.\end{aligned} \nonumber
Expanding W by cofactors of the last row yields
\begin{aligned} W&=-0W_1+0 W_2-\left(-{6\over x^4}\right)W_3+\left(-{24\over x^5}\right)W_4\\[4pt] &={6\over x^4}{12\over x^2}-{24\over x^5}{6\over x}=-{72\over x^6}.\end{aligned} \nonumber
Since F(x)=12x^2 and P_0(x)=x^4,
{F\over P_0W}={12x^2\over x^4}\left(-{x^6\over72}\right)=-{x^4\over 6}. \nonumber
Therefore, from Equation \ref{eq:9.4.9},
\begin{aligned} u'_1&=-\left(-{x^4\over6}\right)W_1={x^4\over6}\left(-{12\over x^4}\right)=-2,\\[4pt] u_2'&=\phantom{-}-{x^4\over6}W_2=-{x^4\over6}\left(-{6\over x^5}\right) ={1\over x},\\[4pt] u_3'&=-\left(-{x^4\over6}\right)W_3={x^4\over6}{12\over x^2}=2x^2,\\[4pt] u_4'&=\phantom{-}-{x^4\over6}W_4=-{x^4\over6}{6\over x}=-x^3.\end{aligned} \nonumber
Integrating these and taking the constants of integration to be zero yields
u_1=-2x,\quad u_2=\ln|x|,\quad u_3={2x^3\over3}, u_4=-{x^4\over4}.\nonumber
Hence,
\begin{aligned} y_p&=u_1y_1+u_2y_2+u_3y_3+u_4y_4\\[4pt] &=(-2x)x+(\ln|x|)x^2+{2x^3\over3}{1\over x}+\left(-{x^4\over4}\right) {1\over x^2} \\[4pt]&=x^2\ln|x|-{19x^2\over12}.\end{aligned} \nonumber
Since -19x^2/12 is a solution of the complementary equation, we redefine
y_p=x^2\ln|x|.\nonumber
Therefore
y=x^2\ln|x|+c_1x+c_2x^2+{c_3\over x}+{c_4\over x^2}\nonumber
is the general solution of Equation \ref{eq:9.4.10} on (-\infty,0) and (0,\infty).