\documentclass[11pt]{article}


\setlength\topmargin{-0.5in}

\evensidemargin 0.0truein
\oddsidemargin 0.0truein
\textwidth 7.0truein
\textheight 9.0truein




\usepackage{amsthm,amssymb}
\usepackage{hyperref}


\theoremstyle{remark}
\newtheorem{problem}{Problem}
\newtheorem{solution}{Solution}

\begin{document}

\noindent
Math 196 - Quiz 2, September 11, 2008 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
Name:\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_Key\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

\vskip .6in

\begin{problem}
Find a solution (or give a reason why it does not exist) to the differential equation $(x^2 + 1)^2(\frac{dy}{dx} - 2y) = -2xe^{2x}$ given the initial condition 
$y(0) = 0$.
\end{problem}

\vskip .2in

\begin{solution}

By dividing both sides of the equation by $(x^2 + 1)^2$ we obtain the linear equation
$$
\frac{dy}{dx} - 2y = -\frac{2xe^{2x}}{(x^2 + 1)^2},
$$
(note that $x^2 + 1 \not= 0$).  As the coefficients $-2$ and $-\frac{2xe^{2x}}{(x^2 + 1)^2}$ of the linear equation are continuous on $\mathbb R$ we know that a unique solution exists on $\mathbb R$ such that $y(0) = 0$.

Since $\frac{d}{dx}(e^{-2x}) = -2e^{-2x}$ we may multiply both sides of the equation by $e^{-2x}$ and by
\href{http://en.wikipedia.org/wiki/Product_rule}{Leibniz}'s rule we have
$$
\frac{d}{dx}( e^{-2x}y ) = e^{-2x}\frac{dy}{dx} + \frac{d}{dx}(e^{-2x}) y = e^{-2x}(  \frac{dy}{dx} - 2y ) = -\frac{2x}{(x^2 + 1)^2}.
$$
By integration we then have
$$
e^{-2x}y = - \int{ \frac{2x}{(x^2 + 1)^2} }dx = \frac{1}{x^2 + 1} + C.
$$
Solving for the initial condition $y(0) = 0$ we see that $0 = 1 + C$, so that $C = -1$, hence by multiplying the equation by $e^{2x}$
we obtain the final solution
$$
y = e^{2x} (\frac{1}{x^2 + 1} - 1) = -\frac {x^2e^{2x}}{x^2 + 1}.
$$

\end{solution}

\vskip .6in

\begin{problem}
A large tank is half full with a mixture of salt dissolved in water.  Pure water is pumped into the tank at the rate of 2 gallons per minute, and water is let out of the tank at the rate of 1 gallon per minute, thus overall the tank is filling up.  Assuming the mixture in the tank is kept uniform by stirring, what percentage of the original salt will still be in the tank when it is full?

Hint:  The answer does not depend on the size of the tank, nor the amount of salt initially in the tank, thus if you prefer you may take any values you want for these.
\end{problem}

\vskip .2in

\begin{solution}
Let $v$ be the volume of mixture which starts in the tank (in gallons), $r_i$ and $c_i$ (resp. $r_o, c_o$) the rate and concentration of salt for the water coming into the tank (resp. out of the tank) , 
we know that the change in the amount of salt in the tank during an interval  $\Delta t$ is going to be the amount of salt that comes in $r_i c_i \Delta t$ minus the amount of salt that goes out $r_o c_o \Delta t$.
The concentration of salt in the tank at time $t$ is $c_o = c_o(t)$ and is given by the amount of salt in the tank at time $t$ divided by the amount of mixture in the tank at time $t$, this gives rise to the differential equation:
$$
\frac{dX}{dt} = r_i c_i - \frac{r_o X}{v + (r_i - r_o)t}. 
$$
Once we plug in the known constants $r_i = 2$, $r_o = 1$, and $c_i = 0$ we have
$$
\frac{dX}{dt} = - \frac{X}{v + t}.
$$

By separation of variables and integration we obtain
$$
\ln |X| = \int \frac{1}{X} \frac{dX}{dt} dt = - \int \frac{1}{v + t} dt =  - \ln | v + t | + C.
$$
Note $X$, and $v + t$ are always positive quantities and so by exponentiating both sides of the equation we have
$$
X = \frac{C_1}{v + t},
$$
where $C_1 = e^C$.

We are looking for the percentage of the salt which is still in the tank once the tank is full.
The volume of the tank is $2v$ and the tank is filling at a rate of 1 gallon per minute, thus the tank will be full after $v$ minutes, hence the desired quantity we are looking for is
$$
X(v) / X(0) = ( \frac{C_1}{v + v} ) / ( \frac{C_1}{ v } ) = \frac{1}{2}.
$$
Thus $\frac{1}{2}$ or $50\%$ of the salt will be left.

\end{solution}


\end{document}
