\documentclass[12pt]{article}

\usepackage{latexsym,amsmath,epsfig,graphicx}
\setlength{\textwidth}{6.5in} \setlength{\textheight}{9in} \oddsidemargin = -.1 cm
\evensidemargin = -.1 cm 
\topmargin=-2cm
\begin{document}

\centerline{Mathematics 136 -- Calculus 2}
\centerline{Exam 3 -- Solutions for Review Sheet Sample Problems}
\centerline{November 18, 2016}

\vskip 10pt
\noindent
{\it Review problems}
\vskip  10pt
There is a selection of review problems posted on WebAssign as an 
optional assignment.  I have increased the number of tries on 
each problem to the maximum possible -- 100.
\vskip 10pt
\noindent
{\it Sample problems}
\vskip 10pt
\noindent
{\it Note:  The actual exam will be considerably shorter than the following
list of questions and it might not contain questions of all of these types.  
The purpose here is just to give an idea of the range
of different topics that will be covered and how questions might be posed.}
\vskip 10pt
\noindent
I. {\it Partial Fractions}.
\begin{enumerate}
\item[(A)]  Do you need partial fractions to 
integrate
$$\int \frac{t^2 + 1}{t^3 + 3t + 3}\ dt?$$
Explain, and compute the integral with a simpler method.
\item[] {\it Solution:}  You don't need partial fractions because the substitution 
$u = t^3 + 3t + 3$ gives $du = 3t^2 + 3$ and the integral is just 
$$\frac{1}{3} \int \frac{1}{u}\ du = \frac{1}{3}\ln|u| + C = \frac{1}{3}\ln|t^3 + 3t + 3| + C$$
\item[(B)]  Apply partial fraction decomposition to 
compute $$\int \frac{x^3+1}{x(x - 1)(x + 2)}\ dx$$
(Hint: you need to divide through first; do you see why?)
\item[] {\it Solution:}  You need to divide first because the degree of the numerator
is the same as the degree of the denominator.  The result is
$$\frac{x^3}{x^3 + x^2 - 2x} = 1 + \frac{-x^2 + 2x +1}{x(x-1)(x+2)}$$
We do partial fractions on the second term:
$$\frac{-x^2 + 2x +1}{x(x-1)(x+2)} = \frac{A}{x} + \frac{B}{x-1} + \frac{C}{x+2}$$
Clear denominators to obtain:
$$-x^2 + 2x + 1 = A(x-1)(x+2) + Bx(x+2) + Cx(x-1)$$
Equating coefficients of $x^2, x, 1$, this gives
\begin{eqnarray*}
-1 &=& A + B + C\\
2 &=& A + 2B - C\\
1 &=& -2A.
\end{eqnarray*}
From the last of these $A = -\frac{1}{2}$ and then 
\begin{eqnarray*}
 -\frac{1}{2} &=& B + C\\
