4.13 HW12

  4.13.1 Section 5.1 problem 52 (page 299)
  4.13.2 Section 5.1 problem 54
  4.13.3 Section 5.2 problem 40 (page 311)
  4.13.4 Section 5.5 problem 9 (page 351)
  4.13.5 Section 5.5 problem 10
  4.13.6 Section 5.5 problem 16
  4.13.7 Section 5.5 problem 25
  4.13.8 Section 5.5 problem 26
  4.13.9 Section 5.5 problem 37
  4.13.10 Section 5.5 problem 49
  4.13.11 Section 5.5 problem 50
  4.13.12 Section 5.5 problem 53
  4.13.13 Section 5.5 problem 61
  4.13.14 Section 5.5 problem 62
PDF (letter size)
PDF (legal size)

4.13.1 Section 5.1 problem 52 (page 299)

Problem Make the substitution \(v=\ln x\) to find general solution for \(x>0\) of the Euler equation \(x^{2}y^{\prime \prime }+xy^{\prime }-y=0\)

solution Let \(v=\ln x\). Hence \(\frac{dy}{dx}=\frac{dy}{dv}\frac{dv}{dx}=\frac{dy}{dv}\frac{1}{x}\) and \begin{align*} \frac{d^{2}y}{dx^{2}} & =\frac{d}{dx}\left ( \frac{dy}{dv}\frac{1}{x}\right ) \\ & =\frac{d^{2}y}{dv^{2}}\frac{dv}{dx}\frac{1}{x}+\frac{dy}{dv}\frac{d}{dx}\left ( \frac{1}{x}\right ) \\ & =\frac{d^{2}y}{dv^{2}}\frac{1}{x^{2}}-\frac{dy}{dv}\frac{1}{x^{2}} \end{align*}

Hence the ODE becomes\begin{align*} x^{2}y^{\prime \prime }+xy^{\prime }-y & =0\\ x^{2}\left ( \frac{d^{2}y}{dv^{2}}\frac{1}{x^{2}}-\frac{dy}{dv}\frac{1}{x^{2}}\right ) +x\left ( \frac{dy}{dv}\frac{1}{x}\right ) -y\left ( v\right ) & =0\\ \frac{d^{2}y}{dv^{2}}-\frac{dy}{dv}+\frac{dy}{dv}-y\left ( v\right ) & =0\\ \frac{d^{2}y}{dv^{2}}-y\left ( v\right ) & =0 \end{align*}

This can now be solved using characteristic equation. \(r^{2}-1=0\) or \(r^{2}=1\) or \(r=\pm 1\). Hence the solution is\[ y\left ( v\right ) =c_{1}e^{v}+c_{2}e^{-v}\] But \(v=\ln x\), hence\begin{align*} y\left ( x\right ) & =c_{1}e^{\ln x}+c_{2}e^{-\ln x}\\ & =c_{1}x+c_{1}\frac{1}{x} \end{align*}

The above is the solution.

But an easier method is the following. Let \(y=x^{r}\). Hence \(y^{\prime }=rx^{r-1},y^{\prime \prime }=r\left ( r-1\right ) x^{r-2}\). Substituting this into the ODE gives\begin{align*} r\left ( r-1\right ) x^{r}+rx^{r}-x^{r} & =0\\ x^{r}\left ( r\left ( r-1\right ) +r-1\right ) & =0 \end{align*}

Since \(x^{r}\neq 0\), we simplify the above and obtain the characteristic equation\begin{align*} r\left ( r-1\right ) +r-1 & =0\\ r^{2}-1 & =0\\ r^{2} & =1\\ r & =\pm 1 \end{align*}

Hence \begin{align*} y\left ( x\right ) & =c_{1}x^{r_{1}}+c_{2}x^{r_{2}}\\ & =c_{1}x+c_{2}x^{-1} \end{align*}

For \(x>0\).

4.13.2 Section 5.1 problem 54

Problem Make the substitution \(v=\ln x\) to find general solution for \(x>0\) of the Euler equation \(4x^{2}y^{\prime \prime }+8xy^{\prime }-3y=0\)

solution Let \(v=\ln x\). Hence \(\frac{dy}{dx}=\frac{dy}{dv}\frac{dv}{dx}=\frac{dy}{dv}\frac{1}{x}\) and \begin{align*} \frac{d^{2}y}{dx^{2}} & =\frac{d}{dx}\left ( \frac{dy}{dv}\frac{1}{x}\right ) \\ & =\frac{d^{2}y}{dv^{2}}\frac{dv}{dx}\frac{1}{x}+\frac{dy}{dv}\frac{d}{dx}\left ( \frac{1}{x}\right ) \\ & =\frac{d^{2}y}{dv^{2}}\frac{1}{x^{2}}-\frac{dy}{dv}\frac{1}{x^{2}} \end{align*}

Hence the ODE becomes\begin{align*} x^{2}y^{\prime \prime }+xy^{\prime }-y & =0\\ 4x^{2}\left ( \frac{d^{2}y}{dv^{2}}\frac{1}{x^{2}}-\frac{dy}{dv}\frac{1}{x^{2}}\right ) +8x\left ( \frac{dy}{dv}\frac{1}{x}\right ) -3y\left ( v\right ) & =0\\ 4\frac{d^{2}y}{dv^{2}}-4\frac{dy}{dv}+8\frac{dy}{dv}-3y\left ( v\right ) & =0\\ 4\frac{d^{2}y}{dv^{2}}+4\frac{dy}{dv}-3y\left ( v\right ) & =0 \end{align*}

