
\documentclass[12pt]{amsart}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{float}
\usepackage{amsmath}
\usepackage{graphicx}

\setcounter{MaxMatrixCols}{10}
%TCIDATA{OutputFilter=LATEX.DLL}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{LastRevised=Monday, February 22, 2021 19:27:30}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{CSTFile=amsart.cst}

%\input{tcilatex}
\evensidemargin=0in
\oddsidemargin=0in
\topmargin=-.70in
\setlength{\parskip}{.05in}
\setlength{\parindent}{0in}
\textwidth=6.45in
\textheight=9.0in

\begin{document}

\begin{center}
\textbf{Math 2233.21569}\\[0pt]
SOLUTIONS TO FIRST EXAM \\[0pt]
February 23, 2021
\end{center}

1. Classify the following differential equations: determine their order, if
they are linear or non-linear, and if they are ordinary differential
equations or partial differential equations.

(a) $\displaystyle\frac{\partial ^{2}\phi }{\partial t^{2}}-x^{2}\frac{%
\partial ^{2}\phi }{\partial x^{2}}=0$

\begin{itemize}
\item 2nd Order, Linear, PDE
\end{itemize}

(b) $\displaystyle\frac{dy}{dx}+x^{2}y=e^{x}$

\begin{itemize}
\item 1st Order, Linear, ODE
\end{itemize}

(c) $\displaystyle\frac{d^{2}x}{dt^{2}}+x\frac{dx}{dt}+x=0$

\begin{itemize}
\item 2nd Order, Nonlnear, ODE
\end{itemize}

(d) $\displaystyle\frac{d^{3}\phi }{dt^{3}}+t\frac{d\phi }{dt}=\sin \left(
t\right) $

\begin{itemize}
\item 3rd Order, Linear, ODE
\end{itemize}

(e) $\displaystyle\frac{\partial ^{2}\phi }{\partial x^{2}}+y\left( \frac{%
\partial \phi }{\partial y}\right) ^{2}=0$

\begin{itemize}
\item 2nd Order, Nonlinear, PDE
\end{itemize}

2. Consider the following first order ODE: $y^{\prime }=xy+y$ and suppose $%
y(x)$ is the solution satisfying $y(0)=1.$ Use the numerical (Euler) method
with $n=3$ and $\Delta x=0.1$ to estimate $y(0.3)$.

\begin{itemize}
\item From the problem statement we have%
\begin{eqnarray*}
y^{\prime } &=&xy+y\quad \Rightarrow \quad F\left( x,y\right) =xy+y \\
y(0) &=&1\quad \Rightarrow \quad x_{0}=0\quad ,\quad y_{0}=1 \\
\Delta x &=&0.1
\end{eqnarray*}%
and so%
\begin{eqnarray*}
x_{1} &=&x_{0}+\Delta x=0+0.1=0.1 \\
y_{1} &=&y_{0}+F\left( x_{0},y_{0}\right) \Delta x=1+\left(
x_{0}y_{0}+y_{0}\right) \left( 0.1\right) =1+\left( 0+1\right) \left(
0.1\right) =1.1 \\
x_{2} &=&x_{1}+\Delta x=0.2 \\
y_{2} &=&y_{1}+\left( x_{1}y_{1}+y_{1}\right) \Delta x=1.1+\left(
(0.1)(1.1)+1.1\right) \left( 0.1\right) =1.221 \\
x_{3} &=&x_{2}+\Delta x=0.3 \\
y_{3} &=&y_{2}+\left( x_{2}y_{2}+y_{2}\right) \Delta x=1.221+\left(
(0.2)(1.221)+1.221\right) \left( 0.1\right) =1.\,\allowbreak 367\,5
\end{eqnarray*}
Hence%
\begin{equation*}
y\left( 0.3\right) \approx y_{3}=1.3675
\end{equation*}

\newpage
\end{itemize}

3. Find an explicit solution of the following (separable) differential
equation. 
\begin{equation*}
x+\sin \left( y\right) y^{\prime }=2
\end{equation*}

