% TEMPLATE FOR STANDARD EXAM
% (with some sample problem types)
% by laura


\documentclass[11pt]{article}
\usepackage{tikz}
\usepackage{amsmath}
%\usepackage{xypic}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{changepage}
\usepackage{textcomp}

\usepackage{framed}
\usepackage{ifthen}
\newsavebox{\zerobox}
\newenvironment{nospace}
  {\par\edef\theprevdepth{\the\prevdepth}\nointerlineskip
   \setbox\zerobox=\vtop to 0pt\bgroup
   \hrule height0pt\kern\dimexpr\baselineskip-\topskip\relax\begin{framed}
}
  {\end{framed}\par\vss\egroup\ht\zerobox=0pt \wd\zerobox=0pt \dp\zerobox=0pt
   \box\zerobox}
\newboolean{solutions}
\setboolean{solutions}{false}

\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
\cfoot{\thepage\ of \pageref{LastPage}}
\rhead{\hspace{2in}{Name: } $\underline{\hspace{1.7in}}_{\mbox{}}$}

\oddsidemargin=0.5in
\evensidemargin=0.5in
\textwidth=6.3in
\headwidth=6.3in
\topmargin=-.5in
\textheight=9in
\marginparwidth=0pt

\parindent=0in
%\pagestyle{empty}

% Create the problem number counter.  Initialize to zero.
\newcounter{problemnum}

% Specify that problems should be labeled with arabic numerals.
\renewcommand{\theproblemnum}{\arabic{problemnum}}

% Create the part-within-a-problem counter, "within" the problem counter.
% This counter resets to zero automatically every time the PROBLEMNUM counter
% is incremented.
\newcounter{partnum}[problemnum]

% Specify that parts should be labeled with lowercase letters.
\renewcommand{\thepartnum}{\alph{partnum}}