This can now be solved using characteristic equation. \(4r^{2}+4r-3=0\), whose roots are \(r_{1}=\frac{-3}{2},r_{2}=\frac{1}{2}\) Hence the solution is\[ y\left ( v\right ) =c_{1}e^{\frac{-3}{2}v}+c_{2}e^{\frac{1}{2}v}\] But \(v=\ln x\), hence\begin{align*} y\left ( x\right ) & =c_{1}e^{\frac{-3}{2}\ln x}+c_{2}e^{\frac{1}{2}\ln x}\\ & =c_{1}x^{\frac{-3}{2}}+c_{1}x^{\frac{1}{2}} \end{align*}

4.13.3 Section 5.2 problem 40 (page 311)

Problem Use reduction of order to find second L.I. solution \(y_{2}\).  \(x^{2}y^{\prime \prime }-x\left ( x+2\right ) y^{\prime }+\left ( x+2\right ) y=0\) with \(y_{1}=x\) and \(x>0\)

solution Let \(y=vy_{1}\), hence\begin{align*} y^{\prime } & =v^{\prime }y_{1}+vy_{1}^{\prime }\\ y^{\prime \prime } & =v^{\prime \prime }y_{1}+v^{\prime }y_{1}^{\prime }+v^{\prime }y_{1}^{\prime }+vy_{1}^{\prime \prime }\\ & =v^{\prime \prime }y_{1}+2v^{\prime }y_{1}^{\prime }+vy_{1}^{\prime \prime } \end{align*}

Therefore the original ODE becomes\begin{align*} x^{2}y^{\prime \prime }-x\left ( x+2\right ) y^{\prime }+\left ( x+2\right ) y & =0\\ x^{2}\left ( v^{\prime \prime }y_{1}+2v^{\prime }y_{1}^{\prime }+vy_{1}^{\prime \prime }\right ) -x\left ( x+2\right ) \left ( v^{\prime }y_{1}+vy_{1}^{\prime }\right ) +\left ( x+2\right ) \left ( vy_{1}\right ) & =0\\ v^{\prime \prime }\left ( x^{2}y_{1}\right ) +v^{\prime }\left ( 2x^{2}y_{1}^{\prime }-x\left ( x+2\right ) y_{1}\right ) +v\overset{0}{\overbrace{\left ( x^{2}y_{1}^{\prime \prime }-x\left ( x+2\right ) y_{1}^{\prime }+\left ( x+2\right ) y_{1}\right ) }} & =0 \end{align*}

Hence\[ v^{\prime \prime }\left ( x^{2}y_{1}\right ) +v^{\prime }\left ( 2x^{2}y_{1}^{\prime }-x\left ( x+2\right ) y_{1}\right ) =0 \] But \(y_{1}=x\), hence the above becomes\begin{align*} x^{3}v^{\prime \prime }+v^{\prime }\left ( 2x^{2}-x\left ( x+2\right ) x\right ) & =0\\ x^{3}v^{\prime \prime }-x^{3}v^{\prime } & =0 \end{align*}

Since we are told \(x>0\) when we can divide by \(x^{3}\) and obtain\[ v^{\prime \prime }-v^{\prime }=0 \] To solve the above, let \[ z=v^{\prime }\] Therefore \(z^{\prime }-z=0\) or \(\frac{d}{dx}\left ( ze^{x}\right ) =0\) or \(ze^{x}=c_{1}\) or \(z=c_{1}e^{-x}\). Therefore the above becomes\[ v^{\prime }=c_{1}e^{-x}\] Integrating\[ v=c_{2}-c_{1}e^{-x}\] Since \(y=vy_{1}\) therefore\[ y=y_{1}\left ( c_{2}-c_{1}e^{-x}\right ) \] But \(y_{1}=x\), hence the complete solution is\[ y=c_{2}x-c_{1}xe^{-x}\] Therefore, we see now that the two basis solutions are \begin{align*} y_{1} & =x\\ y_{2} & =xe^{x} \end{align*}

These can be shown to be L.I. using the Wronskian as follows

\begin{align*} W\left ( x\right ) & =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} \\ & =\begin{vmatrix} x & xe^{x}\\ 1 & e^{x}+xe^{x}\end{vmatrix} \\ & =xe^{x}+x^{2}e^{x}-xe^{x}\\ & =x^{2}e^{x} \end{align*}

Which is not zero since we are told \(x>0\). Hence indeed the second basis solution \(y_{2}\) found is L.I. to \(y_{1}\).

4.13.4 Section 5.5 problem 9 (page 351)

Problem Find the particular solution for \(y^{\prime \prime }+2y^{\prime }-3y=1+xe^{x}\)

solution First we find the homogenous solution. This will tell us if \(e^{x}\) is one of the basis solutions of not, so we know what to guess. The characteristic equation is\begin{align*} r^{2}+2r-3 & =0\\ \left ( r-1\right ) \left ( r+3\right ) & =0 \end{align*}

Hence \(y_{1}=e^{x},y_{2}=e^{-3x}\). \(e^{x}\) is a solution to the homogeneous ODE. The guess is therefore\begin{align} y_{p} & =A+\left ( B+Cx\right ) xe^{x}\nonumber \\ & =A+\left ( Bx+Cx^{2}\right ) e^{x} \tag{1} \end{align}

