3.4 My write up of first exam

  3.4.1 problem 1
  3.4.2 problem 2
  3.4.3 problem 3
  3.4.4 problem 4
  3.4.5 problem 5

This is my post-mortem solution of the first exam, and after seeing the exam review given in class on Oct. 25, 2013 by professor Henderson. Made an algebra error in problem 3 since I did not simplify it before doing the derivation. Problem 5 needed the use of convolution to finish.

3.4.1 problem 1

pict

\(\left \{ a\rightarrow false,b\rightarrow true,c\rightarrow false,d\rightarrow false,e\rightarrow true,f\rightarrow false,g\rightarrow true\right \} \)

3.4.2 problem 2

Solve the initial value problem \(\frac{dy}{dx}+y=xy^{3};y\left ( 0\right ) =1\)

This is a Bernoulli differential equation. Dividing by \(y^{3}\)

\[ \frac{1}{y^{3}}\frac{dy}{dx}+\frac{1}{y^{2}}=x \]

Let \(u=\frac{1}{y^{2}}\), hence \(\frac{du}{dx}=-2\frac{1}{y^{3}}\frac{dy}{dx}\) or \(\frac{dy}{dx}=\frac{-y^{3}}{2}\frac{du}{dx}\) then the differential equation becomes

\begin{align*} \frac{1}{y^{3}}\left ( \frac{-y^{3}}{2}\frac{du}{dx}\right ) +u & =x\\ \frac{-1}{2}\frac{du}{dx}+u & =x\\ \frac{du}{dx}-2u & =-2x \end{align*}

Integrating factor \(I_{f}=e^{-2x}\), hence

\begin{align*} d\left ( e^{-2x}u\right ) & =-2e^{-2x}x\\ e^{-2x}u & =-2\int xe^{-2x}dx\\ & =-2\left ( e^{-2x}\left ( -\frac{x}{2}-\frac{1}{4}\right ) \right ) +c \end{align*}

Hence

\begin{align*} u & =-2e^{2x}\left ( e^{-2x}\left ( -\frac{x}{2}-\frac{1}{4}\right ) \right ) +ce^{2x}\\ & =x+\frac{1}{2}+ce^{2x} \end{align*}

But \(u=\frac{1}{y^{2}}\), therefore \begin{align*} y^{2} & =\frac{1}{u}\\ & =\frac{1}{x+\frac{1}{2}+ce^{2x}} \end{align*}

or  

\[ y=\pm \frac{1}{\sqrt{x+\frac{1}{2}+ce^{2x}}}\]

Applying initial conditions give

\begin{align*} 1 & =\frac{1}{\frac{1}{2}+c}=\frac{2}{1+2c}\\ 1+2c & =2\\ c & =\frac{1}{2} \end{align*}

The final answer is

\[ y=\pm \frac{1}{\sqrt{x+\frac{1}{2}+\frac{1}{2}e^{2x}}}\]

3.4.3 problem 3

Find the general solution to the homogenous differential equation using the reduction in order method given that one of the solutions is \(y_{1}=x\)

\[ x^{3}y^{\prime \prime \prime }-3x^{2}y^{\prime \prime }+x\left ( 6-x^{2}\right ) y^{\prime }-\left ( 6-x^{2}\right ) y=0 \]

Let \(y_{2}=uy_{1}\) where \(u\left ( x\right ) \) is a function of \(x\) to be determined. Therefore \begin{align*} y_{2} & =ux\\ y_{2}^{\prime } & =u^{\prime }x+u\\ y_{2}^{^{\prime \prime }} & =u^{\prime \prime }x+u^{\prime }+u^{\prime }=u^{\prime \prime }x+2u^{\prime }\\ y_{2}^{\prime \prime \prime } & =u^{\prime \prime \prime }x+u^{\prime \prime }+2u^{\prime \prime }=u^{\prime \prime \prime }x+3u^{\prime \prime } \end{align*}

Hence the original ODE becomes

