\documentclass[12pt]{article}
\def\sol{{\it Solution:\,\,}}
\usepackage{amsmath}
\usepackage{amsfonts,epsfig}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{9.0in}
\topmargin=-.25in

\begin{document}
\pagestyle{empty}



\begin{center}
Math 132: Calculus for Physical and Life Sciences 2\\ 
Solutions for Problem Set 7 \\ 
Due Friday, April 4, 2008, at the beginning of class.
\end{center}
\vspace{10pt}

General Directions: You must show all work for credit on these problems. 

\begin{enumerate}
\item All parts of this question deal with the differential equation 
$y' = x + y$.  
\begin{enumerate}
\item[(a)]  Verify that $y = -x - 1$ is a solution of this differential equation.

\sol
With $y = -x - 1$, we have $y' = \frac{dy}{dx} = -1$.  On the right side of the
equation $x + y = x + (-x - 1) = -1$.  Therefore $y = -x - 1$ solves this 
differential equation.
\item[(b)]  Sketch the direction field of this equation by hand, showing the 
slopes at all points with $-3 \le x \le 3, -3 \le y \le -3$ with integer coordinates.

\sol (See plot with part (c) below).
\item[(c)]  On your direction field graph, sketch approximate graphs
of the solutions of this differential equation satisfying the initial 
conditions $y(0) = -2$, $y(0) = 0$, $y(0) = 1$.  

\sol
Here is a Maple plot showing this direction field and the solutions.
\begin{center}
\includegraphics[width=2.8truein,height=2.8truein]{132PS7S1b.ps}
\end{center}
Note that more direction field segments are plotted here than the problem
asked for, because Maple is using a default grid that is finer
than the grid of points with integer coordinates.
\item[(d)]  Use Euler's method with $n = 5$, $\Delta x = .2$ 
to approximate the solution of the equation with the initial condition 
$y(0) = 1$ for $0 \le x \le 1$.  

\sol
We have
\begin{eqnarray*}
x_0 = 0 &\qquad& y_0 = 1 \quad \text{ given from initial condition }\\
x_1 = .2 &\qquad& y_1 = y_0 + (x_0 + y_0)\Delta x = 1 + 1(.2) = 1.2\\
x_2 = .4 &\qquad& y_2 = y_1 + (x_1 + y_1)\Delta x = 1.2 + (1.4)(.2) = 1.48\\
x_3 = .6 &\qquad& y_3 = y_2 + (x_2 + y_2)\Delta x = 1.48 + (1.88)(.2) = 1.856\\
x_4 = .8 &\qquad& y_4 = y_3 + (x_3 + y_3)\Delta x = 1.856 + (2.456)(.2) = 2.3472\\
x_5 = 1.0 &\qquad& y_5 = y_4 + (x_4 + y_4)\Delta x = 2.3472 + (3.1472)(.2) = 2.97664
\end{eqnarray*}
\end{enumerate}

\item All parts of this question deal with the differential equation 
$y' = 3 - y$.  
\begin{enumerate}
\item[(a)]  Sketch the direction field of this equation by hand, showing the 
slopes at all points with $-1 \le x \le 5, 0 \le y \le 5$ with integer coordinates.

\sol
See plot with part (b) below.  Note again that Maple is using a finer
default grid to draw the direction field.
\item[(b)]  On your direction field graph, sketch approximate graphs
of the solutions of this differential equation satisfying the initial 
conditions $y(0) = 0$, $y(0) = 3$, and $y(0) = 4$.  What is the long 
term behavior of each?

\sol
\begin{center}
\includegraphics[width=2.8truein,height=2.8truein]{132PS7S2b.ps}
\end{center}

From the graph, we see that $\displaystyle{\lim_{x\to +\infty} y(x) = 3}$
for all three solutions.
\item[(c)]  Use Euler's method with $n = 5$, $\Delta x = .2$ 
to approximate the solution of the equation with the initial condition 
$y(0) = 1$ for $0 \le x \le 1$.  