Hence\begin{align*} y_{p}^{\prime } & =\left ( B+2Cx\right ) e^{x}+\left ( Bx+Cx^{2}\right ) e^{x}\\ & =e^{x}\left ( B+2Cx+Bx+Cx^{2}\right ) \\ y_{p}^{\prime \prime } & =\left ( 2C+B+2Cx\right ) e^{x}+e^{x}\left ( B+2Cx+Bx+Cx^{2}\right ) \\ & =e^{x}\left ( 2C+B+2Cx+B+2Cx+Bx+Cx^{2}\right ) \\ & =e^{x}\left ( 2C+2B+4Cx+Bx+Cx^{2}\right ) \end{align*}

Plugging into the ODE\begin{align*} e^{x}\left ( 2C+2B+4Cx+Bx+Cx^{2}\right ) +2e^{x}\left ( B+2Cx+Bx+Cx^{2}\right ) -3\left ( A+\left ( Bx+Cx^{2}\right ) e^{x}\right ) & =1+xe^{x}\\ e^{x}\left ( 2C+2B+2B\right ) +xe^{x}\left ( 4C+B+4C+2B-3B\right ) +x^{2}e^{x}\left ( C+2C-3C\right ) -3A & =1+xe^{x}\\ e^{x}\left ( 2C+4B\right ) +xe^{x}\left ( 8C\right ) -3A & =1+xe^{x} \end{align*}

Hence \(-3A=1\) or \(A=-\frac{1}{3}\) and \[ 8C=1 \] Or \[ C=\frac{1}{8}\] And \[ 2C+4B=0 \] Or \[ B=-\frac{1}{16}\] Hence particular solution becomes, from (1)\begin{align*} y_{p} & =-\frac{1}{3}+\left ( -\frac{1}{16}x+\frac{1}{8}x^{2}\right ) e^{x}\\ & =-\frac{1}{3}+\frac{1}{16}\left ( 2x^{2}-x\right ) e^{x} \end{align*}

4.13.5 Section 5.5 problem 10

Problem Find the particular solution for \(y^{\prime \prime }+9y=2\cos 3x+3\sin 3x\)

solution First we find the homogenous solution. The characteristic equation is\begin{align*} r^{2}+9 & =0\\ r^{2} & =-9\\ r & =\pm 3i \end{align*}

Hence \(y_{1}=e^{3ix},y_{2}=e^{-3ix}\) or \(y_{h}=c_{1}\cos 3x+c_{2}\sin 3x\). We see that \(\cos 3x\) and \(\sin 3x\) are already in the homogeneous solution. Therefore the guess is\[ y_{p}=Ax\cos 3x+Bx\sin 3x \] Hence\begin{align*} y_{p}^{\prime } & =A\cos 3x-3Ax\sin 3x+B\sin 3x+3Bx\cos 3x\\ y_{p}^{\prime \prime } & =-3A\sin 3x-3A\sin 3x-9Ax\cos 3x+3B\cos 3x+3B\cos 3x-9Bx\sin 3x \end{align*}

Substitution into the ODE gives\begin{multline*} \left ( -3A\sin 3x-3A\sin 3x-9Ax\cos 3x+3B\cos 3x+3B\cos 3x-9Bx\sin 3x\right ) \\ +9\left ( Ax\cos 3x+Bx\sin 3x\right ) =2\cos 3x+3\sin 3x \end{multline*} Or\begin{align*} -6A\sin 3x-9Ax\cos 3x+6B\cos 3x-9Bx\sin 3x+9Ax\cos 3x+9Bx\sin 3x & =2\cos 3x+3\sin 3x\\ \sin 3x\left ( -6A\right ) +\cos 3x\left ( 6B\right ) +x\sin 3x\left ( -9B+9B\right ) +x\cos 3x\left ( -9A+9A\right ) & =2\cos 3x+3\sin 3x\\ -6A\sin 3x+6B\cos 3x & =2\cos 3x+3\sin 3x \end{align*}

Hence \(-6A=3\) or \(A=\frac{-1}{2}\) and \(6B=2\) or \(B=\frac{1}{3}\), therefore the particular solution is\begin{align*} y_{p} & =\frac{-1}{2}x\cos 3x+\frac{1}{3}x\sin 3x\\ & =\frac{1}{6}\left ( 2x\sin 3x-3x\cos 3x\right ) \end{align*}

4.13.6 Section 5.5 problem 16

Problem Find the particular solution for \(y^{\prime \prime }+9y=2x^{2}e^{3x}+5\)

solution From the above problem, we found \(y_{h}=c_{1}\cos 3x+c_{2}\sin 3x\). Therefore there are no basis solutions in the RHS which are in the homogenous solution. The guess for the constant term is \(A\). The guess for \(2x^{2}e^{3x}\) is \(\left ( B_{0}+B_{1}x+B_{2}x^{2}\right ) e^{3x}\), hence\begin{align*} y_{p} & =A+\left ( B_{0}+B_{1}x+B_{2}x^{2}\right ) e^{3x}\\ y_{p}^{\prime } & =\left ( B_{1}+2B_{2}x\right ) e^{3x}+3\left ( B_{0}+B_{1}x+B_{2}x^{2}\right ) e^{3x}\\ y_{p}^{\prime \prime } & =2B_{2}e^{3x}+3\left ( B_{1}+2B_{2}x\right ) e^{3x}+3\left ( B_{1}+2B_{2}x\right ) e^{3x}+9\left ( B_{0}+B_{1}x+B_{2}x^{2}\right ) e^{3x} \end{align*}