\begin{itemize}
\item We first rewriting the ODE in the form $M\left( x\right) +N\left(
y\right) \frac{dy}{dx}=0$. \ This requires moving the constant $2$ to the
left hand side. \ We then have%
\begin{equation*}
M\left( x\right) =x-2\quad ,\quad N\left( y\right) =\sin \left( y\right)
\end{equation*}%
Since the ODE is separable, we solve it my solving the equivalent algebraic
equation%
\begin{eqnarray*}
\int M\left( x\right) dx+\int N\left( y\right) dy &=&C\quad \quad
\Rightarrow \quad \int \left( x-2\right) dx+\int \sin \left( y\right) dy=C \\
\quad &\Rightarrow &\quad \frac{1}{2}x^{2}-2x-\cos \left( y\right) =C \\
\quad &\Rightarrow &\quad \cos \left( y\right) =\frac{1}{2}x^{2}-2x-C \\
\quad &\Rightarrow &\quad y\left( x\right) =\cos ^{-1}\left( \frac{1}{2}%
x^{2}-2x-C\right)
\end{eqnarray*}
\end{itemize}

4. Solve the following initial value problem 
\begin{equation*}
xy^{\prime }-y=x\qquad ,\qquad y(1)=0
\end{equation*}

\begin{itemize}
\item This is a linear first order ODE. \ We first put it in the standard
form $y^{\prime }+p\left( x\right) y=g\left( x\right) $, by dividing both
sides by $x:$%
\begin{equation*}
y^{\prime }-\frac{1}{x}y=1\quad \Rightarrow \quad p\left( x\right) =-\frac{1%
}{x}\quad ,\quad g\left( x\right) =1
\end{equation*}%
Next, we calculate the integrating factor $\mu \left( x\right) $%
\begin{equation*}
\mu \left( x\right) =\exp \left[ \int p\left( x\right) dx\right] =\exp \left[
\int -\frac{1}{x}dx\right] =\exp \left[ -\ln \left\vert x\right\vert \right]
=x^{-1}=\frac{1}{x}
\end{equation*}%
and then%
\begin{eqnarray*}
y\left( x\right)  &=&\frac{1}{\mu \left( x\right) }\int \mu \left( x\right)
g\left( x\right) dx+\frac{C}{\mu \left( x\right) }=x\int \frac{1}{x}\left(
1\right) dx+Cx \\
&=&x\ln \left\vert x\right\vert +Cx
\end{eqnarray*}%
Thus, our general solution is $y\left( x\right) =\frac{1}{x}\ln \left\vert
x\right\vert +\frac{C}{x}$. \ We finish by imposing the initial conditions $%
y\left( 1\right) =0$ on the general solution in order to get the appropriate
value for the constant $C$. 
\begin{equation*}
0=y\left( 1\right) =\frac{1}{1}\ln \left\vert 1\right\vert +C\left( 1\right)
=C
\end{equation*}%
and so $C=0$. \ Our solution is thus%
\begin{equation*}
y\left( x\right) =x \ln \left\vert x\right\vert 
\end{equation*}
\end{itemize}

\newpage

5. Consider the following initial value problem%
\begin{eqnarray*}
y+\left( x+1\right) \frac{dy}{dx} &=&x \\
y\left( 0\right) &=&1
\end{eqnarray*}%
Show that the differential equation is exact and then find the explicit
solution satisfying the initial condition.