\frac{5}{2} &=& 2B - C
\end{eqnarray*}
Adding these gives $B = \frac{2}{3}$ and then $C = -\frac{7}{6}$.  
The integral is 
$$\int 1 + \frac{-1/2}{x} + \frac{2/3}{x-1} - \frac{7/6}{x + 2}\ dx
= x - \frac{1}{2}\ln|x| + \frac{2}{3}\ln|x - 1| - \frac{7}{6}\ln|x + 2| + C.$$
\item[(C)]  What would the partial fractions look like to
integrate
$$\int \frac{1}{x(x^2 + 4)^2}\ dx?$$ 
(You don't need to solve for the coefficients, just set up 
the proper partial fractions.)
\item[] {\it Solution:}  The partial fractions have the form
$$\frac{A}{x} + \frac{Bx + C}{x^2 + 4} + \frac{Dx + E}{(x^2 + 4)^2}.$$
\item[(D)]  Suppose the partial fraction decomposition of a 
rational function is 
$$\frac{1}{81x} + \frac{-\frac{x}{9} + 1}{(x^2 + 9)^2} - \frac{\frac{x}{81}}{x^2 + 9}$$
What is the integral?  (Hint:  There's one part of this for which you 
need a trigonometric substitution.)
\item[]  We split the middle term into two parts, one with $-\frac{x}{9}$ in the 
numerator, one with $1$ in the numerator.  The parts which can be integrated
immediately are 
\begin{equation}
\label{part1}
\int \frac{1}{81x} + \frac{-\frac{x}{9}}{(x^2 + 9)^2} - \frac{\frac{x}{81}}{x^2 + 9}\ dx
= \frac{1}{81}\ln|x| + \frac{1}{18(x^2 + 9)} - \frac{1}{162}\ln|x^2 + 9|
\end{equation}
(the form of the middle term here is $\int u^{-2}\ du$; the last one is 
$\int u^{-1}\ du$, both up to suitable constants).  The remaining part to be
done is
$$\int \frac{1}{(x^2 + 9)^2}\ dx$$
For this one, we can use the trig substitution $x = 3\tan\theta$, $dx = 3\sec^2\theta d\theta$.  Then 
$$\int \frac{1}{(x^2 + 9)^2}\ dx = \frac{1}{27} \int \frac{\sec^2\theta}{\sec^4\theta}d \theta
= \frac{1}{27} \int \cos^2\theta\ d\theta.$$
This is integrated by the double angle formula as usual:
$$=\frac{1}{27} \left(\frac{\theta}{2} + \frac{1}{2}\sin\theta\cos\theta\right) + C$$
Finally converting back to a function of $x$, we have $\tan\theta = x/3$, so 
$\sin\theta = \frac{x}{\sqrt{x^2 + 9}}$ and $\cos\theta = \frac{3}{\sqrt{x^2+9}}$.  
So this remaining part of the integral is
\begin{equation}
\label{part2}
= \frac{1}{54}\tan^{-1}\left(\frac{x}{3}\right) + \frac{1}{18}\left(\frac{x}{x^2 + 9}\right).
\end{equation}
The final answer is the sum of \eqref{part1} and \eqref{part2}. 
\end{enumerate}
\vskip 10pt
\noindent
II.  For each of the following integrals, say why the integral is improper,
determine if the integral converges, and if so, find its value.
\vskip 10pt
\begin{enumerate}
\item[A)]  $\displaystyle \int_1^\infty \frac{1}{{\root 5 \of x}}\ dx$
\item[] {\it Solution:}  This is improper because of the infinite interval.
$$\lim_{b\to\infty} \int_1^b x^{-1/5}\ dx =
\lim_{b\to\infty} \left. \frac{5}{4} x^{4/5}\right|_1^b =\lim_{b\to\infty}\frac{5}{4}\left(b^{4/5} - 1\right).$$
This is not finite, so the integral \emph{diverges -- it does not converge}.  
\item[B)]  $\displaystyle \int_0^2 \frac{dx}{x^2 - 7x + 6}$
\item[] {\it Solution:}  This one is improper because the denominator
$x^2 - 7x + 6 = (x-1)(x-6)$
is zero at $x = 1$, which is in the interior of the interval.  In order
for the integral to converge, \emph{both}
$$\lim_{b\to 1^-} \int_0^b \frac{dx}{x^2 - 7x + 6}$$
and 
$$\lim_{a\to 1^+} \int_{a}^2 \frac{dx}{x^2 - 7x + 6}$$
must exist.  However neither integral does exist.  We integrate the first by partial 
fractions and find 
\begin{eqnarray*}
\lim_{b\to 1^-} \int_0^b \frac{dx}{x^2 - 7x + 6} &=& 
\lim_{b\to 1^-}\left(\left. -\frac{1}{5}\ln|x-1| + \frac{1}{5}\ln|x - 6|\right|_0^b\right)\\
&=&\lim_{b\to 1^-}\left(-\frac{1}{5}\ln|b-1| + \frac{1}{5}(\ln|b - 6| - \ln(6))\right).
\end{eqnarray*}
But the first term here does not have a finite limit as $b\to 1^-$.
Therefore this integral also {\it diverges}.
\item[C)]  $\int_0^\infty x e^{-3x}\ dx$
\item[] {\it Solution:}  We integrate by parts with $u = x$, $dv = e^{-3x}\ dx$ and find
\begin{eqnarray*}
&=&\lim_{b\to\infty} \left. -\frac{x e^{-3x}}{3} - \frac{e^{-3x}}{9}\right|_0^b\\
&=&\lim_{b\to\infty} -\frac{b}{3e^{3b}} - \frac{1}{9e^{3b}} + \frac{1}{9}\\
&=& \frac{1}{9}
\end{eqnarray*} 
using L'Hopital's Rule on the first term (the limit of each of the first
two terms is zero).  This integral {\it converges}
\item[D)]  For which values of $a$ is $\int_0^\infty e^{ax}\sin(x)\ dx$
convergent?  Evaluate the integral for those $a$. 
\item[] {\it Solution:}  The only chance here is if $a < 0$ so the 
exponential is decaying as $x \to +\infty$.  If this is true then we integrate
by parts twice to get 
$$\int e^{ax} \sin(x)\ dx = \frac{e^{ax}}{1 + a^2}(a\sin(x) - \cos(x))$$
since $a < 0$, the exponential goes to zero as $x \to \infty$ and the 
value of the integral is just the negative of the value at $x = 0$:
$$\int_0^a e^{ax}\sin(x)\ dx = \frac{1}{1 + a^2}.$$
\end{enumerate}
\vskip 10pt
\noindent
III.  The time $t$ (in minutes) between two 
successive incoming calls at a phone center is a random variable
with a pdf of the form $f(t) = \frac{1}{r} e^{-t/r}$ if $t \ge 0$ and 
$0$ otherwise.   
\begin{enumerate}
\item[(A)] Suppose that the probability that two successive calls are more 
than one minute apart is $.3$.  What is the value of $r$?
\item[] {\it Solution:}  We have 
$$.3 = \int_1^\infty \frac{1}{r}e^{-t/r}\ dt = e^{-1/r}$$
So then $-1/r = \ln(.3)$, and $r = -1/\ln(.3) \doteq .8306$.  
\item[(B)] Using the value of $r$ you determined in part A, find the 
probability that the two successive calls are at least 5 minutes apart.
\item[] {\it Solution:}  This probability is 
$$P(T > 5) \doteq \int_5^\infty \frac{1}{.8306} e^{-t/.8306}\ dt \doteq .0024$$
(that is about a $.2\%$ chance of this happening).  
\end{enumerate}
\vskip 10pt
\noindent
IV.  {\it Numerical Integration}.
\begin{enumerate} 
\item[(A)]  If you apply the Trapezoidal Rule and the Midpoint Riemann Sum Rule
with $N = 30$
to approximate $\int_1^8 x^2 e^x\ dx$, one will overestimate the actual
value and one will underestimate the actual value.  Which is which?  Also, 
how would we expect the absolute values of the errors for these methods to compare?
\item[] {\it Solution:}  Because $y'' = (x^2 + 4x + 2)e^x > 0$ for all $x > 0$, 
the graph $y = x^2 e^x$ is concave up for all $x > 0$.  This means that the 
Trapezoidal Rule will give an \emph{overestimate} and the Midpoint Rule
will give an \emph{undererestimate}.  
\item[(B)]  How big would you need to take $N$ to get a Midpoint Riemann Sum
approximation to $\int_0^1 \sin(x)\ dx$ accurate to 5 decimal places.  (Hint:  You want
the error bound $< .000005$.)
\item[] {\it Solution:}  The second derivative of $\sin(x)$ is $-\sin(x)$ again.
So a cheap estimate for the $K_2$ in the Midpoint Rule error bound is 
$$K_2 = 1 \ge |-\sin(x)|$$
for all $x$.  Then 
$$\frac{(1 - 0)^3}{24 N^2} < .000005 \Leftrightarrow N > \sqrt{\frac{1}{24\cdot .000005}} = 91.29.$$
So any $N \ge 92$ will be sufficient.  (Actually somewhat smaller $N$ would 
work too, since $|-\sin(x)|$ does not get as large as $1$ on the interval [0,1].
A smaller value of $K_2$ could also be used:  $K_2 = \sin(1) \doteq .8415$, and 
that would reduce $N$ accordingly.)  
\end{enumerate}
\vskip 10pt
\noindent
V.  {\it Differential Equations}.
\begin{enumerate}
\item[(A)]  Verify that for any constant $C$, the function $y = \sqrt{C + x^2}$
is a solution of the differential equation $\displaystyle y\frac{dy}{dx} - x = 0$.  Which 
of these solutions also satisfies the initial condition $y(0) = 5$?
\item[] {\it Solution:}  Computing the derivative with the Chain Rule:
$$y\frac{dy}{dx} = \sqrt{C + x^2}\cdot \frac{2x}{2\sqrt{C+x^2}} = x$$
Therefore $y = \sqrt{C + x^2}$ is a solution.
\item[(B)]  For which real $a$ is $y = \sin(ax)$ a solution of the differential equation 
$\frac{d^4 y}{dx^4} - 16y = 0$?
\item[] {\it Solution:}  if $y = \sin(ax)$, then $\frac{d^4y}{dx^4} = a^4\sin(ax)$.
So $\frac{d^4 y}{dx^4} - 16y = 0$ if and only if $a^4 = 16$, so $a = \pm 2$.  
\item[(C)]  Find the general solution of 
$$\sqrt{1 - x^2}\frac{dy}{dx} = y^2 + 2y$$
\item[] {\it Solution:}  This is a separable equation:
$$\frac{dy}{y(y + 2)} = \frac{1}{\sqrt{1 - x^2}}\ dx$$
Integrate with partial fractions on the left:
$$\frac{1}{y(y+2)} = \frac{A}{y} + \frac{B}{y+2}$$
when $A = \frac{1}{2}$ and $B = -\frac{1}{2}$.  So
\begin{eqnarray*}
\int \frac{1/2}{y} - \frac{1/2}{y+2}\ dy &=& \int \frac{1}{\sqrt{1 - x^2}}\ dx\\
\frac{1}{2}\ln|y| - \frac{1}{2}\ln|y+2| &=& \sin^{-1}(x) + C\\
\ln\left|\frac{y}{y+2}\right| &=& 2\sin^{-1}(x) + C'\qquad (C' = 2C)\\
y &=& \frac{2 a e^{2 \sin^{-1}(x)}}{1 - a e^{2 \sin^{-1}(x)}}.
\end{eqnarray*}
where $a = \pm e^{C'}$.
\item[(C)]  Find the general solution of 
$$\frac{dy}{dx} = xe^{x+y}$$
\item[] {\it Solution:}  This is also separable:
$$\int e^{-y}\ dy = \int x e^x\ dx.$$
On the right integrate by parts with $u = x$ $dv = e^x\ dx$.  So 
$$-e^{-y} = x e^x - e^x + C$$
Then 
$$y = -\ln(-xe^x + e^x + C)$$
(I have written the arbitrary constant as $C$ again; in the final version,
the constant is the negative of the one in the line before.)
\item[(D)]  A baked potato is taken out of the oven at a temperature of $140^\circ$ C
and left to cool on a counter in a room maintained at $20^\circ$ C.  
After 2 minutes the temperature of the 
potato has decreased to $100^\circ$ C.  How long will it take for the temperature
to reach $80^\circ$ C?
\item[] {\it Solution:}  The relevant differential equation is the one from 
Newton's Law of Cooling.  The initial condition
comes from thinking of the time when the potato comes out of the oven
as $t = 0$.  Letting $T$ be the temperature of the potato in 
degrees C, $t$ be time in minutes:
\begin{eqnarray*}
\frac{dT}{dt} &=& k(T - 20)\\
T(0) &=& 140
\end{eqnarray*}
The solution is 
$$T(t) = 20 + 120 e^{kt}$$
(with $k < 0$).  We are given $T(2) = 100$. So 
$$100 = 20 + 120 e^{2k}$$
and $k = \frac{1}{2}\ln(2/3) \doteq -.20273$.  Then we want to solve
for $t$ in the equation from the time when $T = 80$: 
$$80 = 20 + 120e^{(-.20273)t}$$
which shows 
$$t = \frac{\ln(1/2)}{-.20273} \doteq 3.42$$
It will take a total of $3.42$ minutes (equivalently, another $1.42$ minutes
after the time when $T = 100$).  
\item[(E)]  Sunset Lake is stocked with 2000 rainbow trout.  After 2 years
the trout population has grown to 4500.  Assuming logistic growth with
a carrying capacity of 10000 trout, find the growth constant $k$ and determine
when the population will reach 5000.
\item[] {\it Solution:} Let $y$ be the trout population as a function of 
time $t$ in years.  We are given that the growth is logistic, which means
that 
$$\frac{dy}{dt} = ky\left(1 - \frac{y}{10000}\right)$$
for some $k$.  We also know the general solution will look like this:
$$y = \frac{10000}{1 + a e^{-kt}}$$
Take $t = 0$ to be the time when the lake is stocked, so $y(0) = 2000$.  (We need
to assume there were no trout there before.)  Then 
$$2000 = \frac{10000}{1 + a} \Rightarrow a = 4.$$
Next at $t = 2$ we have
\begin{eqnarray*}
4500 &=& \frac{10000}{1 + 4e^{-2k}}\\  
1 + 4e^{-2k} &=& \frac{10000}{4500} \doteq 2.222\\
k  &\doteq& -\frac{1}{2}\ln(1.222/4) \doteq .5929
\end{eqnarray*}
The population will reach $5000$ when
$$5000 = \frac{10000}{1 + 4 e^{-(.5929)t}}.$$
Solving for $t$:
$$t = \frac{\ln(1/4)}{-.5929} \doteq 2.3$$
years.  That is, in another $0.3$ years after $t = 2$.  
\item[(F)]  Find the general solution of 
$$\frac{dy}{dx} + xy = x$$
\item[] {\it Solution:}  This one is first order linear.  The integrating
factor is $e^{\int x\ dx} = e^{x^2/2}$.  Then the general solution is
$$y = C e^{-x^2/2} + e^{-x^2/2} \int e^{x^2/2} x\ dx$$
By a $u$-substition, $\int e^{x^2/2} x\ dx = e^{x^2/2}$, so the general
solution simplifies to
$$y = C e^{-x^2/2} + 1.$$
\end{enumerate}
\end{document}