Simplifying\begin{align*} y_{p}^{\prime \prime } & =e^{3x}\left ( 2B_{2}+3B_{1}+3B_{1}+9B_{0}\right ) +xe^{x}\left ( 6B_{2}+6B_{2}+9B_{1}\right ) +x^{2}e^{3x}\left ( 9B_{2}\right ) \\ & =e^{3x}\left ( 2B_{2}+6B_{1}+9B_{0}\right ) +xe^{x}\left ( 12B_{2}+9B_{1}\right ) +x^{2}e^{3x}\left ( 9B_{2}\right ) \end{align*}

Substitution into the ODE gives\begin{align*} e^{3x}\left ( 2B_{2}+6B_{1}+9B_{0}\right ) +xe^{x}\left ( 12B_{2}+9B_{1}\right ) +x^{2}e^{3x}\left ( 9B_{2}\right ) +9\left ( A+\left ( B_{0}+B_{1}x+B_{2}x^{2}\right ) e^{3x}\right ) & =2x^{2}e^{3x}+5\\ e^{3x}\left ( 2B_{2}+6B_{1}+9B_{0}\right ) +xe^{x}\left ( 12B_{2}+9B_{1}\right ) +x^{2}e^{3x}\left ( 9B_{2}\right ) +9A+\left ( 9B_{0}+9B_{1}x+9B_{2}x^{2}\right ) e^{3x} & =2x^{2}e^{3x}+5\\ e^{3x}\left ( 2B_{2}+6B_{1}+18B_{0}\right ) +xe^{x}\left ( 12B_{2}+18B_{1}\right ) +x^{2}e^{3x}\left ( 18B_{2}\right ) +9A & =2x^{2}e^{3x}+5 \end{align*}

Comparing coefficients gives\begin{align*} 9A & =5\\ 2B_{2}+6B_{1}+18B_{0} & =0\\ 12B_{2}+18B_{1} & =0\\ 19B_{2} & =2 \end{align*}

From last equation \(B_{2}=\frac{1}{9}\). Hence from third equation \(18B_{1}=-\frac{12}{9}\), or \(B_{1}=-\frac{2}{27}\). And from second equation \begin{align*} 2B_{2}+6B_{1}+18B_{0} & =0\\ 2\left ( \frac{1}{9}\right ) +6\left ( -\frac{2}{27}\right ) +18B_{0} & =0\\ B_{0} & =\frac{1}{81} \end{align*}

And \(A=\frac{5}{9}\). Therefore \begin{align*} y_{p} & =A+\left ( B_{0}+B_{1}x+B_{2}x^{2}\right ) e^{3x}\\ & =\frac{5}{9}+\left ( \frac{1}{81}-\frac{2}{27}x+\frac{1}{9}x^{2}\right ) e^{3x}\\ & =\frac{5}{9}+\left ( \frac{1}{81}-\frac{6}{81}x+\frac{9}{81}x^{2}\right ) e^{3x}\\ & =\frac{45}{81}+\left ( \frac{1}{81}-\frac{6}{81}x+\frac{9}{81}x^{2}\right ) e^{3x}\\ & =\frac{1}{81}\left ( 45+e^{3x}-6xe^{x}+9x^{2}e^{3x}\right ) \end{align*}

4.13.7 Section 5.5 problem 25

Problem Setup the form for the particular solution but do not determine the values of the coefficients. \(y^{\prime \prime }+3y^{\prime }+2y=xe^{-x}-xe^{-2x}\)

solution First we find the homogenous solution. The characteristic equation is\begin{align*} r^{2}+3r+2 & =0\\ \left ( r+1\right ) \left ( r+2\right ) & =0 \end{align*}

Hence \(y_{1}=e^{-x},y_{2}=e^{-2x}\). We see that the basis solutions are part of the RHS. Therefore the guess solution is\[ y_{p}=x\left ( A_{1}+A_{2}x\right ) e^{-x}+x\left ( A_{3}+A_{4}x\right ) e^{-2x}\]

4.13.8 Section 5.5 problem 26

Problem Setup the form for the particular solution but do not determine the values of the coefficients. \(y^{\prime \prime }-6y^{\prime }+13y=xe^{3x}\sin 2x\)

solution First we find the homogenous solution. The characteristic equation is\[ r^{2}-6r+13=0 \] The roots are \(3\pm 2i\). Hence the homogenous solution is \(y_{h}=c_{1}e^{3x}\cos 2x+c_{2}e^{3x}\sin 2x\). We see that \(e^{3x}\sin 2x\) is already in the homogenous solution. Hence the guess is \begin{align*} y_{p} & =\overset{x\text{ guess}}{\overbrace{\left ( A_{1}+A_{2}x\right ) }}x\overset{\sin 2xe^{3x}\text{ guess}}{\overbrace{\left ( A_{3}\sin 2x+A_{4}\cos 2x\right ) e^{3x}}}\\ & =\left ( A_{1}x+A_{2}x^{2}\right ) e^{3x}\cos 2x+\left ( A_{3}x+A_{4}x^{2}\right ) e^{3x}\sin 2x \end{align*}

4.13.9 Section 5.5 problem 37