\newenvironment{problem}{
% STATEMENTS TO BE EXECUTED WHEN A NEW PROBLEM IS BEGUN:
%
% Increment the problem number counter, and set the current \ref value to that
% number.
\refstepcounter{problemnum}
%
% Add some vspace to separate from the last problem.
\vspace{0.15in} \par
%
%
% Now put in the "announcement" on the page.
{\Large \bf \theproblemnum. \normalsize %({\it \arabic{curprobpts}
%{point\null\ifnum \value{curprobpts} = 1\else s\fi}\/)
}
}{
% STATEMENTS TO BE EXECUTED WHEN AN OLD PROBLEM IS ENDED:
%
% If no parts to problem, then increment TOTALPOINTS and PAGEPOINTS for the
% entire problem at once.

}


\newenvironment{mproblem}[1]{
% STATEMENTS TO BE EXECUTED WHEN A NEW PROBLEM IS BEGUN:
%
% Increment the problem number counter, and set the current \ref value to that
% number.
\refstepcounter{problemnum}
%
% Add some vspace to separate from the last problem.
\vspace{0.15in} \par
%
%
% Now put in the "announcement" on the page.
\begin{adjustwidth}{1.05in}{0pt}
{\hspace{-1.05in}$\underline{\hspace{0.2in}
\ifthenelse{\boolean{solutions}}{\texttt{#1}}{}
\hspace{0.2in}}_{\mbox{}}$\hspace{0.2in}\Large \bf \theproblemnum. }
}{
% STATEMENTS TO BE EXECUTED WHEN AN OLD PROBLEM IS ENDED:
%
% If no parts to problem, then increment TOTALPOINTS and PAGEPOINTS for the
% entire problem at once.
\end{adjustwidth}
}

\begin{document}

%\Large
% ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
%                             COVER
% ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo 
%\Large

\thispagestyle{empty}
\centerline{\huge \bf MIDTERM 1}        %%%(number of test)
\vfill \vfill
   
Math 103                               %%%(class number and section) 

9/24/2014 \hfill                             %%%(date of test)
{\bf Name: } $\underline{\hspace{2.7in}}_{\mbox{}}$
\vfill
\hfill {\bf ID: } $\underline{\hspace{2.7in}}_{\mbox{}}$
\vfill \vfill \vfill
``My signature below certifies that I have complied with the University of Pennsylvania's Code of Academic Integrity in completing this''\\

\hfill{\bf Signature: } $\underline{\hspace{2.7in}}_{\mbox{}}$
\vfill \vfill \vfill

{\bf Read all of the following information before starting the exam:}
\vspace{1pc}

\begin{itemize}                        %%%(change info. as desired)
\item Check your exam to make sure all \pageref{LastPage} pages are present.
\item The exam questions are not in a particular order.  If you get stuck, move on to the next problem.
%\item You do not need to simplify answers.  For example, $e^2\sin 3+\frac{2}{4}$ is a perfectly acceptable form for an answer.
\item You may use writing implements and a single handwritten sheet of 8.5''x11'' paper.
\item DNE means ``does not exist''.
\item NO CALCULATORS.
\item  You MUST show some work to receive credit.  Even if you choose the correct answer, you will not receive credit if I don't see how you arrived at your answer.
    
%\item  Circle or otherwise indicate your final answers.
  
\item  Good luck!
\end{itemize}

\begin{table}[h] 
\begin{center}
\addtolength{\tabcolsep}{4mm}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|r|r|c|r|r|}
\hline
1 & 8  & &7 & 8&\\
\hline
2 & 8 & & 8 & 8&\\
\hline
3 & 8 & & 9 & 8& \\
\hline
4 & 8 & &10&8&\\
\hline
5 & 8 & &11&10&\\
\hline
6 & 8 & &12&10&\\
\hline
Total & 100 &\multicolumn{4}{|c|}{} \\
\hline
\end{tabular}
\end{center}
\end{table}

\vfill \vfill \vfill

\clearpage


\begin{mproblem}{f}
Find $\lim_{x\rightarrow 2}\frac{16x}{(2-x)^3}$\\
  \begin{tabular}{p{1in}p{3.5in}}
    a. $0$  & e. $16$ \\
    b. $1$ & f. DNE because the one-sided limits are different\\
    c. $4$ & g. DNE because it approaches $+\infty$\\
    d. $8$  & h. DNE because it approaches $-\infty$\\
  \end{tabular}
\end{mproblem}
\ifthenelse{\boolean{solutions}}{
}{}
\vfill




\begin{mproblem}{b}
What is $\lim_{x\rightarrow 0}\frac{\cos x-1-x}{x}$?
\\
  \begin{tabular}{p{2in}p{2.5in}}
    a. $-\pi$  & e. $1/2$\\
    b. $-1$ & f. $1$\\
    c. $-1/2$ & g. $\pi$\\
    d. $0$  & h. DNE because the one-sided limits disagree\\
  \end{tabular}
\end{mproblem}
\ifthenelse{\boolean{solutions}}{
  \begin{nospace}
  \end{nospace}
}{}
\vfill

\pagebreak


\begin{mproblem}{d}
Find $\displaystyle{\lim_{x\rightarrow\infty}\frac{x+\sqrt{x}}{\sqrt{4x^2+1}+x}}$.\\
  \begin{tabular}{p{1in}p{2.5in}}
    a. $-1$  & e. $1/2$ \\
    b. $-1/2$ & f. $1$\\
    c. $-1/3$ & g. DNE because it approaches $+\infty$\\
    d. $1/3$  & h. DNE because it approaches $-\infty$\\
  \end{tabular}
\end{mproblem}
\ifthenelse{\boolean{solutions}}{
  \begin{nospace}
  \end{nospace}
}{}
\vfill

\begin{mproblem}{b}
The function
\[f(x)=\left\{\begin{array}{ll}
x^2+a&\text{if }x\leq -1\\
\cos (\pi x)&\text{if }x>-1\\
\end{array}\right.\]
is continuous everywhere.  What is $a$?
\\
  \begin{tabular}{p{1in}p{2.5in}}
    a. $0$  & e. $1$ \\
    b. $-2$ & f. $2$\\
    c. $-1$ & g. $-\pi$\\
    d. $0$  & h. $\pi$\\
  \end{tabular}
\end{mproblem}
\vfill

\pagebreak

\begin{mproblem}{b}
Find $\lim_{x\rightarrow 2}\frac{16x}{(x+2)^3}$.\\
  \begin{tabular}{p{1in}p{3.5in}}
    a. $0$  & e. $4$ \\
    b. $1/2$ & f. DNE because the one-sided limits are different\\
    c. $1$ & g. DNE because it approaches $+\infty$\\
    d. $2$  & h. DNE because it approaches $-\infty$\\
  \end{tabular}
\end{mproblem}
\vfill

\begin{mproblem}{e}
$f(x)$ is a function such that $\lim_{x\rightarrow 7}f(x)=3$.  What is $\lim_{x\rightarrow 7}\frac{\sqrt{f(x)+1}}{x-5}$?\\
  \begin{tabular}{p{1in}p{2.5in}}
    a. $-1$  & e. $1$ \\
    b. $-1/2$ & f. $2$\\
    c. $0$ & g. DNE\\
    d. $1/2$  & h. There is not enough information to determine this limit\\
  \end{tabular}
\end{mproblem}
\vfill

\pagebreak

\begin{mproblem}{b}
What is $\lim_{x\rightarrow -1^+}\frac{(x-1)(x+1)}{|x+1|}$?
\\
  \begin{tabular}{p{1in}p{2.5in}}
    a. $-2$  & e. $0$ \\
    b. $2$ & f. DNE because it approaches $+\infty$\\
    c. $-1$ & g. DNE because it approaches $-\infty$\\
    d. $1$  & h. DNE for some other reason\\
  \end{tabular}
\end{mproblem}
\vfill


\begin{mproblem}{c}
The percentage of the moon's surface visible to a person standing on Earth varies over time in a periodic way.  During a new moon, $0\%$ of the moon is visible, while during a full moon $50\%$ is visible (the whole half of the moon facing towards Earth).  It takes 29 days for the moon to go through a full cycle from one full moon to the next; the full moon happens exactly half way between consecutive new moons.  Today is exactly half-way between the previous new moon and the upcoming full moon, so $25\%$ of the moon is visible at midnight tonight (time $0$).  If we measure $t$ in days since midnight tonight, what is an function modeling the percent of the moon which is visible as a function of $t$?
\\
  \begin{tabular}{p{2in}p{2.5in}}
    a. $25\cos (\frac{2\pi}{14.5}(x-7.25))+25$  & e. $25\cos (\frac{2\pi}{14.5}(x-14.5))+25$ \\
    b. $50\cos (\frac{2\pi}{14.5}(x-7.25))+50$ & f. $50\cos (\frac{2\pi}{14.5}(x-14.5))+50$\\
    c. $25\cos (\frac{2\pi}{29}(x-7.25))+25$ & g. $25\cos (\frac{2\pi}{29}(x-14.5))+25$\\
    d. $50\cos (\frac{2\pi}{29}(x-7.25))+50$  & h. $50\cos (\frac{2\pi}{29}(x-14.5))+50$\\
  \end{tabular}
\end{mproblem}
\vfill

\pagebreak

\begin{mproblem}{c}
Consider the function $f(x)=\ln\sin x$.  What is $f^{-1}(x)$?\\
  \begin{tabular}{p{1in}p{2.5in}}
    a. $e^{\sin x}$  & e. $\ln \sin x$ \\
    b. $e^x\sin^{-1}x$ & f. $\frac{1}{\sin e^x}$\\
    c. $\sin^{-1}e^x$ & g. $\ln\sin^{-1}x$\\
    d. $e^{\sin^{-1}x}$  & h. $\sin e^x$\\
  \end{tabular}
\end{mproblem}
\vfill

\begin{mproblem}{a}
What is $\lim_{x\rightarrow 0}\frac{\frac{1}{\sqrt{4+x}}-\frac{1}{2}}{x}$?\\
  \begin{tabular}{p{1in}p{2.5in}}
    a. $-1/16$  & e. $1/16$ \\
    b. $-1/4$ & f. $1/4$\\
    c. $-1/2$ & g. $1/2$\\
    d. $-1$  & h. $1$\\
  \end{tabular}
\end{mproblem}
\vfill



\pagebreak

\begin{problem}
  Draw a graph of a function $f(x)$ so that:
  \begin{itemize}
  \item $f(x)$ is defined on $[-2,2]$,
  \item $f(x)$ is continuous on $[-2,-1)$, $(-1,1)$, and $(1,2]$,
  \item $f(x)$ has a jump discontinuity at $-1$,
  \item $\lim_{x\rightarrow 1}f(x)=-\infty$.
  \end{itemize}
\end{problem}

\vfill

\begin{problem}
Show that there is an $x$ such that $x^5-x^4+2x^3-1=0$.
\end{problem}
\vfill
\end{document}

\begin{mproblem}{}
\\
  \begin{tabular}{p{1in}p{2.5in}}
    a.   & e.  \\
    b.  & f. \\
    c.  & g. \\
    d.   & h. \\
  \end{tabular}
\end{mproblem}
\ifthenelse{\boolean{solutions}}{
  \begin{nospace}
  \end{nospace}
}{}
\vfill





Shifting/reflecting graphs
Find limits using algebraic manipulation
Find a limit using knowledge of the shape of the graph
Choose a value to make a piecewise function continuous
 

Identify where a function is continuous
Use the intermediate value theorem
Find a rational limit of a function approaching infinity
Find limits using continuity
Find limits using limit laws (probably involving arbitrary functions like f(x) or g(x))
Find a one-sided limit
Modeling using exponential functions
Modeling using trig functions
Find an inverse function
Find particular values of an inverse function (especially where it isn't possible to solve, like the last week 2 HW problem or when there's a table of values)
Draw a graph with specified domain/range/limits/continuity
Find a limit which happens to be + or -infinity
Use the limits of sin x/x or (cos x-1)/x, probably together with a limit law