\begin{itemize}
\item Putting the ODE in the form $M\left( x,y\right) +N\left( x,y\right) 
\frac{dy}{dx}=0$, we find%
\begin{equation*}
M\left( x,y\right) =y-x\quad ,\quad N\left( x,y\right) =x+1
\end{equation*}%
We have%
\begin{equation*}
\frac{\partial M}{\partial y}=1=\frac{\partial N}{\partial x}
\end{equation*}%
and so the equation \textbf{is exact}. \ This means that the differential
equation is derivable from an algebraic equation of the form%
\begin{equation*}
\Phi \left( x,y\right) =C
\end{equation*}%
with $\Phi \left( x,y\right) $ determined by the requirements that $\frac{%
\partial \Phi }{\partial x}=M\left( x,y\right) $ and $\frac{\partial \Phi }{%
\partial y}=N\left( x,y\right) $. \ Thus,%
\begin{eqnarray*}
\Phi \left( x,y\right) &=&\int M\left( x,y\right) \partial x+c_{1}\left(
y\right) =\int \left( y-x\right) \partial x+c_{1}\left( y\right) =xy-\frac{1%
}{2}x^{2}+c_{1}\left( y\right) \\
\Phi \left( x,y\right) &=&\int N\left( x,y\right) \partial y+c_{2}\left(
x\right) =\int \left( x+1\right) \partial y+c_{2}\left( x\right)
=xy+y+c_{2}\left( x\right)
\end{eqnarray*}%
In order to get these two expressions for $\Phi \left( x,y\right) $ to
agree, we have to choose $c_{1}\left( y\right) =y$ and $c_{2}\left( x\right)
=-\frac{1}{2}x^{2}$. \ \ This yields $\Phi \left( x,y\right) =xy-\frac{1}{2}%
x^{2}+y$. We now need to solve $\Phi \left( x,y\right) =C$, or%
\begin{equation}
xy-\frac{1}{2}x^{2}+y=C  \tag{*}
\end{equation}

But since we have $C$ already isolated on the right hand side, we'll figure
out the right value for $C$ before solving (*) for $y$. \ The initial
condition says that when $x=0$ we have $y=1$. \ Thus, we need%
\begin{equation*}
\left( 0\right) \left( 1\right) -\frac{1}{2}\left( 0\right) ^{2}+\left(
1\right) =C\quad \quad \Rightarrow \quad C=1
\end{equation*}%
We now solve%
\begin{equation*}
xy-\frac{1}{2}x^{2}+y=1
\end{equation*}%
for $y$. \ The result is%
\begin{equation*}
y=\frac{1+\frac{1}{2}x^{2}}{x+1}
\end{equation*}
\end{itemize}

6. Find the general solution of%
\begin{equation}
x^{2}\frac{dy}{dx}=xy-y^{2}  \tag{*}
\end{equation}%
(Hint: recast the differential equation into the form $\frac{dy}{dx}=F\left( 
\frac{y}{x}\right) $ and use the change of variable $z\left( x\right) =\frac{%
y\left( x\right) }{x}$.)

\begin{itemize}
\item Dividing both sides of the ODE by $x^{2}$ yields%
\begin{equation*}
\frac{dy}{dx}=\frac{y}{x}-\left( \frac{y}{x}\right) ^{2}
\end{equation*}%
which is of the desired form with $F\left( z\right) =z-z^{2}$.

Next, we make the suggested change of variable%
\begin{equation*}
z=\frac{y}{x}\quad \Rightarrow \quad y=zx\quad \Rightarrow \quad \frac{dy}{dx%
}=x\frac{dz}{dx}+z
\end{equation*}%
Substituting $z$ for $\frac{y}{x}$ on the right hand side of (*) and $x\frac{%
dz}{dx}+z$ for $\frac{dy}{dx}$ on the left hand side of (*),\ we get%
\begin{equation*}
x\frac{dz}{dx}+z=z-z^{2}
\end{equation*}%
or, after cancelling the common term on both sides%
\begin{equation*}
x\frac{dz}{dx}=-z^{2}
\end{equation*}%
or, after dividing both sides by $xz^{2}$ and moving terms around, 
\begin{equation*}
\frac{1}{x}+\frac{1}{z^{2}}\frac{dz}{dx}=0
\end{equation*}%
This last equation is \textbf{separable}. \ So we solve it by the standard
method for separable equations:%
\begin{equation*}
M\left( x\right) =\frac{1}{x}\quad ,\quad N\left( z\right) =\frac{1}{z^{2}}%
\quad \Rightarrow \quad \int \frac{1}{x}dx+\int \frac{1}{z^{2}}dz=C
\end{equation*}%
or%
\begin{equation*}
\ln \left\vert x\right\vert -\frac{1}{z}=C
\end{equation*}%
or%
\begin{equation*}
z=\frac{1}{\ln \left\vert x\right\vert -C}
\end{equation*}%
Lastly, we use $y=xz$ to get the solution to the original differential
equation.%
\begin{equation*}
y\left( x\right) =\frac{x}{\ln \left\vert x\right\vert -C}
\end{equation*}
\end{itemize}

\end{document}