Problem Solve the initial value problem \(y^{\prime \prime \prime }-2y^{\prime \prime }+y^{\prime }=1+xe^{x}\) with \(y\left ( 0\right ) =0,y^{\prime }\left ( 0\right ) =0,y^{\prime \prime }\left ( 0\right ) =1\)

solution First we find the homogenous solution. The characteristic equation is\begin{align*} r^{3}-2r^{2}+r & =0\\ r\left ( r^{2}-2r+1\right ) & =0 \end{align*}

For \(r^{2}-2r+1=0\), it factors into \(\left ( r-1\right ) \left ( r-1\right ) \), hence roots are \(r_{1}=0,r_{2}=1,r_{3}=1\). Since double roots, the homogenous solution is\[ y_{h}=c_{1}+c_{2}e^{x}+c_{3}xe^{x}\] We notice that both \(e^{x}\) and \(xe^{x}\) is in the RHS. Therefore we need to multiply by \(x^{2}\). The guess is therefore\begin{align*} y_{p} & =Ax+x^{2}\left ( B+Cx\right ) e^{x}\\ & =Ax+\left ( Bx^{2}+Cx^{3}\right ) e^{x} \end{align*}

Therefore\begin{align*} y_{p}^{\prime } & =A+\left ( 2Bx+3Cx^{2}\right ) e^{x}+\left ( Bx^{2}+Cx^{3}\right ) e^{x}\\ y_{p}^{\prime \prime } & =\left ( 2B+6Cx\right ) e^{x}+\left ( 2Bx+3Cx^{2}\right ) e^{x}+\left ( 2Bx+3Cx^{2}\right ) e^{x}+\left ( Bx^{2}+Cx^{3}\right ) e^{x} \end{align*}

Simplifying gives\begin{align*} y_{p}^{\prime } & =A+xe^{x}\left ( 2B\right ) +x^{2}e^{x}\left ( 3C+B\right ) +x^{3}e^{x}\left ( C\right ) \\ y_{p}^{\prime \prime } & =e^{x}\left ( 2B\right ) +xe^{x}\left ( 6C+4B\right ) +x^{2}e^{x}\left ( 6C+B\right ) +x^{3}e^{x}\left ( C\right ) \\ y_{p}^{\prime \prime \prime } & =e^{x}\left ( 2B\right ) +e^{x}\left ( 6C+4B\right ) +xe^{x}\left ( 6C+4B\right ) +2xe^{x}\left ( 6C+B\right ) +x^{2}e^{x}\left ( 6C+B\right ) +3x^{2}e^{x}\left ( C\right ) +x^{3}e^{x}\left ( C\right ) \\ & =e^{x}\left ( 6B+6C\right ) +xe^{x}\left ( 6C+4B+12C+2B\right ) +x^{2}e^{x}\left ( 6C+B+3C\right ) +Cx^{3}e^{x}\\ & =e^{x}\left ( 6B+6C\right ) +xe^{x}\left ( 18C+6B\right ) +x^{2}e^{x}\left ( 9C+B\right ) +Cx^{3}e^{x} \end{align*}

Substitution into the ODE gives\[ y_{p}^{\prime \prime \prime }-2y_{p}^{\prime \prime }+y_{p}^{\prime }=1+xe^{x}\] Hence\begin{multline*} e^{x}\left ( 6B+6C\right ) +xe^{x}\left ( 18C+6B\right ) +x^{2}e^{x}\left ( 9C+B\right ) +Cx^{3}e^{x}\\ -2\left ( e^{x}\left ( 2B\right ) +xe^{x}\left ( 6C+4B\right ) +x^{2}e^{x}\left ( 6C+B\right ) +x^{3}e^{x}\left ( C\right ) \right ) +\\ A+xe^{x}\left ( 2B\right ) +x^{2}e^{x}\left ( 3C+B\right ) +x^{3}e^{x}\left ( C\right ) =1+xe^{x} \end{multline*} Or\begin{multline*} e^{x}\left ( 6B+6C\right ) +xe^{x}\left ( 18C+6B\right ) +x^{2}e^{x}\left ( 9C+B\right ) +Cx^{3}e^{x}\\ -e^{x}\left ( 4B\right ) -xe^{x}\left ( 12C+8B\right ) -x^{2}e^{x}\left ( 12C+2B\right ) -x^{3}e^{x}\left ( 2C\right ) +\\ A+xe^{x}\left ( 2B\right ) +x^{2}e^{x}\left ( 3C+B\right ) +x^{3}e^{x}\left ( C\right ) =1+xe^{x} \end{multline*} Or\begin{multline*} e^{x}\left ( 6B+6C-4B\right ) +xe^{x}\left ( 18C+6B-12C-8B+2B\right ) +\\ x^{2}e^{x}\left ( 9C+B-12C-2B+3C+B\right ) +x^{3}e^{x}\left ( C-2C+C\right ) +A=1+xe^{x} \end{multline*} Or\[ e^{x}\left ( 2B+6C\right ) +xe^{x}\left ( 6C\right ) +A=1+xe^{x}\] Hence\begin{align*} 6C & =1\\ 2B+6C & =0\\ A & =1 \end{align*}

Therefore, \(C=\frac{1}{6},B=-\frac{1}{2}\), and the particular solution is\begin{align*} y_{p} & =Ax+x^{2}\left ( B+Cx\right ) e^{x}\\ & =x+\left ( -\frac{1}{2}x^{2}+\frac{1}{6}x^{3}\right ) e^{x} \end{align*}

