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


\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,decorations,decorations.pathmorphing}
\usetikzlibrary{patterns}
\usepackage{amsmath}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{changepage}
\usepackage{ifthen}
\usepackage{environ}
\usepackage{pgfplots}
\newboolean{solutions}
\setboolean{solutions}{true}


\NewEnviron{solution}{
\ifthenelse{\boolean{solutions}}{
\texttt{\BODY}
}{}
}

\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}
}


\pgfplotsset{
    integral segments/.code={\pgfmathsetmacro\integralsegments{#1}},
    integral segments=3,
    integral samples/.code={\edef\integralsamples{#1}},
    integral samples = 10,
    integral min/.style args={#1:#2}{
        ybar interval,
        domain=#1:#2,
        samples=\integralsegments+1,
        x filter/.code={
                               \edef\lastx{\pgfmathresult}
                                \pgfmathresult
                              },%
        y filter/.code={%
                            \pgfmathparse{f(\lastx)}%
                            %\edef\tempb{\pgfmathresult}%
                            %\foreach \x in {0,1,...,\integralsamples}%
                            %   {%
                            %    \pgfmathparse{f(\lastx+\x*\tempstep)}%
                            %     \xdef\tempb{\tempb,\pgfmathresult}%
                            %     }%
                            %   %\pgfmathmin{\tempb}{\tempb}
                             },
    },
    integral max/.style args={#1:#2}{
        ybar interval,
        domain=#1:#2,
        samples=\integralsegments+1,
        x filter/.code={
                               \edef\lastx{\pgfmathresult}
                                \pgfmathresult
                              },%
        y filter/.code={%
                          \pgfmathparse{((#2-#1)/(\integralsegments))}%
                           \edef\tempstep{\pgfmathresult}%
                            \pgfmathparse{f(\lastx+\tempstep)}%
                            % \edef\tempb{\pgfmathresult}%
                            % \foreach \x in {0,1,...,\integralsamples}%
                            %    {%
                            %     \pgfmathparse{f(\lastx+\x*\tempstep)}%
                            %      \xdef\tempb{\tempb,\pgfmathresult}%
                            %      }%
                               %\pgfmathmax{\tempb}{\tempb}
                             },
    },   
    integral mid/.style args={#1:#2}{
        ybar interval,
        domain=#1:#2,
        samples=\integralsegments+1,
        x filter/.code={
                               \edef\lastx{\pgfmathresult}
                                \pgfmathresult
                              },%
        y filter/.code={%
                          \pgfmathparse{((#2-#1)/(\integralsegments))}%
                           \edef\tempstep{\pgfmathresult}%
                            \pgfmathparse{f(\lastx+\tempstep/2)}%
                            % \edef\tempb{\pgfmathresult}%
                            % \foreach \x in {0,1,...,\integralsamples}%
                            %    {%
                            %     \pgfmathparse{f(\lastx+\x*\tempstep)}%
                            %      \xdef\tempb{\tempb,\pgfmathresult}%
                            %      }%
                               %\pgfmathmax{\tempb}{\tempb}
                             },
    },   
}
\makeatletter
%see http://tex.stackexchange.com/questions/9722/why-am-i-getting-the-pgf-math-error-unknown-function-getargs
\def\pgfmathmax#1#2{%
%   \pgfmathparse{getargs(#1,#2)}%
     \pgfmathparse{#1,#2}%
    \expandafter\pgfmathmax@\expandafter{\pgfmathresult}%
}
\def\pgfmathmin#1#2{%
    \pgfmathparse{#1,#2}%
    \expandafter\pgfmathmin@\expandafter{\pgfmathresult}%
}
%see http://tex.stackexchange.com/questions/15435/how-do-i-use-pgfmathdeclarefunction-to-create-define-a-new-pgf-function
\makeatother


\newlength{\hatchspread}
\newlength{\hatchthickness}
\newlength{\hatchshift}
\newcommand{\hatchcolor}{}
% declaring the keys in tikz
\tikzset{hatchspread/.code={\setlength{\hatchspread}{#1}},
         hatchthickness/.code={\setlength{\hatchthickness}{#1}},
         hatchshift/.code={\setlength{\hatchshift}{#1}},% must be >= 0
         hatchcolor/.code={\renewcommand{\hatchcolor}{#1}}}
% setting the default values
\tikzset{hatchspread=3pt,
         hatchthickness=0.4pt,
         hatchshift=0pt,% must be >= 0
         hatchcolor=black}
% declaring the pattern
\pgfdeclarepatternformonly[\hatchspread,\hatchthickness,\hatchshift,\hatchcolor]% variables
   {custom north west lines}% name
   {\pgfqpoint{\dimexpr-2\hatchthickness}{\dimexpr-2\hatchthickness}}% lower left corner
   {\pgfqpoint{\dimexpr\hatchspread+2\hatchthickness}{\dimexpr\hatchspread+2\hatchthickness}}% upper right corner
   {\pgfqpoint{\dimexpr\hatchspread}{\dimexpr\hatchspread}}% tile size
   {% shape description
    \pgfsetlinewidth{\hatchthickness}
    \pgfpathmoveto{\pgfqpoint{0pt}{\dimexpr\hatchspread+\hatchshift}}
    \pgfpathlineto{\pgfqpoint{\dimexpr\hatchspread+0.15pt+\hatchshift}{-0.15pt}}
    \ifdim \hatchshift > 0pt
      \pgfpathmoveto{\pgfqpoint{0pt}{\hatchshift}}
      \pgfpathlineto{\pgfqpoint{\dimexpr0.15pt+\hatchshift}{-0.15pt}}
    \fi
    \pgfsetstrokecolor{\hatchcolor}
%    \pgfsetdash{{1pt}{1pt}}{0pt}% dashing cannot work correctly in all situation this way
    \pgfusepath{stroke}
   }


\begin{document}

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

% \begin{enumerate}
% \item Ability to calculate complex derivatives (double chain rule, mixed products and chains, quotients, etc.)
% \item Ability to calculate derivatives with unknowns (like $[g(\ln x)]'$)
% \item Knowing basic derivatives: exp, ln, trig, inverse trig
% \item Some sentence parsing in terms of blah is the derivative of blah, or translating between tangent lines and functions
% \item Coping with various notions
% \item Reading derivative values from a chart
% \item Using def of a derivative
% \item Fill in a value to make a function differentiable
% \item Implicit derivatives
% \item Multiple derivatives
% \item Using derivatives to approximate/tangent lines
% \item Derivatives of inverses
% \item Identifying differentiability
% \item Logarithmic differentiation
% \item Related rates
% \end{enumerate}

% \clearpage

\begin{problem}
  A rectangular field adjacent to a river is to be enclosed.  Fencing along the river costs \$5 per food but fencing along the other three sides costs only \$3 per foot.  The area of the field is to be 4800 square feet.  What are the dimensions of the cheapest possible rectangle field with the right size?  (Be sure to check that you have found a minimum and not a maximum!)
\end{problem}
\begin{solution}
  $60$ feet along the river and $80$ on the opposite side.
\end{solution}

\begin{problem}
  Find all critical points of $\frac{x^2+4}{x}$.  Identify which are local minima and which are local maxima.
\end{problem}
\begin{solution}
  The critical points are $\pm 2$.  ($0$ is not a critical point because the original function is undefined there.)  $2$ is a local min and $-2$ is a local max.
\end{solution}

\begin{mproblem}{c}
  What are the global minimum and maximum values of $f(x)=\frac{x}{1+x^2}$.  (This should be the largest and smallest values $f(x)$ can ever have, not the the $x$-values you plug in to get them.)\\
  \begin{tabular}{p{2in}p{2in}}
    a. $2$ and $-2$  & d. $2$ and $0$ \\
    b. $1$ and $-1$ & e. $4$ and $-4$\\
    c. $1/2$ and $-1/2$ & f. $\infty$ and $-\infty$\\
  \end{tabular}
\end{mproblem}

\begin{problem}
  Let $f(x)=x^3-3x+2$.

  \begin{enumerate}
  \item Where are the critical points of $f(x)$?
  \item On which intervals is $f(x)$ increasing?
  \item On which intervals is $f(x)$ concave up?
  \end{enumerate}
\end{problem}\begin{solution}
  Critical points are $x=\pm 1$.  Increasing on $(-\infty,-1)\cup(1,\infty)$, decreasing on $(-1,1)$.  Concave up on $(0,\infty)$.
\end{solution}



\begin{mproblem}{c}
Find $\lim_{x\rightarrow 0^+}x^{\sqrt{x}}$.\\
  \begin{tabular}{p{2in}p{2in}}
    a. $-1$  & e. $e$ \\
    b. $0$ & f. DNE, goes to $-\infty$\\
    c. $1$ & g. DNE, goes to $+\infty$\\
    d.  $\sqrt{e}$ & h. DNE for another reason\\
  \end{tabular}
\end{mproblem}

\begin{mproblem}{g}
Find $\lim_{x\rightarrow\infty}x^{-2}e^{x}$.\\
  \begin{tabular}{p{2in}p{2in}}
    a.  $0$ & e.  $e$\\
    b. $1$ & f. DNE, goes to $-\infty$\\
    c. $-1$ & g. DNE, goes to $\infty$\\
    d. $-e$ & h. DNE for another reason\\
  \end{tabular}
\end{mproblem}

\begin{mproblem}{g}
Find $\lim_{x\rightarrow 0}(2-e^x)^{1/x}$.\\
  \begin{tabular}{p{2in}p{2in}}
    a. $-e$  & e. $e$ \\
    b. $-1$ & f. $1$\\
    c. $-1/e$ & g. $1/e$\\
    d. DNE, goes to $-\infty$ & h. DNE, goes to $+\infty$\\
  \end{tabular}
\end{mproblem}

\begin{mproblem}{e}
Find $\lim_{x\rightarrow 0}\frac{2(x+1)}{e^x}$.\\
  \begin{tabular}{p{2in}p{2in}}
    a. $-2$  & e. $2$ \\
    b. $-1$ & f. $1$\\
    c. $-1/e$ & g. $1/e$\\
    d. DNE, goes to $-\infty$ & h. DNE, goes to $+\infty$\\
  \end{tabular}
\end{mproblem}

\begin{mproblem}{h}
This picture shows an estimate of $\int_{0}^2 e^{-x^2}\, dx$ using 14 rectangles.  When $k$ is an integer between $1$ and $14$, what is the area of the $k$-th rectangle?

   \begin{tikzpicture}
\pgfset{declare function={f(\x)=exp(-x*x);}}
   \begin{axis}[width=240, height =200, xmax=2, ymax=1, xmin=0, ymin=0, xlabel=$x$, ylabel=$-e^{x^2}$, axis x line = middle, axis y line=middle]
 \addplot[smooth,samples=1000,domain=0:2] {f(x)};
 \addplot[smooth,samples=1000,domain=0:2, integral segments=14, integral max=0:2,fill=black,pattern=custom north west lines,hatchspread=5pt] {f(x)};
   \end{axis}
   \end{tikzpicture}
\\
  \begin{tabular}{p{2in}p{2in}}
    a. $\frac{1}{14}e^{-k^2}$  & e. $\frac{1}{14}e^{-(k/14)^2}$ \\
    b. $\frac{1}{14}e^{-(k-1)^2}$ & f. $\frac{1}{14}e^{-((k-1)/14)^2}$\\
    c.  $\frac{1}{7}e^{-k^2}$& g. $\frac{1}{7}e^{-(k/7)^2}$\\
    d. $\frac{1}{7}e^{-(k-1)^2}$  & h. $\frac{1}{7}e^{-((k-1)/7)^2}$\\
  \end{tabular}
\end{mproblem}


\begin{problem}
We measure a sphere carefully and determine that its radius is approximately 20 inches, with an error of at most 0.01 inches.  We use our estimate of the radius to calculate the volume.  What is the maximum possible absolute error in our calculation of the volume?
\end{problem}
\begin{solution}
  We know that $r\approx 20$ and $\Delta r\leq 0.01$.  We have the
  formula $V=\frac{4}{3}\pi r^3$, so $\Delta V\approx dV=4\pi
  r^2\approx 4\pi 20^2dr\approx 1600 \pi\cdot 0.01$.
\end{solution}

\begin{problem}
  We fold paper into a right circular cone with volume $\frac{1}{3}\pi r^2h$ where $r$ is the radius and $h$ is the height.  If we know the height exactly but have a $5\%$ error in the radius, what is the percentage error in the volume?
\end{problem}
\begin{solution}
  We have $V=\frac{1}{3}\pi r^2 h$ and so $\Delta V\approx
  dV=\frac{2}{3}\pi rh dr$.  Therefore
  \[\frac{dV}{V}=\frac{2\pi rh dr}{3V}=\frac{2\pi rh
    dr}{3\frac{1}{3}\pi r^2 h}=\frac{2 dr}{r}=10\%.\]
\end{solution}

\begin{problem}
  Find the $x$ value where the absolute maximum of the function $f(x)=\frac{1-\ln x}{x}$ occurs in the interval $[0.001,20]$.
\end{problem}

\begin{solution}
  We take the derivative and look for critical points:
\[f'(x)=\frac{x(-\frac{1}{x})-1\cdot (1-\ln x)}{x^2}
=\frac{-2+\ln x}{x^2}.\]

  Critical points occur where $f'(x)$ is either $0$ or undefined.  The
  denominator is never $0$ on this interval, so this is always defined.  $f'(x)$ will
  only be $0$ at $e^2$.

  The candidates are $0.001, e^2, 20$.  $f(0.001)$ must be very large
  (because $-\ln 0.001$ is a large positive number).
  $f(e^2)=\frac{1-\ln e^2}{e^2}=\frac{1-2}{e^2}=-\frac{1}{e^2}<0$.  $\frac{1-\ln 20}{20}$ is also negative, since $\ln 20>1$.  So the maximum occurs at $0.001$.
\end{solution}

\begin{problem}
  Find the largest and smallest values of $f(x)=\frac{(x+3)(x-2)}{(x-6)}$ obtained on the interval $[-5,5]$.
\end{problem}

\begin{solution}
\begin{align*}
f'(x)
&=\frac{(x-6)[x+3+x-2]-(x+3)(x-2)}{(x-6)^2}\\
&=\frac{(x-6)[2x+1]-(x^2+x-6)}{(x-6)^2}\\
&=\frac{2x^2-11x-6-x^2-x+6}{(x-6)^2}\\
&=\frac{x^2-12x}{(x-6)^2}.\\
\end{align*}
The only critical point in the interval is $0$.  $f(-5)=\frac{(-2)(-7)}{-11}=\frac{9}{11}$, $f(0)=\frac{3(-2)}{-6}=1$, and $f(5)=\frac{8(3)}{-1}=-24$.  So the absolute minimum is $-24$, achieved at $x=5$, and the absolute maximum is $1$, achieved at $x=0$.
\end{solution}

\begin{problem}
Show that $x^6+3x^2+1$ does not have three distinct roots.
\end{problem}
\begin{solution}
Suppose that $f(x)=x^6+3x^2+1$ did have three distinct roots.  Call them $a,b,c$ with $a<b<c$.  Then we would have $f(a)=f(b)=f(c)=0$.  By Rolle's Theorem, there would be a $d$ with $a<d<b$ and $f'(d)=0$, and an $e$ with $b<e<c$ and $f'(e)=0$.  By Rolle's Theorem again, there would be a $k$ with $d<k<e$ and $f''(k)=0$.  But $f''(x)=30x^4+6$.  $f''(x)$ is always $\geq 6$, so there cannot be such a $k$.  Therefore there cannot be three roots.
\end{solution}

\begin{problem}
  Show that $3x^8+x^2+\sin x$ does not have three distinct roots.
\end{problem}
\begin{solution}
Suppose that $f(x)=3x^8+2x^2+\sin x$ did have three distinct roots.   Call them $a,b,c$ with $a<b<c$.  Then we would have $f(a)=f(b)=f(c)=0$.  By Rolle's Theorem, there would be a $d$ with $a<d<b$ and $f'(d)=0$, and an $e$ with $b<e<c$ and $f'(e)=0$.  By Rolle's Theorem again, there would be a $k$ with $d<k<e$ and $f''(k)=0$.  But $f''(k)=3\cdot 8\cdot 7x^6+2-\sin x$.  Since $\sin x\leq 1$, $3\cdot 8\cdot 7x^6\geq 0+2-1\geq 1>0$, so $f''(k)\geq 1$.  This is a contradiction, so there cannot be three distinct roots.
\end{solution}

\begin{problem}
  Identify all local minima and maxima of $\frac{\sqrt{x^4+1}}{x^2+1}$.
\end{problem}
\begin{solution}
If $f(x)=\frac{\sqrt{x^4+1}}{x^2+1}$, 
\begin{align*}
  f'(x)
&=\frac{(x^2+1)\frac{4x^3}{2\sqrt{x^4+1}}-2x\sqrt{x^4+1}}{(x^2+1)^2}\\
&=\frac{2x^3(x^2+1)-2x(x^4+1)}{(x^2+1)^2\sqrt{x^4+1}}\\
&=\frac{2(x^5+x^3-x^5-x)}{(x^2+1)^2\sqrt{x^4+1}}\\
&=\frac{2(x^3-x)}{(x^2+1)^2\sqrt{x^4+1}}.\\
\end{align*}
$f'$ is always defined, so the critical points are when $f'(x)=0$.  This is when
\[0=x^3-x=x(x^2-1),\]
so when $x=0$ or $x=\pm 1$.

It would be awful to take the second derivative, but we can try to check the sign of $f'$.  The denominator is always positive, so we only need to look at $x^3-1=x(x^2-1)$.  $f'(-100)=-100(100^2-1)$ which is a negative times a positive, so negative.  $f'(-1/2)=(-1/2)((-1/2)^2-1)$ which is a negative times a negative, so positive.  $f'(1/2)=(1/2)((1/2)^2-1)$ which is negative.  And $f'(100)=100(100^2-1)$ which is positive.  

So $0$ is a local max and $1,-1$ are local minima.
\end{solution}

\begin{problem}
  Sketch the graph of $\frac{1}{e^x+e^{-x}}$.  (This is a hard one.)
\end{problem}

\begin{problem}
  Sketch the graph of $\frac{(x-2)(x-1)}{(x+3)^2}$.  (This is rigged so things factor nicely; if you're not getting that, check your algebra.)
\end{problem}

\begin{problem}
\begin{itemize}
\item Show that the equation $x^7+4x^5+8x^3+100x-1000$ has at least one root.
\item Show that the equation $x^7+4x^5+8x^3+100x-1000$ has at most one root.
\end{itemize}
\end{problem}

\begin{problem}
Give (by sketching a graph) an example of a function $f$ such that:
\begin{itemize}
  \item $f$ is defined and continuous on $[0,1]$,
  \item $f(0)=f(1)=0$,
  \item Neither $0$ nor $1$ is a global extremum of $f$,
  \item $f$ has more local maxima in $(0,1)$ than local minima,
  \item There is no $c$ such that $f'(c)=0$.
\end{itemize}
\end{problem}

\begin{problem}
  Graph the function
\[f=\frac{(x+3)(x-2)^2}{(x+6)^2}.\]
  (This is rigged so things factor nicely; if you're not getting that, check your algebra.)
\end{problem}

\begin{problem}
  Determine each of these limits:
\begin{enumerate}
\item $\lim_{x\rightarrow\infty}\frac{\ln x}{e^x}$
\item $\lim_{x\rightarrow 1}x^{\sec (\pi x/2)}$
\item $\lim_{x\rightarrow 1}\left[\frac{1}{\ln x}-\frac{1}{x-1}\right]$
\item $\lim_{x\rightarrow\infty}\frac{x}{f(x)}$
where $f$ is an unknown function with the property that $f(x)\geq x^2$ for all $x$.
\end{enumerate}
\end{problem}
\begin{solution}
  \begin{enumerate}
  \item $0$
  \item $e^{-2/pi}$
  \item $1/2$
  \item $0$
  \end{enumerate}
\end{solution}

\begin{problem}
  It is known that if a certain petri dish begins with $N$ bacteria (in millions), it will take $T(N)=2^{10}\ln N$ minutes for the bacteria to completely fill the dish.  If the relative error in $N$ is $0.125=1/8$, what is the \emph{absolute} error in $T$?
\end{problem}
\begin{solution}
  $\Delta T\approx dT=\frac{2^{10}}{N}dN=2^{10}\frac{dN}{N}=\frac{2^{10}}{8}=2^7$.
\end{solution}

\begin{problem}
  Sketch the graph of $f=\frac{1}{1-e^{x}}$.
\end{problem}

\begin{problem}
  Find $\lim_{x\rightarrow 0^+}(\frac{1}{x}-\frac{1}{\sin x})$.
\end{problem}
\begin{solution}
  \begin{align*}
    \lim_{x\rightarrow 0^+}(\frac{1}{x}-\frac{1}{\sin x})
&=\lim_{x\rightarrow 0^+}\frac{\sin x-x}{x\sin x}\\
&=^{LH}\lim_{x\rightarrow 0^+}\frac{\cos x-1}{\sin x+x\cos x}\\
&=^{LH}\lim_{x\rightarrow 0^+}\frac{-\sin x}{2\cos x-x\sin x}\\
&=0.
  \end{align*}
\end{solution}

\begin{problem}
  Suppose that $f(x)$ is continuous and differentiable on $[0,4]$, $f(0)=3$, and $f'(x)\leq 2$ for all $x$.  What is the largest possible value of $f(4)$?
\end{problem}
\begin{solution}
  $3+2\cdot 4=11$.  This is certainly possible: consider the line $f(x)=2x+3$, which satisfies $f(0)=3$ and $f'(x)=2\leq 2$ for all $x$.

  On the other hand this is the maximum possible.  Suppose $f(4)>11$.  By the mean value theorem, there is a $c\in[0,4]$ such that
\[f'(c)=\frac{f(4)-f(0)}{4-0}>\frac{11-3}{4}=2,\]
so $f'(c)>2$.  But this contradicts the fact that $f'(c)\leq 2$.
\end{solution}

\begin{problem}
Estimate the area under the curve $x^7+1$ on the interval $[2,4]$ using four rectangles.  (There is no need to simplify.)
\end{problem}
\begin{solution}
There are several possible answers depending on which endpoint is used.  One is $\frac{1}{2}[(2^7+1)+(2.5^7+1)+(3^7+1)+(3.5^7+1)]$.
\end{solution}

\begin{problem}
  Find $\sum_{k=1}^{50}(k+1)^2$.
\end{problem}
\begin{solution}
  \begin{align*}
    \sum_{k=1}^{50}(k+1)^2
&=    \sum_{k=1}^{50}(k^2+2k+1)\\
&= \frac{50\cdot 51\cdot 101}{6}+2\frac{50\cdot 51}{2}+50\\
  \end{align*}
\end{solution}

\begin{problem}
  Suppose we use 120 rectangles to estimate the area under the curve $e^{-x}$ on the interval $[1,5]$, using the left endpoint of the rectangle as the height.  Express this estimate using $\Sigma$ notation.
\end{problem}
\begin{solution}
  $\frac{1}{30}\sum_{k=1}^{120}e^{-(1+\frac{k-1}{30})}$
\end{solution}

\begin{problem}
  A farmer wants to construct a rectangular pen next to a barn which
  is 60 feet long.  \emph{Part} of one side of the pen will be the
  barn, but that side (might) extend beyond the barn.  Find the
  dimensions of the pen with the largest area that the farmer can
  build if 120 feet of fencing material is available.
\end{problem}
\begin{solution}
  Call $x$ the side extending the barn and $y$ the side perpindicular to the barn, so the perimeter is $120=2y+x+x+60$ and the area is $A=(x+60)y$.  The range of possible $y$ values is $(0,30]$.

Then $x=30-y$, so
\[A=(90-y)y=90y-y^2,\]
so $\frac{dA}{dy}=90-2y$, so the only critical point is when $y=45$.  But in this case $x$ is negative, so this is outside our boundaries.  Either the endpoint where $y=30$ and $x=0$ is the maximum, or there is no maximum (because the area as $y\rightarrow 0$ gets bigger and bigger).  But on the interval $(0,30]$, $\frac{dA}{dy}$ is always positive: the bigger $y$ gets, the bigger the area is.  So the maximum area is when $y=30$.
\end{solution}


\begin{problem}
  A piece of wire 8cm long is cut into two pieces. One piece is bent into a circle, and the other is bent to form a square.  How should the wire be cut if the total enclosed area is to be as as small as possible?  What if the enclosed area is to be as large as possible?
\end{problem}
\begin{solution}
  Suppose $x$ is the part which gets folded into a circle and $8-x$ is the part which gets folded into a square.  The circle part gets folded into a circle with circumfrence $2\pi r=x$, so $r=x/2\pi$, and the square gets folded into a square with perimeter $4s=8-x$, so $s=\frac{8-x}{4}$.  The circle encloses $\pi r^2=\pi(x/2\pi)^2=\frac{x^2}{4\pi}$ cm$^2$ and the square encloses $s^2=\frac{(8-x)^2}{16}$ cm$^2$.  The interval for $x$ is $[0,8]$.

  We have $A=\frac{x^2}{4\pi}+\frac{(8-x)^2}{16}$, so $\frac{dA}{dx}=\frac{x}{2\pi}-\frac{8-x}{8}$.  The only critical point is $x=\frac{8\pi}{4+\pi}$.  $\frac{d^2A}{dx^2}=\frac{1}{2\pi}+\frac{1}{8}>0$, so the minimum is at the critical point when we cut at $\frac{8\pi}{4+\pi}$.

The maximum must be at an endpoint.  When $x=8$, the area is $\frac{16}{\pi}$, while when $x=0$, the area is $4$.  $16/\pi$ is slightly larger than $4$, so the largest possible area is found by folding the whole wire into a cicle.
\end{solution}

\begin{problem}
The curves (i), (ii), and (iii) in the graph below are the graphs of a function $f$ and its first and 
second derivatives.  Which curve is $f$, which is $f'$, and which is $f''$?  Explain.

\includegraphics[scale=0.5]{CurveSketch}
\end{problem}
\begin{solution}
  We notice that i is always positive, but both ii and iii are sometimes decreasing, so i can't be the derivative of either of the others, so $f$ must be i.

  ii is initially positive, but iii is decreasing, so ii cannot be the derivative of iii, so ii must be $f'$ and iii must be $f''$.

  We can confirm that the this matches what we see: ii crosses the $x$-axis three times, each of which corresponds to a local extremum of i.  iii crosses the $x$-axis twice, each of which corresponds to a local extremum of ii and an inflection point of i.
\end{solution}

\begin{problem}
  What is $\lim_{x\rightarrow 1^+}(\ln x)^{1-e^{x-1}}$?
\end{problem}
\begin{solution}
  \begin{align*}
    \lim_{x\rightarrow 1^+}(\ln x)^{1-e^{x-1}}
&=e^{\lim_{x\rightarrow 1^+}\ln(\ln x)^{1-e^{x-1}}}\\
&=e^{\lim_{x\rightarrow 1^+}(1-e^{x-1})\ln(\ln x)}\\
&=e^{\lim_{x\rightarrow 1^+}\frac{\ln(\ln x)}{(1-e^{x-1})^{-1}}}\\
&=^{LH}e^{\lim_{x\rightarrow 1^+}\frac{\frac{1}{x\ln x}}{-(1-e^{x-1})^{-2}(-e^{x-1})}}\\
&=e^{\lim_{x\rightarrow 1^+}\frac{(1-e^{x-1})^2}{xe^{x-1}\ln x}}\\
&=^{LH}e^{\lim_{x\rightarrow 1^+}\frac{2(1-e^{x-1})(-e^{x-1})}{e^{x-1}+xe^{x-1}\ln x+e^{x-1}\ln x}}\\
&=e^{\lim_{x\rightarrow 1^+}\frac{-2(1-e^{x-1})}{1+x\ln x+\ln x}}\\
&=e^{\lim_{x\rightarrow 1^+}\frac{-2(1-e^{0})}{1+1\ln 1+\ln 1}}\\
&=e^{\lim_{x\rightarrow 1^+}\frac{-2(0)}{1+1\cdot 0+0}}\\
&=e^0\\
&=1
  \end{align*}
\end{solution}

\begin{problem}
  How many zeroes does $e^x+x$ have?
\end{problem}
\begin{solution}
  It will be easiest to look for a maximum first.  If $f(x)=e^x+x$ then $f'(x)=e^x+1$.  We notice that $f'(x)>0$ for all $x$.  If there were two zeroes, $a$ and $b$ with $a<b$ then we would have $f(a)=0=f(b)$, so by Rolle's Theorem there would be a $c$ with $f'(c)=0$, which is impossible.

To see that there is at least one root, notice that $e^{-100}$ is very small, so $e^{-100}+(-100)<0$, while $e^0+0=1>0$, so by the Intermediate value theorem, there must be at least one root.
\end{solution}

\begin{problem}
  If the function $b\ln x+x$ has a local extremum at $2$, what is $b$ and is this extremum a local minimum or a local maximum.
\end{problem}
\begin{solution}
Let $f(x)=b\ln x+x$.  Then $f'(x)=\frac{b}{x}+1$.  If $f'(2)=0$, so $\frac{b}{2}+1=0$, then $b=-2$.  $f''(x)=-\frac{b}{x^2}=\frac{2}{x^2}>0$, so this is a local minimum.
\end{solution}

\begin{problem}
  Which intervals is $x(x+1)^{2/5}$ increasing on?
\end{problem}
\begin{solution}
  If $f(x)=x(x+1)^{2/5}$, 
\[f'(x)
=(2/5)x(x+1)^{-3/5}+(x+1)^{2/5}
=(2/5)x(x+1)^{-3/5}+(x+1)^{2/5}(x+1)^{3/5}(x+1)^{-3/5}
=(x+1)^{-3/5}\left((2/5)x+(x+1)\right)
=\frac{\frac{7}{5}x+1}{(x+1)^{3/5}}.\]
The critical points are $-5/7$ (when the numerator is $0$) and $-1$ (where the denominator is $0$, so $f'$ is undefined).

On the interval $(-\infty, -1)$, we check, say, $f'(-1000)$; the numerator and denominator are both negative, so $f'(-1000)>0$, so $f$ is increasing on $(-\infty,-1)$.

On $(-1,-5/7)$, we check $f'(-5/6)$; the numerator is $\frac{-7}{6}+1<0$ while the denominator is $>0$, so $f'(-5/6)<0$, so $f$ is decreasing on $(-1,-5/7)$.  On $(-5/7,\infty)$, we check $f'(0)=1>0$, so $f$ is increasing on $(-5/7,\infty)$.
\end{solution}


\end{document}



2Finding absolute or relative error
2Finding global extrema of a function
2Using Rolle's Theorem (especially to show that a function has a limited number of zeroes)
1Using MVT
1Using the first and second derivative tests to identify local extrema
2Sketching curves
1Finding limits using L'Hospital's rule
Solving word problems involving optimization
1Estimating areas using sums of rectangles
2Using sigma notation