\begin{align*} x^{3}\left ( u^{\prime \prime \prime }x+3u^{\prime \prime }\right ) -3x^{2}\left ( u^{\prime \prime }x+2u^{\prime }\right ) +x\left ( 6-x^{2}\right ) \left ( u^{\prime }x+u\right ) -\left ( 6-x^{2}\right ) ux & =0\\ u^{\prime \prime \prime }\left ( x^{4}\right ) +u^{\prime \prime }\left ( 3x^{3}-3x^{2}\right ) +u^{\prime }\left ( x^{2}\left ( 6-x^{2}\right ) -6x^{2}\right ) +u\left ( x\left ( 6-x^{2}\right ) -\left ( 6-x^{2}\right ) x\right ) & =0\\ u^{\prime \prime \prime }\left ( x^{4}\right ) -u^{\prime }\left ( x^{4}\right ) & =0\\ u^{\prime \prime \prime }-u^{\prime } & =0 \end{align*}

Let \(u^{\prime }=v\)

\begin{align*} v^{\prime \prime }-v & =0\\ \left ( D^{2}-1\right ) v & =0 \end{align*}

Hence the roots are \(\lambda =\pm 1\) and the solution is \(v\left ( x\right ) =c_{1}e^{x}+c_{2}e^{-x}\), but since \(u^{\prime }=v\) then

\[ u^{\prime }=c_{1}e^{x}+c_{2}e^{-x}\]

Integrating

\[ u=c_{1}e^{x}-c_{2}e^{-x}+c_{3}\]

Therefore \begin{align*} y_{2} & =ux\\ & =c_{1}xe^{x}-c_{2}xe^{-x}+c_{3}x \end{align*}

And the final solution is

\begin{align*} y & =Ay_{1}+By_{2}\\ & =Ax+B\left ( c_{1}xe^{x}-c_{2}xe^{-x}+c_{3}x\right ) \\ & =Ax+Bc_{1}xe^{x}-Bc_{2}xe^{-x}+Bc_{3}x \end{align*}

Combining constants and renaming them gives

\[ y=c_{1}x+c_{2}xe^{x}-c_{3}xe^{-x}\]

The three constants can be found from initial conditions.

3.4.4 problem 4

Find the general solution to the following

\[ x^{2}y^{\prime \prime }+2xy^{\prime }-2y=6x \]

Let \(x=e^{z}\) or \(z=\ln \left ( x\right ) \), hence \(\frac{dz}{dx}=\frac{1}{x}\)

\begin{align*} \frac{dy}{dx} & =\frac{dy}{dz}\frac{dz}{dx}=\frac{1}{x}\frac{dy}{dz}\\ \frac{d^{2}y}{dx^{2}} & =\frac{d}{dx}\left ( \frac{1}{x}\frac{dy}{dz}\right ) =\left ( -\frac{1}{x^{2}}\frac{dy}{dz}+\frac{1}{x}\frac{d^{2}y}{dz^{2}}\frac{dz}{dx}\right ) =-\frac{1}{x^{2}}\frac{dy}{dz}+\frac{1}{x^{2}}\frac{d^{2}y}{dz^{2}} \end{align*}

Substituting the above in the original ODE gives

\begin{align} x^{2}\left ( -\frac{1}{x^{2}}\frac{dy}{dz}+\frac{1}{x^{2}}\frac{d^{2}y}{dz^{2}}\right ) +2x\left ( \frac{1}{x}\frac{dy}{dz}\right ) -2y & =6e^{z}\nonumber \\ -\frac{dy}{dz}+\frac{d^{2}y}{dz^{2}}+2\frac{dy}{dz}-2y & =6e^{z}\nonumber \\ \frac{d^{2}y}{dz^{2}}+\frac{dy}{dz}-2y & =6e^{z} \tag{1} \end{align}

Characteristic equation is \(\left ( \lambda ^{2}+\lambda -2\right ) =0\) hence \(\left ( \lambda -1\right ) \left ( \lambda +2\right ) =0\) hence the roots are \(\left \{ 1,-2\right \} \) and the solution is

\[ y_{h}=c_{1}e^{z}+c_{2}e^{-2z}\]

