# 9.4: Variation of Parameters for Higher Order Equations

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

## 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$$.

##### Note

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}.$

##### Example 9.4.1

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}.$

##### Example 9.4.2

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)$$.

This page titled 9.4: Variation of Parameters for Higher Order Equations is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by William F. Trench.