4.7: Variation of Parameters

Differential Equations (No Linear Algebra Required) · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    4.7: Variation of Parameters
    Learning Objectives
    • Find the complimentary solution based on the roots of the auxiliary equation.
    • Use the complimentary solution and Cramer's Rule to find a particular solution of a linear second- and higher-order differential equation.
    • Find the general solution to a differential equation with constant coefficients using the method of Variation of Parameters.

    In this section we give a method called variation of parameters for finding a particular solution of

    \[\label{eq:5.7.1} P_0(x)y''+P_1(x)y'+P_2(x)y=F(x)\]

    if we know a fundamental set \(\{y_1,y_2\}\) of solutions of the complementary equation

    \[\label{eq:5.7.2} P_0(x)y''+P_1(x)y'+P_2(x)y=0.\]

    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.

    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.

    Differentiating Equation \ref{eq:5.7.3} yields

    \[\label{eq:5.7.4} y_p'=u_1y_1'+u_2y_2'+u_1'y_1+u_2'y_2.\]

    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

    \[\label{eq:5.7.7} y_p''=u_1y''_1+u_2y''_2+u_1'y_1'+u_2'y_2'.\]

    (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

    \[u_1(P_0y''_1+P_1y_1'+P_2y_1)+u_2(P_0y''_2+P_1y_2'+P_2y_2) +P_0(u_1'y_1'+u_2'y_2')=F. \nonumber \]

    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

    \[\label{eq:5.7.9} \begin{array}{rcl} u_1'y_1+u_2'y_2 &= 0 \\ u_1'y_1'+u_2'y_2' &= f(x), \end{array}\]

    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} with \(f(x)={F\over P_0}\).

    The solution ot the system \ref{eq:5.7.9} is the pair of functions \(u_1'\) and \(u_2'\).

    By linearly independence of \(y_1\) and \(y_2\), the Wronskian of \(\{y_1, y_2\}\) is nonzero for every \(x\) in the interval \((a, b)\). Using Cramer's rule, we can solve for \(u'_1\) and \(u'_2\) in terms of determinants.

    \[u'_1=\dfrac{W_1}{W} \quad \quad \quad \text{and} \quad \quad \quad u'_2=\dfrac{W_2}{W}\nonumber\]

    where  \(W=\left| \begin{array}{cc} y_1 & y_2 \\[4pt] y'_1 & y'_2 \end{array} \right| \) is the Wronskian of \(y_1\) and \(y_2\), \(W_1=\left| \begin{array}{cc} 0 & y_2 \\[4pt] f(x) & y'_2 \end{array} \right|\) and \(W_2=\left| \begin{array}{cc} y_1 & 0 \\[4pt] y'_1 & f(x) \end{array} \right|. \)

    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 derive the whole procedure for every specific problem. We recommend to kkep in mindthe following:

    1. Write \[\label{eq:5.7.13} y_p=u_1y_1+u_2y_2\] to remind yourself of what you’re doing.
    2. Write the system \[\label{eq:5.7.14} \begin{array}{rcl} u_1'y_1+u_2'y_2 &= 0 \\ u_1'y_1'+u_2'y_2' &= f(x) \end{array}\] for the specific problem you’re trying to solve.
    3. Solve Equation \ref{eq:5.7.14} for \(u_1'\) and \(u_2'\) by Cramer's rule.
    4. Obtain \(u_1\) and \(u_2\) by integrating \(u_1'\) and \(u_2'\), taking the constants of integration to be zero.
    5. Substitute \(u_1\) and \(u_2\) into Equation \ref{eq:5.7.13} to obtain \(y_p\).
    Example \(\PageIndex{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 form the general solution on the interval \((0, \infty)\).

    Solution

    We set

    \[y_p=u_1x+u_2x^2, \nonumber \]

    where

    \[\begin{aligned} u_1'x+\phantom{2}u_2'x^2&=0\\ u_1'\phantom{x}+2u_2'x\phantom{^2}&={x^{9/2}\over x^2}=x^{5/2}.\end{aligned}\]

    We now compute  \(W=\left| \begin{array}{cc} x & x^2 \\[4pt] 1 & 2x \end{array} \right|= x^2 \),  \( \quad W_1=\left| \begin{array}{cc} 0 & x^2 \\[4pt] x^{5/2} & 2x \end{array} \right|=-x^{9/2}\quad\)  and \(\quad W_2=\left| \begin{array}{cc} x & 0 \\[4pt] 1 & x^{5/2} \end{array} \right|=x^{7/2}. \)

    Using Cramer's rule, we get 

    \[u'_1=\dfrac{W_1}{W} =\dfrac{-x^{9/2}}{x^2}= -x^{5/2} \quad \text{ and }  \quad u'_2=\dfrac{W_2}{W}=\dfrac{x^{7/2}}{x^2}=x^{3/2}\nonumber\]

    Integrating and taking the constants of integration to be zero yields

    \[u_1=-{2\over7}x^{7/2}\quad \text{and} \quad u_2={2\over5}x^{5/2}. \nonumber \]

    Therefore

    \[y_p=u_1x+u_2x^2 =-{2\over7}x^{7/2}x+{2\over5}x^{5/2}x^2={4\over35}x^{9/2}, \nonumber \]

    and the general solution of Equation \ref{eq:5.7.15} is

    \[y={4\over35}x^{9/2}+c_1x+c_2x^2 \nonumber \]

    on the interval \((0, \infty)\).

    Example 4.7.2

    Find a particular solution \(y_p\) of

    \[\label{eq:5.7.16} (x-1)y''-xy'+y=(x-1)^2,\]

    given that \(y_1=x\) and \(y_2=e^x\) are solutions of the complementary equation

    \[(x-1)y''-xy'+y=0. \nonumber \]

    Then find the general solution of Equation \ref{eq:5.7.16}.

    Solution

    We set

    \[y_p=u_1x+u_2e^x, \nonumber \]

    where

    \[\begin{aligned} u_1'x+u_2'e^x&=0\\ u_1'\phantom{x}+u_2'e^x&={(x-1)^2\over x-1}=x-1.\end{aligned}\]

    We now compute  \(W=\left| \begin{array}{cc} x & e^x \\[4pt] 1 & e^x \end{array} \right|= xe^x-e^x=(x-1)e^x \),  \( \quad W_1=\left| \begin{array}{cc} 0 & e^x \\[4pt] x-1 & e^x \end{array} \right|=-xe^x+e^x=-(x-1)e^x \quad\)  and \(\quad W_2=\left| \begin{array}{cc} x & 0 \\[4pt] 1 & x-1 \end{array} \right|=x^2-x=x(x-1). \)

    Using Cramer's rule, we get 

    \[u'_1=\dfrac{W_1}{W} =\dfrac{-(x-1)e^x}{(x-1)e^x}= -1 \quad \text{ and }  \quad u'_2=\dfrac{W_2}{W}=\dfrac{x(x-1)}{(x-1)e^x}=xe^{-x}\nonumber\]

    Integrating and taking the constants of integration to be zero yields

    \[u_1=-x \quad \text{and} \quad u_2=-(x+1)e^{-x}. \nonumber \]

    Therefore

    \[y_p=u_1x+u_2e^x =(-x)x+(-(x+1)e^{-x})e^x=-x^2-x-1, \nonumber \]

    so the general solution of Equation \ref{eq:5.7.16} is

    \[\label{eq:5.7.17} y=y_p+c_1x+c_2e^x=-x^2-x-1+c_1x+c_2e^x = -x^2-1+(c_1-1)x+c_2e^x.\]

    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.\]  

    Example 4.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

    \[y_p=u_1e^{-x}+u_2e^{-2x}, \nonumber \]

    where

    \[\begin{aligned} \phantom{-}u_1'e^{-x}+\phantom{2}u_2'e^{-2x}&=0\\ -u_1'e^{-x}-2u_2'e^{-2x}&={1\over 1+e^x}.\end{aligned}\]

    We now compute  \(W=\left| \begin{array}{cc} e^{-x} & e^{-2x} \\[4pt] -e^{-x} & -2e^{-2x} \end{array} \right|= -2e^{-3x}+e^{-3x}=-e^{-3x} \),  \( \quad W_1=\left| \begin{array}{cc} 0 & e^{-2x} \\[4pt] {1\over 1+e^x} & -2e^{-2x} \end{array} \right|=-{e^{-2x}\over 1+e^x} \quad\)  and \(\quad W_2=\left| \begin{array}{cc} e^{-x} & 0 \\[4pt] -e^{-x} & {1\over 1+e^x}\end{array} \right|={e^{-x}\over 1+e^x}. \)

    Using Cramer's rule, we get 

    \[u'_1=\dfrac{W_1}{W} =\dfrac{-\dfrac{e^{-2x}}{ 1+e^x}}{-e^{-3x}}= {e^x\over 1+e^x} \quad \text{ and }  \quad u'_2=\dfrac{W_2}{W}=\dfrac{\dfrac{e^{-x}}{1+e^x}}{-e^{-3x}}=-{e^{2x}\over 1+e^x}\nonumber\]

    Integrating and taking the constants of integration to be zero yields

    Integrating by means of the substitution \(v=e^x\) and taking the constants of integration to be zero yields

    \[u_1=\int{e^x\over 1+e^x}\,dx=\int {dv\over 1+v} =\ln(1+v)=\ln(1+e^x) \nonumber \]

    and

    \[\begin{aligned} u_2&=-\int{e^{2x}\over 1+e^x}\,dx=-\int {v\over 1+v}\,dv =\int\left[{1\over 1+v}-1\right]\,dv \\ &=\ln(1+v)-v=\ln(1+e^x)-e^x.\end{aligned}\]

    Therefore

    \[\begin{aligned} y_p&=u_1e^{-x}+u_2e^{-2x}\\ &=[\ln(1+e^x)]e^{-x}+\left[\ln(1+e^x)-e^x\right]e^{-2x},\end{aligned}\]

    so

    \[y_p=\left(e^{-x}+e^{-2x}\right)\ln(1+e^x)-e^{-x}. \nonumber \]

    Since the last term on the right satisfies the complementary equation, we drop it and redefine

    \[y_p=\left(e^{-x}+e^{-2x}\right)\ln(1+e^x). \nonumber \]

    The general solution of Equation \ref{eq:5.7.19} is

    \[y=y_p+c_1e^{-x}+c_2e^{-2x}=\left(e^{-x}+e^{-2x}\right)\ln(1+e^x) +c_1e^{-x}+c_2e^{-2x}. \nonumber \]


    This page titled 4.7: Variation of Parameters was last modified on Sat, 03 May 2025 13:10:40 GMT and is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by William F. Trench.