\documentclass[12pt]{exam}
\usepackage{etex}
\usepackage{mathptmx}
\usepackage{pstricks}
\usepackage{psfrag}
\usepackage{pst-plot}
\usepackage{epsfig}
\usepackage{epsf}

\usepackage{graphicx,wrapfig,floatflt}
\usepackage{graphics}

%% Jonah's Stuff %%
\usepackage{tikz}
\usetikzlibrary{snakes}

\tikzstyle{printersafe}=[snake=snake,segment amplitude=0 pt]
\newcommand{\graphgrid}[6]{
\foreach \x in {#1,...,#2}{
\draw (\x+.2,.2) node {\scriptsize \x};
\draw [line width=1pt,densely dotted,printersafe] (\x,#3-.2) -- (\x,#4+.2);}
\foreach \y in {#3,...,#4}{
\draw (.2,\y+.2) node {\scriptsize \y};
\draw [line width=1pt,densely dotted,printersafe] (#1-.2,\y) -- (#2+.2,\y);}
\draw[<->, line width=2 pt] (#1-.6,0) -- (#2+.7,0) node[right] {#5};
\draw[<->, line width=2 pt] (0,#3-.6) -- (0,#4+.6) node[above] {#6};
}
%%%%%%%%%%%%%%%%%%%%

\setlength{\topmargin}{-0.6in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\evensidemargin}{-0.25in}
\pretolerance=4000
\parindent = 0in
\textwidth = 7in
\textheight = 10in
\headheight=10pt
\setlength{\headsep}{15pt}
\coverheader{\textbf{Math 125}}{\textbf{Final Examination}}
  {\textbf{Winter 2016}}
\headrule
\header{\textbf{Math 125, Winter 2016}}
 {\textbf{Final Examination}}
 {\emph{Page \thepage~of \numpages}}
\pagestyle{head}
\newcommand{\ds}{\displaystyle}
\newcommand{\blankbox}[2]{\fbox{\rule{#1}{0in}\rule{0in}{#2}}}

%\input epsf
%\newdimen\epsfxsize

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                 %
%            BEGIN DOCUMENT, COVER PAGE           %
%                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\printanswers

\addpoints

\begin{coverpages}

\begin{tabular}{l@{\hspace{1in}}l}
Your Name & Your Signature\\
\blankbox{2.9in}{.45in} & \blankbox{2.9in}{.45in}
\\[.2in]
Student ID \# & \hfill Quiz Section\\
\blankbox{.33in}{.33in}%
\blankbox{.33in}{.33in}%
\blankbox{.33in}{.33in}%
\blankbox{.33in}{.33in}%
\blankbox{.33in}{.33in}%
\blankbox{.33in}{.33in}%
\blankbox{.33in}{.33in}
&
\hfill \blankbox{.33in}{.33in}\blankbox{.33in}{.33in}
\\[.2in]
Professor's Name & TA's Name\\
\blankbox{2.9in}{.45in} & \blankbox{2.9in}{.45in}
\end{tabular}

\begin{itemize}
\item
Turn off all cell phones, pagers, radios, mp3 players, and other
similar devices.
\item
This exam is closed book. You may use one $8.5''\times11''$ sheet
of handwritten notes (both sides OK).\\
Do not share notes.  No photocopied materials are allowed.
%% \item
%% Give your answers in exact form
%% (for example $\ds\frac{\pi}{3}$ or $5\sqrt{3}$),
%% except as noted in particular problems.
\item
You can use only the Texas Instruments TI-30X IIS calculator.
\item
In order to receive credit, you must \textbf{show all of your work}.
If you do not indicate the way in which you solved a problem, you may
get little or no credit for it, even if your answer is correct.
\item
Give all answers in EXACT form (like $\pi/4$ or $1+\sqrt{2}\;$) unless explicitly given directions otherwise.
\item
You may use any of the 20 integrals in the table on p.\ 495 of the text without deriving them.
\textbf{Show your work in evaluating any other integrals, even if they
are on your note sheet}.
\item
Place \fbox{a box around your answer} to each question.
\item
If you need more room, use the backs of the pages and indicate that
you have done so.
\item
Raise your hand if you have a question.
\item
This exam has \numpages{} pages, plus this cover sheet.  Please make
sure that your exam is complete.
\end{itemize}

{ %% begin score table
\renewcommand{\baselinestretch}{1.8}
\setlength{\tabcolsep}{.2in}
\normalsize
\begin{tabular}{cc}

\setlength{\tabcolsep}{.2in}
\begin{tabular}[t]{|c|c|c|}
\hline
Question & Points & \parbox{0.8in}{\hfil Score\hfil} \\
\hline
1 & \pointsofquestion{1} & \\
\hline
2 & \pointsofquestion{2} & \\
\hline
3 & \pointsofquestion{3} & \\
\hline
4 & \pointsofquestion{4} & \\
\hline
5 & \pointsofquestion{5} & \\
\hline
\end{tabular}

&

\setlength{\tabcolsep}{.2in}
\begin{tabular}[t]{|c|c|c|}
\hline
Question & Points & \parbox{0.8in}{\hfil Score\hfil} \\
\hline
6 & \pointsofquestion{6} & \\
\hline
7 & \pointsofquestion{7} & \\
\hline
8 & \pointsofquestion{8} & \\
\hline
9 & \pointsofquestion{9} & \\
\hline
10 & \pointsofquestion{10} & \\
\hline
\hline
Total & \numpoints & \\
\hline
\end{tabular}

\end{tabular}
} %% end score table

\end{coverpages}

\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                 %
%                 START OF PROBLEMS               %
%                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{questions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question Evaluate the following indefinite integrals.

\begin{parts}

\part[5]
$\ds \int \sin(x)\, \sqrt{\cos(x)} \; dx$
\vfill

\part[5]% Trig Substitution  (Stewart:  7.5  #33)
$\ds \int  \sqrt{3-2x-x^2}\; dx$
\vfill

\end{parts}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question Evaluate the following definite integrals.

\begin{parts}

\part[5]
$\ds \int_0^{\pi} \sec\left(\frac{x}{3}\right) \;\tan^3\left(\frac{x}{3}\right) \; dx$
\vfill

\part[5]
$\ds \int_{-1}^2 \; \frac{x}{x^2+2x+10} \; dx$
\vfill

\end{parts}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{floatingfigure}[r]{2.8in}
\vspace{-13ex}
\includegraphics[width=2.5in]{fig-Tom-1a.eps}
\end{floatingfigure}
\parbox[t]{3.8in}{\question[10] Consider the region in the $xy$-plane formed by a rectangle of height $4$ and width $3$ and a half-disk of radius $2$ centered at
$(3,0)$, as shown in the figure.

Compute $\overline{x}$, the $x$-component of  the centroid of the region.}


\vfill

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question
\begin{parts}
\part[5] Does the improper integral\quad $\ds\int_1^{2}\frac{1}{\sqrt{x-1}}\;dx$\quad converge? If yes, to what?
\vfill

\part[5] Does the improper integral\quad $\ds\int_2^{\infty}\frac{1}{\sqrt{x-1}}\;dx$\quad converge? If yes, to what?
\end{parts}
\vfill

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{floatingfigure}[r]{2.3in}
\vspace{-26ex}
\includegraphics[width=2.3in]{fig-Tom-2a.eps}
\end{floatingfigure}
\parbox[t]{4.3in}{\question[10]A spherical tank of radius $R$ meters  is resting on the ground; so
its center is located $R$
meters above ground level (see figure).
The tank is initially empty, and water is pumped from ground level
into the tank until the tank is half full. Find the work (in Joules) required to
do this. 

Note: Water has a mass density of $1000$ kilograms per cubic
meter and the acceleration due to gravity is $9.8 {\rm\ meters/sec}^2$.}

\vfill


\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question

Consider the curve $\ds y = 2x^{5/2}$.


\begin{parts}

\part[4]
Set up a definite integral for the arc length of this curve from $x=1$ to $x=4$. \\ {\it DO NOT EVALUATE THE INTEGRAL.}
\vfill

\part[6]
Use the Trapezoid Rule with $n=4$ subintervals to estimate the integral in part (a).\\Leave your answer in exact form. 
\vfill\vfill

\end{parts}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question

% Volumes of Solids of Revolution - including Area .  Based on Steward Chapter 7 review #75 & 76
Consider the region $\mathcal{R}$ above the $x$-axis and under the curve 
\[
y = \sin^2 x \qquad \mbox{for} \qquad 0\leq x \leq \pi/2.
\]

\begin{parts}

\part[4]
Find the area of this region $\mathcal{R}$.
\vfill\vfill


\part[6]
The region $\mathcal{R}$ is rotated about the $y$-axis.  Find the volume of the resulting solid.
\vfill\vfill\vfill

\end{parts}


\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question
The graph of $f(x)$ is shown below. Use it to answer the following questions.

\begin{center}
\begin{tikzpicture}[auto,scale=.9, line width=2pt]

\graphgrid{-1}{11}{-1}{6}{$x$}{$f(x)$}

\draw plot[smooth, tension=.9] coordinates{(0,3) (1,2) (2,5) (3,2.5)};
\draw (3,2.5) -- (6,1) arc (180:0:2);

\draw[line width=1 pt, fill=black] (0,3) circle (.1);
\draw[line width=1 pt, fill=black] (10,1) circle (.1);
\end{tikzpicture}
\end{center}

\begin{parts}

\part[4] Compute the average value of $f(x)$ on the interval $[4,10]$.
\vfill
\part[6] Let $g(x) = \displaystyle\int_{x^2}^{7} f(t)\,dt$. Calculate $g''(2)$.
\vfill\vfill
\end{parts}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\question[10]
Find the solution of the initial value problem

\[ \frac{dy}{dx} = \frac{x \cos(x^2)}{y},\quad y(0)=-3.\]

Give your answer in the form $y=f(x)$.
\vfill

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%(Differential equations word problem)
\question[10] Among the 30 thousand students of the University of Washington, the rate of the spread of the app {\it Sbreak} is proportional to the product of the number of students P (in thousands) who have the app on their phones and the number of students $30-P$ who do not (again in thousands). That is,
\[
\frac{dP}{dt}=kP(30-P)
\]
where $k$ is a positive proportionality constant, $P$ is in thousand of students and $t$ is in hours. 

Initially, one thousand students have the app on their phones. In 4 hours, 5 thousand students have the app on their phones. According to this model, when will half of the students have the app on their phones?
\vfill


\end{questions}

\end{document}