Hence the complete solution is\begin{align*} y & =y_{h}+y_{p}\\ & =c_{1}+c_{2}e^{x}+c_{3}xe^{x}+x+\left ( -\frac{1}{2}x^{2}+\frac{1}{6}x^{3}\right ) e^{x} \end{align*}

Applying initial conditions. \(y\left ( 0\right ) =0\) gives\begin{equation} 0=c_{1}+c_{2} \tag{1} \end{equation} And \[ y^{\prime }=c_{2}e^{x}+c_{3}e^{x}+c_{3}xe^{x}+1+\left ( -x+\frac{1}{2}x^{2}\right ) e^{x}+\left ( -\frac{1}{2}x^{2}+\frac{1}{6}x^{3}\right ) e^{x}\] Applying second initial conditions \(y^{\prime }\left ( 0\right ) =0\) gives\begin{equation} 0=c_{2}+c_{3}+1 \tag{2} \end{equation} And \[ y^{\prime \prime }=c_{2}e^{x}+c_{3}e^{x}+c_{3}e^{x}+c_{3}xe^{x}+\left ( -1+x\right ) e^{x}+\left ( -x+\frac{1}{2}x^{2}\right ) e^{x}+\left ( -x+\frac{1}{2}x^{2}\right ) e^{x}+\left ( -\frac{1}{2}x^{2}+\frac{1}{6}x^{3}\right ) e^{x}\] Applying initial conditions  \(y^{\prime \prime }\left ( 0\right ) =1\) gives\begin{align*} 1 & =c_{2}+2c_{3}-1\\ 2 & =c_{2}+2c_{3} \end{align*}

The solution is \(c_{1}=4,c_{2}=-4,c_{3}=3\), hence the general solution is\begin{align*} y & =c_{1}+c_{2}e^{x}+c_{3}xe^{x}+x+\left ( -\frac{1}{2}x^{2}+\frac{1}{6}x^{3}\right ) e^{x}\\ & =4-4e^{x}+3xe^{x}+x-\frac{1}{2}x^{2}e^{x}+\frac{1}{6}x^{3}e^{x} \end{align*}

4.13.10 Section 5.5 problem 49

Problem Use method of variation of parameters to find particular solution \(y^{\prime \prime }-4y^{\prime }+4y=2e^{2x}\)

solution We need to first find the homogenous solution. The characteristic equation is\begin{align*} r^{2}-4r+4 & =0\\ \left ( r-2\right ) \left ( r-2\right ) & =0 \end{align*}

Hence \(r_{1}=2\), double root. Therefore \begin{align*} y_{1}\left ( x\right ) & =e^{2x}\\ y_{2}\left ( x\right ) & =xe^{2x} \end{align*}