\sol
We have
\begin{eqnarray*}
x_0 = 0 &\qquad& y_0 = 1 \quad \text{ given from initial condition }\\
x_1 = .2 &\qquad& y_1 = y_0 + (3 -  y_0)\Delta x = 1.4\\
x_2 = .4 &\qquad& y_2 = y_1 + (3 - y_1)\Delta x = 1.72\\
x_3 = .6 &\qquad& y_3 = y_2 + (3 - y_2)\Delta x = 1.976\\
x_4 = .8 &\qquad& y_4 = y_3 + (3 - y_3)\Delta x = 2.1808\\
x_5 = 1.0 &\qquad& y_5 = y_4 + (3 - y_4)\Delta x = 2.34464
\end{eqnarray*}
                                    
\item[(d)]  This is a separable equation.  Derive the general solution
by separating variables and integrating.   

\sol
Separating variables and integrating yields:
\begin{eqnarray*}
\frac{dy}{3 - y} &=& dx\\
\int \frac{dy}{3 - y} &=& \int dx\\
-\ln|3 - y| &=& x + c\\
3 - y &=& b e^{-x} \text{ (where $b = \pm e^{-c}$) }\\
y &=& 3 - be^{-x}.
\end{eqnarray*}

\item[(e)]  What is the exact formula for the solution of the 
differential equation with the initial condition $y(0) = 1$?

\sol
Using the answer from part (d), we solve for $b$ from the initial condition:
\[
1 = 3 - be^0 \Rightarrow b = 2.
\]
So the solution with this initial condition is $y = 3 - 2e^{-x}$.  
\end{enumerate}