To find \(y_{p}\) guessing \(y_{p}=Ae^{z}+Bze^{z}\) then \(y_{p}^{\prime }=Ae^{z}+Be^{z}+Bze^{z}\) and \(y_{p}^{\prime \prime }=Ae^{z}+Be^{z}+Be^{z}+Bze^{z}\) and substituting this in the Eq. (1) and matching terms gives

\begin{align*} Ae^{z}+Be^{z}+Be^{z}+Bze^{z}+Ae^{z}+Be^{z}+Bze^{z}-2\left ( Ae^{z}+Bze^{z}\right ) & =6e^{z}\\ 3B & =6\\ B & =2 \end{align*}

Hence \(y_{p}=2ze^{z}\) and the solution is

\[ y\left ( z\right ) =c_{1}e^{z}+c_{2}e^{-2z}+2ze^{z}\]

But \(z=\ln \left ( x\right ) \) hence

\begin{align*} y\left ( x\right ) & =c_{1}e^{\ln x}+c_{2}e^{-2\ln x}+2\ln \left \vert x\right \vert e^{\ln x}\\ & =c_{1}x+\frac{c_{2}}{x^{2}}+2x\ln \left \vert x\right \vert \end{align*}

3.4.5 problem 5

Solve for \(y\left ( t\right ) \) using the Laplace transform. Initial conditions are \(y\left ( 0\right ) =1;y^{\prime }\left ( 0\right ) =0\)

\[ y^{\prime \prime }=f\left ( t\right ) +1+\int _{0}^{t}\left ( t-\tau \right ) y\left ( \tau \right ) d\tau \]

Taking Laplace transform, and using \(Y=\mathcal{L}\left ( y\left ( t\right ) \right ) \) and \(F=\mathcal{L}\left ( f\left ( t\right ) \right ) \) gives

\begin{align*} s^{2}Y-sy\left ( 0\right ) -y^{\prime }\left ( 0\right ) & =F+\frac{1}{s}+\mathcal{L}\left ( t\right ) \mathcal{L}\left ( y\right ) \\ s^{2}Y-s & =F+\frac{1}{s}+\frac{1}{s^{2}}Y\\ s^{4}Y-s^{3}-Y & =s^{2}F+s\\ Y & =\frac{Fs^{2}+s+s^{3}}{s^{4}-1}\\ & =\frac{Fs^{2}}{s^{4}-1}+\frac{s+s^{3}}{s^{4}-1}\\ & =\frac{Fs^{2}}{\left ( s^{2}+1\right ) \left ( s^{2}-1\right ) }+\frac{s\left ( s^{2}+1\right ) }{\left ( s^{2}+1\right ) \left ( s^{2}-1\right ) }\\ & =\frac{Fs^{2}}{\left ( s^{2}+1\right ) \left ( s^{2}-1\right ) }+\frac{s}{\left ( s^{2}-1\right ) }\\ & =\frac{1}{2}\frac{1}{\left ( s^{2}+1\right ) }F+\frac{1}{2}\frac{1}{\left ( s^{2}-1\right ) }F+\frac{s}{\left ( s^{2}-1\right ) } \end{align*}

now \(\mathcal{L}^{-1}\frac{s}{\left ( s^{2}-1\right ) }=\cosh \left ( t\right ) \) and \[\mathcal{L}^{-1}\left ( \frac{1}{2}\frac{1}{\left ( s^{2}+1\right ) }F\right ) =\frac{1}{2}\int _{0}^{t}\sin \left ( t-\tau \right ) f\left ( \tau \right ) d\tau \]

and

\[\mathcal{L}^{-1}\left ( \frac{1}{2}\frac{1}{\left ( s^{2}-1\right ) }F\right ) =\frac{1}{2}\int _{0}^{t}\sinh \left ( t-\tau \right ) f\left ( \tau \right ) d\tau \]

Hence the solution is

\[ y\left ( t\right ) =\cosh \left ( t\right ) +\frac{1}{2}\left ( \int _{0}^{t}\sin \left ( t-\tau \right ) f\left ( \tau \right ) d\tau +\int _{0}^{t}\sinh \left ( t-\tau \right ) f\left ( \tau \right ) d\tau \right ) \]