\documentclass[12pt]{report} 

\usepackage{palatino}
\usepackage{epsfig}
\usepackage[margin=0.8in]{geometry}

\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{patterns,arrows,snakes}

\pagestyle{empty} %%% this results in no pagenumbers (footer is empty}

\setlength{\parindent}{0in}
\setlength{\parskip}{0.05in}

\baselineskip=20pt

\tikzstyle{printersafe}=[snake=snake,segment amplitude=0 pt]

\newcommand{\textbox}[1]{
\raisebox{-.06 in}{\begin{tikzpicture}
\node [draw] at (0,0) {#1};
\end{tikzpicture}}\!
}

\newcommand{\dsps}{\displaystyle}
\newcommand{\pp}{\par \noindent}
\newcommand{\newp}{\vfil \eject}

\begin{document}
\noindent
\vfil \noindent

{\LARGE{
\hfil Math 120 C - Autumn 2017 \hfil \pp
\hfil Midterm Exam Number Two\hfil  \pp
\hfil November 16th, 2017 \hfil \pp
}}

\normalsize
\vfil
\medskip
\hfil Name: \hrulefill \hrulefill \hspace{0.5in} Student ID no. : \hrulefill

\vfil

\hfil Signature: \hrulefill \hrulefill \hrulefill \hspace{0.5in} Section: \hrulefill 
 
\vfil
\begin{center}
{\Huge
\begin{tabular}{||c|c|r||} \hline 
 1 & 15 &\hspace{10mm} \hfil\\ \hline 
 2 & 15 &       \\ \hline
 3 & 15 &       \\ \hline
 4 & 15 &      \\ \hline
Total & 60 & \\ \hline 
\end{tabular}
}
\end{center}
\vfil
\begin{itemize}
\item This exam consists of FOUR problems on FIVE pages, including this cover sheet.
\item Show all work for full credit. 
\item You may use a TI-30X IIS calculator during this
exam.  Other calculators and electronic device are not permitted.
\item You do not need to simplify your answers.
\item If you use a trial-and-error or guess-and-check method
when a more rigorous method is available, you will not receive full credit.
\item If you write on the back of the page, please indicate that you have done so!
\item \textbox{Draw a box} around your final answer to each problem.
\item You may use one hand-written double-sided 8.5" by 11" page of notes.
\item You have 50 minutes to complete the exam.
\end{itemize}

\vfil
{\small --}

\newpage

\begin{enumerate}

% Other stuff
\item {\bf [5 points per part]} Hey, check out this awesome graph!

\vspace{-.2 in}

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

\foreach \x in {-3,-2,...,5} \draw [printersafe, line width=1pt,densely dotted] (\x,-3.2)--(\x,4.2);
\foreach \x in {-3,-2,...,5} \draw (\x+.2,.19) node {\scriptsize \x};
\foreach \y in {-3,-2,...,4} \draw [printersafe, line width=1pt,densely dotted] (-3.2,\y)--(5.2,\y);
\foreach \y in {-3,-2,...,4} \draw (.2,\y+.19) node {\scriptsize \y};

\draw [line width = 1.5 pt, <->] (-3.6,0) -- (5.5,0);
\draw [line width = 1.5 pt, <->] (0,-3.6) -- (0,4.6);

\draw (5.7,0) node {$x$};
\draw (0,4.9) node {$f(x)$};

\draw plot[smooth,tension=.5] coordinates{(-3,-3) (-2,-2) (-1,2)};
\draw plot[smooth,tension=.5] coordinates{(1,3) (2,0) (3,-1)};
\draw (-1,2) -- (1,3) (3,-1) -- (5,4);

\fill[black] (-3,-3) circle (.15);
\fill[black] (5,4) circle (.15);
\end{tikzpicture}
\end{center}

Use the graph to answer the following questions.

\begin{enumerate}
\item Find $f(f(f(f(f(f(f(f(f(f(-2))))))))))$. Explain, briefly.
\vskip 1 in
\item Oh no, $f$ isn't one-to-one!

Please break its domain into three intervals so that $f$ is one-to-one on each piece.
\vskip 1 in
\item Take the graph of $y=f(x)$. Shift it 3 units to the right, then scale it vertically by a factor of 2, then shift it 5 units down. Let the result be $y=g(x)$.

Find $g(0)$.
\end{enumerate}

\newpage

% Optimization
\item {\bf [15 points]} I have \$$4000$ with which I'd like to build a fence in the shape of a sector, with two internal partitions each running from the arc to the opposite corner, as shown below.\\[.1 in]
The outside fence costs \$$5$ per foot, and the partitions cost \$$3$ per foot.\\[.1 in]
What is the {\bf maximum possible total area} inside the fence?
\vspace{-.8 in}
\begin{flushright}
\begin{tikzpicture}[rotate=80]
\draw [very thick] (0,0) -- (0:4) arc (0:84:4) -- cycle;
\draw [thick, dash pattern = on 5 pt off 2 pt,printersafe] (0,0) -- (28:4) (0,0) -- (56:4);
\end{tikzpicture}
\end{flushright}

\newpage

% Linear-to-linear
\item Here are some facts about $f(x)$, a linear-to-linear rational function:
\begin{itemize}
\item The domain of $f$ is $(-\infty,2) \cup (2,\infty)$.
\item The graph $y=f(x)$ has a $y$-intercept of $5$.
\item $f(10) = 3$.
\end{itemize}
\begin{enumerate}
\item {\bf [8 points]} Write a formula for $f(x)$.
\vskip 5 in
\item {\bf [7 points]} Write a formula for $f^{-1}(x)$.
\end{enumerate}

\newpage

% Exponential
\item {\bf [5 points per part]}

Some bad things happened to the moon, and now it's in several pieces. The number of pieces is an exponential function of time.\\[.1 in]
Right now, there are $7$ pieces.\\[.1 in]
In five months, there will be $130$ pieces.
\begin{enumerate}
\item Write a function $f(t)$ for the number of pieces $t$ months from now.
\vskip 2.1 in
\item When will there be $1$ million pieces?
\vskip 2.1 in
\item The mass of the whole moon is $73$ yottagrams.\\[.1 in]
Write a function $g(t)$ for the average mass of each piece, $t$ years from now.\\[.1 in]
{\bf Write your answer in standard exponential form.}\\[.1 in]
{\small (Leave your answer in yottagrams. Don't worry about what a yottagram is.)}
\end{enumerate}


\end{enumerate}

\end{document}