Let \[ y_{p}=u_{1}y_{1}+u_{2}y_{2}\] Where\begin{align*} u_{1} & =-\int \frac{y_{2}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx\\ u_{2} & =\int \frac{y_{1}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx \end{align*}

Where \(f\left ( x\right ) =2e^{2x}\) and \begin{align*} W\left ( x\right ) & =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} =\begin{vmatrix} e^{2x} & xe^{2x}\\ 2e^{2x} & e^{2x}+2xe^{2x}\end{vmatrix} \\ & =e^{2x}\left ( e^{2x}+2xe^{2x}\right ) -2xe^{4x}\\ & =e^{4x}+2xe^{4x}-2xe^{4x}\\ & =e^{4x} \end{align*}

Hence\[ u_{1}=-\int \frac{xe^{2x}\left ( 2e^{2x}\right ) }{e^{4x}}dx=-\int 2xdx=-x^{2}\] And\[ u_{2}=\int \frac{e^{2x}\left ( 2e^{2x}\right ) }{e^{4x}}dx=2x \] Therefore\begin{align*} y_{p} & =u_{1}y_{1}+u_{2}y_{2}\\ & =-x^{2}e^{2x}+2x^{2}e^{2x}\\ & =x^{2}e^{2x} \end{align*}

4.13.11 Section 5.5 problem 50

Problem Use method of variation of parameters to find particular solution \(y^{\prime \prime }-4y=\sinh 2x\)

solution We need to first find the homogenous solution. The characteristic equation is\begin{align*} r^{2}-4 & =0\\ r & =\pm 2 \end{align*}

Therefore \begin{align*} y_{1}\left ( x\right ) & =e^{2x}\\ y_{2}\left ( x\right ) & =e^{-2x} \end{align*}

Let \[ y_{p}=u_{1}y_{1}+u_{2}y_{2}\] Where\begin{align*} u_{1} & =-\int \frac{y_{2}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx\\ u_{2} & =\int \frac{y_{1}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx \end{align*}

Where \(f\left ( x\right ) =\sinh 2x=\frac{e^{2x}-e^{-2x}}{2}\) and \begin{align*} W\left ( x\right ) & =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} =\begin{vmatrix} e^{2x} & e^{-2x}\\ 2e^{2x} & -2e^{-2x}\end{vmatrix} \\ & =-2-2=-4 \end{align*}

Hence\begin{align*} u_{1} & =-\int \frac{e^{-2x}\left ( \frac{e^{2x}-e^{-2x}}{2}\right ) }{-4}dx\\ & =\frac{1}{4}\int e^{-2x}\left ( \frac{e^{2x}-e^{-2x}}{2}\right ) dx\\ & =\frac{1}{8}\int \left ( 1-e^{-4x}\right ) dx\\ & =\frac{1}{8}\left ( x+\frac{e^{-4x}}{4}\right ) \end{align*}

And\begin{align*} u_{2} & =\int \frac{e^{2x}\left ( \frac{e^{2x}-e^{-2x}}{2}\right ) }{-4}dx\\ & =-\frac{1}{8}\int e^{2x}\left ( e^{2x}-e^{-2x}\right ) dx\\ & =-\frac{1}{8}\int \left ( e^{4x}-1\right ) dx\\ & =-\frac{1}{8}\left ( \frac{e^{4x}}{4}-x\right ) \end{align*}

Therefore\begin{align*} y_{p} & =u_{1}y_{1}+u_{2}y_{2}\\ & =\frac{1}{8}\left ( x+\frac{e^{-4x}}{4}\right ) e^{2x}-\frac{1}{8}\left ( \frac{e^{4x}}{4}-x\right ) e^{-2x}\\ & =\left ( \frac{1}{8}xe^{2x}+\frac{e^{-2x}}{32}\right ) -\frac{1}{8}\left ( \frac{e^{2x}}{32}-\frac{xe^{-2x}}{8}\right ) \\ & =\frac{1}{8}xe^{2x}+\frac{e^{-2x}}{32}-\frac{e^{2x}}{32}+\frac{xe^{-2x}}{8}\\ & =\frac{1}{4}x\left ( \frac{e^{2x}+e^{-2x}}{2}\right ) +\frac{1}{16}\left ( \frac{e^{-2x}-e^{2x}}{2}\right ) \\ & =\frac{1}{4}x\left ( \frac{e^{2x}+e^{-2x}}{2}\right ) -\frac{1}{16}\left ( \frac{e^{2x}-e^{-2x}}{2}\right ) \\ & =\frac{1}{4}x\cosh 2x-\frac{1}{16}\sinh 2x\\ & =\frac{1}{16}\left ( 4x\cosh 2x-\sinh 2x\right ) \end{align*}

4.13.12 Section 5.5 problem 53

Problem Use method of variation of parameters to find particular solution \(y^{\prime \prime }+9y=2\sec 3x\)

solution We need to first find the homogenous solution. The characteristic equation is\begin{align*} r^{2}+9 & =0\\ r & =\pm 3i \end{align*}

Therefore \begin{align*} y_{1}\left ( x\right ) & =\sin 3x\\ y_{2}\left ( x\right ) & =\cos 3x \end{align*}

Let \[ y_{p}=u_{1}y_{1}+u_{2}y_{2}\] Where\begin{align*} u_{1} & =-\int \frac{y_{2}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx\\ u_{2} & =\int \frac{y_{1}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx \end{align*}

Where \(f\left ( x\right ) =2\sec 3x=\frac{2}{\cos 3x}\) and \begin{align*} W\left ( x\right ) & =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} =\begin{vmatrix} \sin 3x & \cos 3x\\ 3\cos 3x & -3\sin 3x \end{vmatrix} \\ & =-3\sin ^{2}3x-3\cos ^{2}x\\ & =-3 \end{align*}

Hence\begin{align*} u_{1} & =-\int \frac{\cos 3x\left ( \frac{2}{\cos 3x}\right ) }{-3}dx\\ & =\frac{1}{3}\int 2dx\\ & =\frac{2}{3}x \end{align*}

And\begin{align*} u_{2} & =\int \frac{\sin 3x\left ( \frac{2}{\cos 3x}\right ) }{-3}dx\\ & =\frac{-2}{3}\int \tan 3xdx\\ & =\frac{-2}{3}\left ( \frac{1}{6}\ln \frac{1}{\cos ^{2}\left ( 3x\right ) }\right ) \end{align*}

Therefore\begin{align*} y_{p} & =u_{1}y_{1}+u_{2}y_{2}\\ & =\frac{2}{3}x\left ( \sin 3x\right ) +\frac{-2}{3}\left ( \frac{1}{6}\ln \frac{1}{\cos ^{2}\left ( 3x\right ) }\right ) \cos 3x\\ & =\frac{2}{3}x\left ( \sin 3x\right ) -\frac{1}{9}\cos \left ( 3x\right ) \ln \left ( \frac{1}{\cos ^{2}\left ( 3x\right ) }\right ) \\ & =\frac{2}{3}x\left ( \sin 3x\right ) +\frac{1}{9}\cos \left ( 3x\right ) \ln \left ( \cos ^{2}\left ( 3x\right ) \right ) \\ & =\frac{2}{3}x\left ( \sin 3x\right ) +\frac{2}{9}\cos \left ( 3x\right ) \ln \left \vert \cos \left ( 3x\right ) \right \vert \end{align*}

4.13.13 Section 5.5 problem 61

Problem Find a particular solution to the Euler ODE \(x^{2}y^{\prime \prime }+xy^{\prime }+y=\ln x\) with homogenous solution \(y_{h}=c_{1}\cos \left ( \ln x\right ) +c_{2}\sin \left ( \ln x\right ) \)

solution We see that \begin{align*} y_{1} & =\cos \left ( \ln x\right ) \\ y_{2} & =\sin \left ( \ln x\right ) \end{align*}

Using variation of parameters on the ODE\[ y^{\prime \prime }+\frac{1}{x}y^{\prime }+\frac{1}{x^{2}}y=\frac{\ln x}{x^{2}}\] Where now we use \(f\left ( x\right ) =\frac{\ln x}{x^{2}}\).  Let \[ y_{p}=u_{1}y_{1}+u_{2}y_{2}\] Where\begin{align*} u_{1} & =-\int \frac{y_{2}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx\\ u_{2} & =\int \frac{y_{1}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx \end{align*}

And \begin{align*} W\left ( x\right ) & =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} =\begin{vmatrix} \cos \left ( \ln x\right ) & \sin \left ( \ln x\right ) \\ -\frac{1}{x}\sin \left ( \ln x\right ) & \frac{1}{x}\cos \left ( \ln x\right ) \end{vmatrix} \\ & =\frac{1}{x}\cos ^{2}\left ( \ln x\right ) +\frac{1}{x}\sin ^{2}\left ( \ln x\right ) \\ & =\frac{1}{x} \end{align*}

Hence\begin{align*} u_{1} & =-\int \frac{\sin \left ( \ln x\right ) \left ( \frac{\ln x}{x^{2}}\right ) }{\frac{1}{x}}dx\\ & =-\int \frac{\ln x\sin \left ( \ln x\right ) }{x}dx\\ & =\ln \left ( x\right ) \cos \left ( \ln x\right ) -\sin \left ( \ln x\right ) \end{align*}

And\begin{align*} u_{2} & =\int \frac{\cos \left ( \ln x\right ) \left ( \frac{\ln x}{x^{2}}\right ) }{\frac{1}{x}}dx\\ & =\int \frac{\cos \left ( \ln x\right ) \left ( \ln x\right ) }{x}dx\\ & =\ln \left ( x\right ) \sin \left ( \ln x\right ) +\cos \left ( \ln x\right ) \end{align*}

Therefore\begin{align*} y_{p} & =u_{1}y_{1}+u_{2}y_{2}\\ & =\left ( \ln \left ( x\right ) \cos \left ( \ln x\right ) -\sin \left ( \ln x\right ) \right ) \cos \left ( \ln x\right ) +\left ( \ln \left ( x\right ) \sin \left ( \ln x\right ) +\cos \left ( \ln x\right ) \right ) \sin \left ( \ln x\right ) \\ & =\ln \left ( x\right ) \cos ^{2}\left ( \ln x\right ) -\sin \left ( \ln x\right ) \cos \left ( \ln x\right ) +\ln \left ( x\right ) \sin ^{2}\left ( \ln x\right ) +\sin \left ( \ln \right ) \cos \left ( \ln x\right ) \\ & =\ln \left ( x\right ) \cos ^{2}\left ( \ln x\right ) +\ln \left ( x\right ) \sin ^{2}\left ( \ln x\right ) \\ & =\ln x \end{align*}

4.13.14 Section 5.5 problem 62

Problem Find a particular solution to the Euler ODE \(\left ( x^{2}-1\right ) y^{\prime \prime }-2xy^{\prime }+2y=x^{2}-1\) with homogenous solution \(y_{h}=c_{1}x+c_{2}\left ( 1+x^{2}\right ) \)

solution We see that \begin{align*} y_{1} & =x\\ y_{2} & =1+x^{2} \end{align*}

Using variation of parameters on the ODE\[ y^{\prime \prime }-2\frac{x}{\left ( x^{2}-1\right ) }y^{\prime }+\frac{2}{\left ( x^{2}-1\right ) }y=1 \] Where now we use \(f\left ( x\right ) =1\).  Let \[ y_{p}=u_{1}y_{1}+u_{2}y_{2}\] Where\begin{align*} u_{1} & =-\int \frac{y_{2}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx\\ u_{2} & =\int \frac{y_{1}\left ( x\right ) f\left ( x\right ) }{W\left ( x\right ) }dx \end{align*}

And \begin{align*} W\left ( x\right ) & =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} =\begin{vmatrix} x & 1+x^{2}\\ 1 & 2x \end{vmatrix} \\ & =2x^{2}-\left ( 1+x^{2}\right ) \\ & =x^{2}-1 \end{align*}

Hence\begin{align*} u_{1} & =-\int \frac{\left ( 1+x^{2}\right ) \left ( 1\right ) }{x^{2}-1}dx\\ & =-x-\ln \left ( x-1\right ) +\ln \left ( x+1\right ) \end{align*}

And\begin{align*} u_{2} & =\int \frac{x}{x^{2}-1}dx\\ & =\frac{1}{2}\ln \left ( x-1\right ) +\frac{1}{2}\ln \left ( x+1\right ) \end{align*}

Therefore\begin{align*} y_{p} & =u_{1}y_{1}+u_{2}y_{2}\\ & =\left ( -x-\ln \left ( x-1\right ) +\ln \left ( x+1\right ) \right ) x+\left ( \frac{1}{2}\ln \left ( x-1\right ) +\frac{1}{2}\ln \left ( x+1\right ) \right ) \left ( 1+x^{2}\right ) \\ & =-x^{2}+x\ln \left \vert \frac{x+1}{x-1}\right \vert +\frac{1}{2}\left ( 1+x^{2}\right ) \ln \left \vert \left ( x-1\right ) \left ( x+1\right ) \right \vert \\ & =-x^{2}+x\ln \left \vert \frac{x+1}{x-1}\right \vert +\frac{1}{2}\left ( 1+x^{2}\right ) \ln \left \vert x^{2}-1\right \vert \end{align*}