5.7 Variation of Parameters

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

\begin{equation} P_0(x)y''+P_1(x)y'+P_2(x)y=F(x) \tag{5.7.1}\end{equation}

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

\begin{equation} P_0(x)y''+P_1(x)y'+P_2(x)y=0. \tag{5.7.2}\end{equation}

Having found a particular solution \(y_p\) by this method, we can write the general solution of (5.7.1) as

\[ y=y_p+c_1y_1+c_2y_2. \]

Since we need only one nontrivial solution of (5.7.2) to find the general solution of (5.7.1) by reduction of order, it’s natural to ask why we’re interested in variation of parameters, which requires two linearly independent solutions of (5.7.2) to achieve the same goal. Here’s the answer:

We’ll now derive the method. As usual, we consider solutions of (5.7.1) and (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 (5.7.2). We look for a particular solution of (5.7.1) in the form

\begin{equation} y_p=u_1y_1+u_2y_2 \tag{5.7.3}\end{equation}

where \(u_1\) and \(u_2\) are functions to be determined so that \(y_p\) satisfies (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 (5.7.1)), we can impose a second condition that produces a convenient simplification, as follows.

Differentiating (5.7.3) yields

\begin{equation} y_p'=u_1y_1'+u_2y_2'+u_1'y_1+u_2'y_2. \tag{5.7.4}\end{equation}

As our second condition on \(u_1\) and \(u_2\) we require that

\begin{equation} u_1'y_1+u_2'y_2=0. \tag{5.7.5}\end{equation}

Then (5.7.4) becomes

\begin{equation} y_p'=u_1y_1'+u_2y_2'; \tag{5.7.6}\end{equation}

that is, (5.7.5) permits us to differentiate \(y_p\) (once!) as if \(u_1\) and \(u_2\) are constants. Differentiating (5.7.4) yields

\begin{equation} y_p''=u_1y''_1+u_2y''_2+u_1'y_1'+u_2'y_2'. \tag{5.7.7}\end{equation}

(There are no terms involving \(u_1''\) and \(u_2''\) here, as there would be if we hadn’t required (5.7.5).) Substituting (5.7.3), (5.7.6), and (5.7.7) into (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. \]

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

\begin{equation} P_0(u_1'y_1'+u_2'y_2')=F. \tag{5.7.8}\end{equation}

Therefore \(y_p\) in (5.7.3) satisfies (5.7.1) if

\begin{equation} \begin{array}{rcl} u_1'y_1+u_2'y_2 &=& 0 \\ u_1'y_1'+u_2'y_2' &=& \dst{F\over P_0}, \end{array} \tag{5.7.9}\end{equation}

where the first equation is the same as (5.7.5) and the second is from (5.7.8).

We’ll now show that you can always solve (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 (5.7.9) by \(y_2'\) and the second equation by \(y_2\). This yields

\begin{eqnarray*} u_1'y_1y_2'+u_2'y_2y_2'&=& 0 \\ u_1'y_1'y_2+u_2'y_2'y_2 &=& {Fy_2\over P_0}. \end{eqnarray*}

Subtracting the second equation from the first yields

\begin{equation} u_1'(y_1y_2'-y_1'y_2)=-{Fy_2\over P_0}. \tag{5.7.10}\end{equation}

Since \(\{y_1,y_2\}\) is a fundamental set of solutions of (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 (5.7.10) for \(u_1'\), to obtain

\begin{equation} u_1'=-{Fy_2\over P_0(y_1y_2'-y_1'y_2)}. \tag{5.7.11}\end{equation}

We leave it to you to start from (5.7.9) and show by a similar argument that

\begin{equation} u_2'={Fy_1\over P_0(y_1y_2'-y_1'y_2)}. \tag{5.7.12}\end{equation}

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 (5.7.3) will suffice.

You should not memorize (5.7.11) and (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:

  1. Write

    \begin{equation} y_p=u_1y_1+u_2y_2 \tag{5.7.13}\end{equation}

    to remind yourself of what you’re doing.

  2. Write the system

    \begin{equation} \begin{array}{rcl} u_1'y_1+u_2'y_2 &=& 0 \\ u_1'y_1'+u_2'y_2' &=& \dst{F\over P_0} \end{array} \tag{5.7.14}\end{equation}

    for the specific problem you’re trying to solve.

  3. Solve (5.7.14) for \(u_1'\) and \(u_2'\) by any convenient method.

  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 (5.7.13) to obtain \(y_p\).

Example 5.7.1

Find a particular solution \(y_p\) of

\begin{equation} x^2y''-2xy'+2y=x^{9/2}, \tag{5.7.15}\end{equation}

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

\[ x^2y''-2xy'+2y=0. \]

Then find the general solution of (5.7.15).

Solution We set

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

where

\begin{eqnarray*} 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{eqnarray*}

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

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

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}, \]

and the general solution of (5.7.15) is

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

Example 5.7.2

Find a particular solution \(y_p\) of

\begin{equation} (x-1)y''-xy'+y=(x-1)^2, \tag{5.7.16}\end{equation}

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

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

Then find the general solution of (5.7.16).

Solution We set

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

where

\begin{eqnarray*} 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{eqnarray*}

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

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

Therefore

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

so the general solution of (5.7.16) is

\begin{equation} 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. \tag{5.7.17}\end{equation}

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

\begin{equation} y= -x^2-1+c_1x+c_2e^x.\bbox \tag{5.7.18}\end{equation}

There’s nothing wrong with leaving the general solution of (5.7.16) in the form (5.7.17); however, we think you’ll agree that (5.7.18) is preferable. We can also view the transition from (5.7.17) to (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 (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 (5.7.16). In general, it’s always legitimate to drop linear combinations of \(\{y_1,y_2\}\) from particular solutions obtained by variation of parameters. (See Exercise 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

\begin{equation} y''+3y'+2y={1\over 1+e^x}. \tag{5.7.19}\end{equation}

Then find the general solution.

Solution

The characteristic polynomial of the complementary equation

\begin{equation} y''+3y'+2y=0 \tag{5.7.20}\end{equation}

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 (5.7.20). We look for a particular solution of (5.7.19) in the form

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

where

\begin{eqnarray*} \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{eqnarray*}

Adding these two equations yields

\[ -u_2'e^{-2x}={1\over1+e^x},\mbox{\quad so \quad} u_2'=-{e^{2x}\over 1+e^x}. \]

From the first equation,

\[ u_1'=-u_2'e^{-x}={e^x\over 1+e^x}. \]

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

and

\begin{eqnarray*} 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 \\[6pt] &=&\ln(1+v)-v=\ln(1+e^x)-e^x. \end{eqnarray*}

Therefore

\begin{eqnarray*} 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{eqnarray*}

so

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

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

The general solution of (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}. \]

Example 5.7.4

Solve the initial value problem

\begin{equation} (x^2-1)y''+4xy'+2y={2\over x+1}, \quad y(0)=-1,\quad y'(0)=-5, \tag{5.7.21}\end{equation}

given that

\[ y_1={1\over x-1}\quad\mbox{ and }\quad y_2={1\over x+1} \]

are solutions of the complementary equation

\[ (x^2-1)y''+4xy'+2y=0. \]

Solution We first use variation of parameters to find a particular solution of

\[ (x^2-1)y''+4xy'+2y={2\over x+1} \]

on \((-1,1)\) in the form

\[ y_p={u_1\over x-1}+{u_2\over x+1}, \]

where

\begin{eqnarray} \phantom{-}{u_1'\over\phantom{(}x-1\phantom{)^2}}+{u_2'\over \phantom{(}x+1\phantom{)^2}}&=&0 \tag{5.7.22} \\ -{u_1'\over(x-1)^2}-{u_2'\over(x+1)^2}&=&{2\over(x+1)(x^2-1)}. \end{eqnarray}

Multiplying the first equation by \(1/(x-1)\) and adding the result to the second equation yields

\begin{equation} \left[{1\over x^2-1}-{1\over(x+1)^2}\right]u_2'={2\over(x+1)(x^2-1)}. \tag{5.7.23}\end{equation}

Since

\[ \left[{1\over x^2-1}-{1\over(x+1)^2}\right]={(x+1)-(x-1)\over(x+1)(x^2-1)} ={2\over(x+1)(x^2-1)}, \]

(5.7.23) implies that \(u_2'=1\). From (5.7.22),

\[ u_1'=-{x-1\over x+1}u_2'=-{x-1\over x+1}. \]

Integrating and taking the constants of integration to be zero yields

\begin{eqnarray*} u_1&=&-\int{x-1\over x+1}\,dx=-\int{x+1-2\over x+1}\,dx \\ &=&\int\left[{2\over x+1}-1\right]\,dx=2\ln(x+1)-x \end{eqnarray*}

and

\[ u_2=\int\,dx=x. \]

Therefore

\begin{eqnarray*} y_p&=&{u_1\over x-1}+{u_2\over x+1}=\left[2\ln(x+1)-x\right]{1\over x-1} +x{1\over x+1} \\ &=&{2\ln(x+1)\over x-1}+x\left[{1\over x+1}-{1\over x-1}\right] ={2\ln(x+1)\over x-1}-{2x\over(x+1)(x-1)}. \end{eqnarray*}

However, since

\[ {2x\over(x+1)(x-1)}=\left[{1\over x+1}+{1\over x-1}\right] \]

is a solution of the complementary equation, we redefine

\[ y_p={2\ln(x+1)\over x-1}. \]

Therefore the general solution of (5.7.24) is

\begin{equation} y={2\ln(x+1)\over x-1}+{c_1\over x-1}+{c_2\over x+1}. \tag{5.7.24}\end{equation}

Differentiating this yields

\[ y'={2\over x^2-1}-{2\ln(x+1)\over(x-1)^2}-{c_1\over(x-1)^2}-{c_2\over(x+1)^2}. \]

Setting \(x=0\) in the last two equations and imposing the initial conditions \(y(0)=-1\) and \(y'(0)=-5\) yields the system

\begin{eqnarray*} -c_1+c_2&=&-1\phantom{.} \\ -2-c_1-c_2&=&-5. \end{eqnarray*}

The solution of this system is \(c_1=2,\,c_2=1\). Substituting these into (5.7.24) yields

\begin{eqnarray*} y&=&{2\ln(x+1)\over x-1}+{2\over x-1}+{1\over x+1} \\ &=&{2\ln(x+1)\over x-1}+{3x+1\over x^2-1} \end{eqnarray*}

as the solution of (5.7.21). Figure 5.7.1 is a graph of the solution.

y=2(x+1)x-1+3x+1x^2-1
Figure 5.7.1. \(y=\dst{2\ln(x+1)\over x-1}+{3x+1\over x^2-1}\)

Comparison of Methods

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.

5.7 Exercises

In Exercises 16 use variation of parameters to find a particular solution.

  1. \(y''+9y=\tan 3x\)

    Show answer

    \(y_p=\dst{-\cos 3x\ln|\sec 3x+\tan 3x|\over9}\)

  2. \(y''+4y=\sin 2x\sec^2 2x\)

    Show answer

    \(y_p=\dst{-{\sin 2x\ln|\cos 2x|\over4} +{x\cos 2x\over2}}\)

  3. \(y''-3y'+2y=\dst{4\over 1+e^{-x}}\)

    Show answer

    \(y_p=4e^x(1+e^x) \ln(1+e^{-x})\)

  4. \(y''-2y'+2y=3e^x \sec x\)

    Show answer

    \(y_p=3e^x(\cos x \ln |\cos x|+x\sin x)\)

  5. \(y''-2y'+y=14x^{3/2}e^x\)

    Show answer

    \(y_p=\dst{8\over 5} x^{7/2}e^x\)

  6. \(y''-y=\dst{4e^{-x}\over 1-e^{-2x}}\)

    Show answer

    \(y_p=e^x\ln(1-e^{-2x})-e^{-x}\ln(e^{2x}-1)\)

In Exercises 729 use variation of parameters to find a particular solution, given the solutions \(y_1\), \(y_2\) of the complementary equation.

  1. \(x^2y''+xy'- y=2x^2+2; \quad y_1=x, \quad y_2=\dst{1\over x}\)

    Show answer

    \(y_p=\dst{2(x^2-3)\over3}\)

  2. \(\dst{xy''+(2-2x)y'+(x-2)y=e^{2x}; \quad y_1=e^x, \quad y_2={e^x\over x}}\)

    Show answer

    \(y_p=\dst{e^{2x}\over x}\)

  3. \(4x^2y''+(4x-8x^2)y'+(4x^2-4x-1)y=4x^{1/2}e^x, \quad x > 0\); \(y_1=x^{1/2} e^x,\; y_2=x^{-1/2}e^x\)

    Show answer

    \(y_p=x^{1/2}e^x\ln x\)

  4. \(y''+4xy'+(4x^2+2)y=4e^{-x(x+2)};\quad y_1=e^{-x^2}, \quad y_2=xe^{-x^2}\)

    Show answer

    \(y_p=e^{-x(x+2)}\)

  5. \(x^2y''-4xy'+6y=x^{5/2},\, x > 0;\quad y_1=x^2,\; y_2=x^3\)

    Show answer

    \(y_p=-4x^{5/2}\)

  6. \(x^2y''-3xy'+3y=2x^4\sin x; \quad y_1=x,\; y_2=x^3\)

    Show answer

    \(y_p=-2x^2\sin x-2x\cos x\)

  7. \((2x+1)y''-2y'-(2x+3)y=(2x+1)^2e^{-x}; \quad y_1=e^{-x}, \quad y_2=xe^x\)

    Show answer

    \(y_p=-\dst{xe^{-x}(x+1)\over2}\)

  8. \(4xy''+2y'+y=\sin\sqrt x; \quad y_1=\cos\sqrt x, \quad y_2=\sin\sqrt x\)

    Show answer

    \(y_p=-\dst{\sqrt x\cos\sqrt x\over2}\)

  9. \(xy''-(2x+2)y'+(x+2)y=6x^3e^x;\quad y_1=e^x,\quad y_2=x^3e^x\)

    Show answer

    \(y_p=\dst{3x^4e^x\over2}\)

  10. \(x^2y''-(2a-1)xy'+a^2y=x^{a+1}; \quad y_1=x^a, \quad y_2=x^a \ln x\)

    Show answer

    \(y_p=x^{a+1}\)

  11. \(x^2y''-2xy'+(x^2+2)y=x^3\cos x; \quad y_1=x\cos x, \quad y_2=x\sin x\)

    Show answer

    \(y_p=\dst{x^2\sin x\over 2}\)

  12. \(xy''-y'-4x^3y=8x^5;\quad y_1=e^{x^2},\; y_2=e^{-x^2}\)

    Show answer

    \(y_p=-2x^2\)

  13. \((\sin x)y''+(2\sin x-\cos x)y'+(\sin x-\cos x)y=e^{-x}; \quad y_1=e^{-x},\quad y_2=e^{-x}\cos x\)

    Show answer

    \(y_p=-e^{-x}\sin x\)

  14. \(4x^2y''-4xy'+(3-16x^2)y=8x^{5/2}; \quad y_1=\sqrt xe^{2x},\; y_2=\sqrt xe^{-2x}\)

    Show answer

    \(y_p=-\dst{\sqrt x\over2}\)

  15. \( 4x^2y''-4xy'+(4x^2+3)y=x^{7/2}; \quad y_1=\sqrt x\sin x,\; y_2=\sqrt x\cos x\)

    Show answer

    \(y_p=\dst{x^{3/2}\over4}\)

  16. \(x^2y''-2xy'-(x^2-2)y=3x^4;\quad y_1=xe^x,\; y_2=xe^{-x}\)

    Show answer

    \(y_p=-3x^2\)

  17. \(x^2y''-2x(x+1)y' +(x^2+2x+2)y=x^3e^x; \quad y_1=xe^x, \quad y_2=x^2e^x\)

    Show answer

    \(y_p=\dst{x^3e^x\over2}\)

  18. \(x^2y''-xy'-3y=x^{3/2}; \quad y_1=1/x, \quad y_2=x^3\)

    Show answer

    \(y_p=-\dst{4x^{3/2}\over15}\)

  19. \(x^2y''-x(x+4)y'+2(x+3)y=x^4e^x; \quad y_1=x^2, \quad y_2=x^2e^x\)

    Show answer

    \(y_p=x^3e^x\)

  20. \(x^2y''-2x(x+2)y'+(x^2+4x+6)y=2xe^x; \quad y_1=x^2e^x, \quad y_2=x^3e^x\)

    Show answer

    \(y_p=xe^x\)

  21. \(x^2y''-4xy'+(x^2+6)y=x^4; \quad y_1=x^2\cos x, \quad y_2=x^2\sin x\)

    Show answer

    \(y_p=x^2\)

  22. \((x-1)y''-xy'+y=2(x-1)^2e^x; \quad y_1=x, \quad y_2=e^x\)

    Show answer

    \(y_p=xe^x(x-2)\)

  23. \(4x^2y''-4x(x+1)y'+(2x+3)y=x^{5/2}e^x; \quad y_1=\sqrt x, \quad y_2=\sqrt xe^x\)

    Show answer

    \(y_p=\dst{\sqrt xe^x(x-1)/4}\)

In Exercises 3032 use variation of parameters to solve the initial value problem, given \(y_1,y_2\) are solutions of the complementary equation.

  1. \((3x-1)y''-(3x+2)y'-(6x-8)y=(3x-1)^2e^{2x}, \quad y(0)=1,\; y'(0)=2\);

    \(y_1=e^{2x},\; y_2=xe^{-x}\)

    Show answer

    \(y=\dst{e^{2x}(3x^2-2x+6)\over6}+\dst{xe^{-x}\over3}\)

  2. \((x-1)^2y''-2(x-1)y'+2y=(x-1)^2, \quad y(0)=3,\quad y'(0)=-6\);

    \(y_1=x-1\),  \(y_2=x^2-1\)

    Show answer

    \(y=(x-1)^2\ln(1-x)+2x^2-5x+3\)

  3. \((x-1)^2y''-(x^2-1)y'+(x+1)y=(x-1)^3e^x, \quad y(0)=4,\quad y'(0)=-6\);

    \(y_1=(x-1)e^x,\quad y_2=x-1\)

    Show answer

    \(y=(x^2-1)e^x-5(x-1)\)

In Exercises 3335 use variation of parameters to solve the initial value problem and graph the solution, given that \(y_1,y_2\) are solutions of the complementary equation.

  1. C/G \(\dst{(x^2-1)y''+4xy'+2y=2x, \quad y(0)=0,\; y'(0) =-2; \quad y_1={1\over x-1},\; y_2={1\over x+1}}\)

    Show answer

    \(y=\dst{x(x^2+6)\over3(x^2-1)}\)

  2. C/G \(\dst{x^2y''+2xy'-2y=-2x^2, \quad y(1)=1,\; y'(1)= -1; \quad y_1=x,\; y_2={1\over x^2}}\)

    Show answer

    \(y=\dst{ -{x^2\over 2}+x+{1\over 2x^2}}\)

  3. C/G \((x+1)(2x+3)y''+2(x+2)y'-2y=(2x+3)^2, \quad y(0)=0,\quad y'(0)=0\); \(y_1=x+2,\quad y_2=\dst{1\over x+1}\)

    Show answer

    \(y=\dst{x^2(4x+9)\over6(x+1)}\)

  4. Suppose

    \[ y_p=\overline y+a_1y_1+a_2y_2 \]

    is a particular solution of

    \[ P_0(x)y''+P_1(x)y'+P_2(x)y=F(x), \tag*{\rm (A)} \]

    where \(y_1\) and \(y_2\) are solutions of the complementary equation

    \[ P_0(x)y''+P_1(x)y'+P_2(x)y=0. \]

    Show that \(\overline y\) is also a solution of (A).

  5. Suppose \(p\), \(q\), and \(f\) are continuous on \((a,b)\) and let \(x_0\) be in \((a,b)\). Let \(y_1\) and \(y_2\) be the solutions of

    \[ y''+p(x)y'+q(x)y=0 \]

    such that

    \[ y_1(x_0)=1, \quad y_1'(x_0)=0, \quad y_2(x_0)=0, \quad y_2'(x_0)=1. \]

    Use variation of parameters to show that the solution of the initial value problem

    \[ y''+p(x)y'+q(x)y=f(x), \quad y(x_0)=k_0,\; y'(x_0)=k_1, \]

    is

    \[ \begin{array}{rcl} y(x) &=& k_0y_1(x)+k_1y_2(x) \\ & & \dst \qquad+\int^x_{x_0}\left(y_1(t)y_2(x)- y_1(x)y_2(t)\right) f(t)\exp\left(\int^t_{x_0}p(s)\,ds\right)\,dt. \end{array} \]

    Hint: Use Abel’s formula for the Wronskian of \(\{y_1,y_2\}\), and integrate \(u_1'\) and \(u_2'\) from \(x_0\) to \(x\). Show also that

    \[ \begin{array}{rcl} y'(x) &=& k_0y_1'(x)+k_1y_2'(x) \\[6pt] & & \dst \qquad+\int^x_{x_0}\left(y_1(t)y_2'(x)-y_1'(x)y_2(t) \right)f(t)\exp\left(\int^t_{x_0}p(s)\,ds\right)\,dt. \end{array} \]
  6. Suppose \(f\) is continuous on an open interval that contains \(x_0=0\). Use variation of parameters to find a formula for the solution of the initial value problem

    \[ y''-y=f(x), \quad y(0)=k_0,\quad y'(0)=k_1. \]
    Show answer

    (a) \(y=k_0\cosh x+k_1\sinh x+\dst{\int_0^x}\sinh (x-t)f(t)\,dt\)

          (b) \(y'=k_0\sinh x+k_1\cosh x+\dst{\int_0^x}\cosh (x-t)f(t)\,dt\)

  7. Suppose \(f\) is continuous on \((a,\infty)\), where \(a<0\), so \(x_0=0\) is in \((a,\infty)\).

    1. Use variation of parameters to find a formula for the solution of the initial value problem

      \[ y''+y=f(x), \quad y(0)=k_0,\quad y'(0)=k_1. \]

      Hint

      You will need the addition formulas for the sine and cosine:

      \begin{eqnarray*} \sin(A+B)&=&\sin A\cos B+\cos A\sin B \\ \cos(A+B)&=&\cos A\cos B-\sin A\sin B. \end{eqnarray*}

    For the rest of this exercise assume that the improper integral \(\int_{0}^\infty f(t)\,dt\) is absolutely convergent.

    1. Show that if \(y\) is a solution of

      \[ y''+y=f(x) \tag*{\rm (A)} \]

      on \((a,\infty)\), then

      \[ \lim_{x \to \infty}\left(y(x)-A_0\cos x-A_1\sin x\right)=0 \tag*{\rm (B)} \]

      and

      \[ \lim_{x\to\infty}\left(y'(x)+A_0\sin x-A_1\cos x\right)=0, \tag*{\rm (C)} \]

      where

      \[ A_0=k_0-\int_0^\infty f(t)\sin t\,dt\mbox{\quad and \quad} A_1=k_1+\int_0^\infty f(t)\cos t\,dt. \]

      Hint: Recall from calculus that if \(\int_0^\infty f(t)\,dt\) converges absolutely, then \(\lim_{x\to\infty}\int_x^\infty |f(t)|\,dt~=~0\).

    2. Show that if \(A_0\) and \(A_1\) are arbitrary constants, then there’s a unique solution of \(y''+y=f(x)\) on \((a,\infty)\) that satisfies (B) and (C).

    Show answer

    (a) \(y(x)=k_0\cos x+k_1\sin x+\dst{\int_0^x}\sin (x-t)f(t)\,dt\)

         (b) \(y'(x)=-k_0\sin x+k_1\cos x+\int_0^x\cos (x-t) f(t)\,dt\)