\item Solve each of the following differential equations, finding
an explicit formula for $y$ as a function of $x$ if possible (you 
can leave the solution in implicit form if not).  In some cases
you are given initial conditions; use them to determine the arbitrary
constant in the general solution.
\begin{enumerate}
\item[(a)] $\displaystyle{y' = \frac{\tan(y)}{x^2 + 4x + 3}}$, find the general solution.

\vskip 10pt
\sol
Separate variables and integrate, using partial fractions on the right and 
$\displaystyle{\tan(y) = \frac{\sin(y)}{\cos(y)}}$ on the left:
\begin{eqnarray*}
\frac{1}{\tan(y)} dy &=& \frac{1}{x^2 + 4x + 3}\ dx\\
\int \frac{\cos(y)}{\sin(y)}\ dy &=& \int \frac{1/2}{x + 1} + \frac{-1/2}{x + 3}\ dx\\
\ln |\sin(y)| &=& \frac{1}{2}\ln|x+1| - \frac{1}{2}\ln|x + 3| + c\\
              &=& \ln\sqrt{\left|\frac{x+1}{x+3}\right|} + c \quad \text{(by properties of $\ln$)}\\
\sin(y) &=& b \cdot \sqrt{\left|\frac{x+1}{x+3}\right|} \quad \text{ (where $b = \pm e^c$)}\\
y &=& \sin^{-1}\left(b\cdot \sqrt{\left|\frac{x+1}{x+3}\right|}\right).
\end{eqnarray*}

\item[(b)] $\displaystyle{y' = \frac{(x-1)y^5}{x^2(2y^3 - y)}}$, find the general solution.

\sol
Separate variables, simplify, and integrate by the power rule,
\begin{eqnarray*}
\frac{2y^3 - y}{y^5}\ dy &=& \frac{x - 1}{x^2}\ dx\\
2y^{-2} - y^{-4}\ dy &=& x^{-1} - x^{-2}\ dx\\
\int 2y^{-2} - y^{-4}\ dy &=& \int x^{-1} - x^{-2}\ dx\\
-2 y^{-1} + \frac{1}{3} y^{-3} &=& \ln|x| + x^{-1} + c.
\end{eqnarray*}
(This is one where the solution is defined implicitly by the 
equation.)
\item[(c)] $y' = 2xy$ with $y(0) = 4$.

\sol
Separate variables, and integrate,
\begin{eqnarray*}
\frac{1}{y}\ dy &=& 2x\ dx\\
\ln|y| &=& x^2 + c\\
y &=& b e^{x^2} \quad \text{(where $b = \pm e^c$)}.
\end{eqnarray*}
From the initial condition $4 = b e^0$, so $b = 4$.  The solution is 
$y = 4 e^{x^2}$.  
\item[(d)] $y' = x(y^2 + 1)$ with $y(0) = 1$.

\sol
Separate variables, and integrate,
\begin{eqnarray*}
\frac{1}{y^2+1}\ dy &=& x\ dx\\
\tan^{-1}(y) &=& \frac{x^2}{2} + c\\
y &=& \tan\left(\frac{x^2}{2} + c\right).
\end{eqnarray*}
From the initial condition $1 = \tan(0 + c)$, so $c = \frac{\pi}{4}$ gives one
solution, and $\displaystyle{y = \tan\left(\frac{x^2}{2} + \frac{\pi}{4}\right)}$.
(Note that in this case the periodicity of the tangent function
means that other values of $c$ with $\tan(c) = 1$ will define equivalent functions.)
\item[(e)] $y' = 2xy^2 + 3x^2y^2$ with $y(1) = -1$.  

\sol
To see that this equation is separable, we factor the right hand side:
$y' = (2x + 3x^2)y^2$ which is of the form $g(x)h(y)$ as required.
Then we separate variables and integrate as before.
\begin{eqnarray*}
\int y^{-2}\ dy &=& \int 2x + 3x^2\ dx\\
- \frac{1}{y} &=& x^2 + x^3 + c\\ 
y &=& \frac{-1}{x^2 + x^3 + c}.
\end{eqnarray*}
From the initial condition $\displaystyle{-1 = \frac{-1}{2 + c}}$ so $c = -1$.
The solution is 
\[
y = \frac{-1}{x^2 + x^3 - 1}.
\]
\item[(f)] $y' = 3y(1 - y/20)$ with $y(0) = 5$.  (Note:  this is a logistic equation.)

\sol
By the general form of the solutions of logistic equations derived in class,
we have $M = 20$ and $k = 3$, so
\[
y = \frac{20}{1 + a e^{-3x}}
\]
for some constant $a$.  To determine $a$, we use the initial condition:
$\displaystyle{5 = \frac{20}{1 + ae^0}}$, so $1 + a = 4$ and $a = 3$.  The
solution is 
\[
y = \frac{20}{1 + 3 e^{-3x}}.
\]
\end{enumerate}

\item (Radiocarbon dating.) $C^{14}$ is a radioactive isotope 
of carbon with half-life of approximately $5700$ years.  It 
occurs naturally and is incorporated in living tissues by normal 
metabolic processes.   Assume that any $C^{14}$ present when the 
tissue dies decays exponentially from that time on.  
Carbon extracted from an ancient skull contains
only one-sixth as much $C^{14}$ as carbon extracted from present-day 
bone.  How old is the skull?

\sol
Since the $C^{14}$ is decaying exponentially, writing $Q$ for the 
amount, we have $Q' = kQ$ for some negative constant $k$.  The solutions
of this differential equation are
\[
Q(t) = Q(0) e^{kt}.
\]
Since the half-life is $5700$ years, whatever $Q(0)$ was, 
\[
Q(5700) = Q(0) e^{5700k} = \frac{1}{2} Q(0).
\]
Therefore solving the equation $\displaystyle{e^{5700k} = \frac{1}{2}}$ for 
$k$, we have $k = \frac{\ln(1/2)}{5700} \doteq -0.1216 \times 10^{-3}$. 
Now thinking of $Q(0)$ as the amount of $C^{14}$ that was in the skull
at the time the animal it came from died, in the time elapsed since death 
to the present, the amount
present has decayed to $\displaystyle{\frac{1}{6} Q(0)}$.  Hence we 
want to solve the equation 
\[
\frac{1}{6}Q(0) = Q(0) e^{(-.1216 \times 10^{-3})t}
\]
for $t$ to find the age: 
\[
t = \frac{\ln(1/6)}{-.1216 \times 10^{-3}} \doteq 14375 \text{ years}.
\]

\item (Newton's Law of Heating/Cooling.) A pitcher of buttermilk initially 
at $25^\circ$ C is cooled
by setting it out on the front porch on a cold day when the exterior
temperature is a constant $0^\circ$ C.  Suppose that the buttermilk
has reached $15^\circ$ C after 20 minutes.  
\begin{enumerate}
\item[(a)] What will the temperature be after $25$ minutes?
\item[(b)] When will the temperature reach $5^\circ$ C?

\sol
For both parts, we use the differential equation $T' = k(T - A)$ from 
Newton's Law.  The solutions are $T = A + be^{kt}$.  Now in the 
situation of the problem, $A = 0$ (the ambient temperature on the porch).
We have $T(0) = 25$, so $25 = 0 + be^0$ which shows $b = 25$.
In addition from $T(20) = 15$, $15 = 25e^{20k}$ so $k = \frac{\ln(15/25)}{20} = 
\ln(.6)/20 \doteq -.02554$.  So the temperature at all later times is
\[
T(t) = 25 e^{(-0.02554)t}.
\]
(a) After $25$ minutes $T(25) = 25e^{(-0.02554)(25)} \doteq 13.2^\circ$ C.

(b) The temperature reaches $5^\circ$ C when 
$5 = 25 e^{(-0.02554)t}$, so $t = \frac{\ln(.2)}{-0.02554} \doteq 63$ minutes.
\end{enumerate}

\item
The population of fish in a lake is attacked by a microscopic water-borne
parasite at $t = 0$, and as a result the population declines at 
a rate proportional to the {\it square root\/} of the population from that
time on.
\begin{enumerate}
\item[(a)]  Express this statement about the rate of growth of the 
population $P$ as a differential equation.
(There should be a constant of proportionality, say $-k$, 
in your equation.)  

\sol 
The differential equation is
\[
P' = \frac{dP}{dt} = -k\sqrt{P}.
\]
(We write the constant of proportionality as $-k$ here because we know that
since $P$ is decreasing over time, $P' < 0$.  The value of $k$ will be 
positive with this choice.)

\item[(b)]  Use separation of variables to find the general solution
of your differential equation.

\sol
\begin{eqnarray*}
\int \frac{dP}{\sqrt{P}} &=& \int -k\ dt\\
2 P^{1/2} &=& -kt + c\\
P &=& \left(\frac{-k}{2} t + \frac{c}{2}\right)^2.
\end{eqnarray*}
(Note that $\frac{c}{2}$ is just another arbitrary constant, though.)
\item[(c)]  At $t = 0$ there were 900 fish in the lake; 441 were
left after 6 weeks.  When did the fish population disappear entirely?

\sol
We take $t$ as the time \emph{in weeks} for simplicity.  (The only 
differences if we used a different time unit would be in the values
of $k$ and $c$.)
From the answer to part (b), $900 = \left(0 + \frac{c}{2}\right)^2$
so $\frac{c}{2} = 30$.  Thus $P = \left(\frac{-k}{2} t + 30\right)^2$.
When $t = 6$, $441 = (-3k + 30)^2$, so $21 = -3k + 30$ and $k = 3$.
The population as a function of time is 
\[
P = \left(\frac{-3}{2} t + 30\right)^2.
\]
The population reaches $P = 0$ when $\frac{-3}{2}t + 30 = 0$, so $t = 20$ weeks.
\end{enumerate}

\end{enumerate}
\end{document}
