\DefineExercise{E4-1_WarmUp1}{
This is a graph of a function (assume the graph continues off the page:

\begin{tikzpicture}
  \begin{axis}[width=240, height =200, xmax=3, ymax=2.5, xmin=-3, ymin=-2.5, xlabel=$x$, ylabel=$y$, axis x line = middle, axis y line=middle]
\addplot[smooth,samples=1000,domain=-2.5:2.5] gnuplot{((x+1)*(x+1)*(x+1)-3*(x+1)*(x+1)+1)/6};
  \end{axis}
\end{tikzpicture}

\begin{enumerate}[label=(\alph*)]
\item What are the local minima on $(-\infty,\infty)$? 
\item What are the absolute minima on $(-\infty,\infty)$?
\item What are the local minima on $(-\infty,0]$?
\item  What are the absolute minima on $(-\infty,0]$?
\item What are the local minima on $[0,\infty)$?  
\item What are the absolute minima on $[0,\infty)$?
\end{enumerate}
}


\DefineExercise{E4-1_Main1}{
Consider the function $g(x)=\frac{x}{x^2+2}$.
  \begin{enumerate}[label=(\alph*)]
\item Identify the absolute minima and maxima of $g(x)$ on $[-10,10]$.
\texttt{
  \begin{enumerate}[label=(\roman*)]
  \item First, find $g'(x)$.
  \item Find the points where $g'(x)=0$.
  \item Find the points where $g'(x)$ is undefined.
  \item Make a table of the values of $g(x)$ at the endpoints $-10$ and $10$, and at each critical points which is in the interval $(-10,10)$.
  \item The absolute minimum is the smallest value you find in that table.  The absolute maximum is the largest value.
  \end{enumerate}
}
\item Identify the absolute minima and maxima of $g(x)$ on $[-1,1]$.
  \end{enumerate}
}

\DefineExercise{E4-1_Main2}{
 Sketch a graph $u(x)$ with domain $(-\infty,\infty)$ such that all of the following happen:
  \begin{itemize}
  \item $u(x)$ has local maxima at $x=0$ and $x=4$,
  \item $u(x)$ has a local minimum at $x=2$,
  \item $u(x)$ has an absolute maximum at $x=0$,
  \item $u(x)$ has no absolute minimum.
  \end{itemize}
}

\DefineExercise{E4-1_Main3}{
%(There are a lot of parts here, but there's no need to rush.  Read carefully.)


The exact wording of the Extreme Value Theorem is:
\begin{quote}
  If $f(x)$ is a continuous function on a closed interval $[a,b]$, then $f$ attains both an absolute maximum value $M$ and an absolute minimum value $m$ in $[a,b]$.
\end{quote}
This theorem has two important assumptions: that $f$ is continuous and that the interval is closed.


\begin{enumerate}[label=(\alph*)]
\item Sketch the graph of a function which is defined on $[-2,2]$, is \emph{not continuous} but \emph{has both} an absolute maximum value and an absolute minimum value on $[-2,2]$.
\item Sketch the graph of a function which is defined on $[-2,2]$, is \emph{not continuous} but \emph{has neither} an absolute maximum value nor an absolute minimum value on $[-2,2]$.
\item Suppose you have a function $f(x)$ which is not continuous on $[a,b]$.  What do you know about the existence of absolute minima and maxima on on $[a,b]$?  (For example: do you know that $f$ does have an absolute maximum?  Do you know that $f$ does not?)
\item Sketch the graph of a function which is defined on $(-2,2)$, is \emph{continuous} and \emph{has both} an absolute maximum value and an absolute minimum value on $(-2,2)$.
\item Sketch the graph of a function which is defined on $(-2,2)$, is \emph{continuous} but \emph{has neither} an absolute maximum value nor an absolute minimum value on $(-2,2)$.
\item Suppose you have a function $f(x)$ which is continuous on $(a,b)$.  What do you know about the existence of absolute minima and maxima on on $(a,b)$?  (For example: do you know that $f$ does have an absolute maximum?  Do you know that $f$ does not?)
\item Consider the following argument:
  \begin{quote}
    The Extreme Value Theorem is wrong for a constant function like $f(x)=4$, because a constant function has no minimum or maximum value on $[-2,3]$.
  \end{quote}
Explain (in sentences, in a way another student in the class could understand) what is wrong with this argument.
\end{enumerate}
}

\DefineExercise{E4-1_Main4}{
Consider the function $h(x)=x^{4/3}-x^{2/3}$.
  \begin{enumerate}[label=(\alph*)]
\item Identify the absolute minima and maxima of $h(x)$ on $[-8,8]$.
\item Identify the absolute minima and maxima of $h(x)$ on $[-1,1]$.
  \end{enumerate}
}

\DefineExercise{E4-1_Main5}{
Bert has a 144-inch length of flexible wire that he will use to frame a cylindrical laundry bin with to top or bottom.  First he will bend the wire to make a rectangular frame, across which he will stretch a piece of cloth.  Then he will roll the rectangle into a cylinder by bringing a pair of opposite sides together.  Can Bert maximize the volume of the laundry bin?  If so, what dimensions should the rectangle have in order to do so?

\texttt{  \begin{enumerate}[label=(\roman*)]
\item Call the length of the side that gets rolled into a cylinder $x$ and the length of the other side $y$.  Write an equation for the radius $r$ of the cylinder in terms of $x$.
\item Write an equation for the height $h$ of the cylinder in terms of $y$.
  \item Give an equation for the voume of the cylinder in terms of the dimensions $x$ and $y$ of the rectangle.  (Hint: The volume of a cylinder with base $r$ and height $h$ is $\pi r^2h$.)
\item Since $2x+2y=144$, $y=72-x$.  Substitute this in to your previous equation to get the volume $V(x)$ as a function of $x$.
\item Find $\frac{dV}{dx}$.
\item Find the critical points of $V(x)$.
\item Use this information to answer the question.
  \end{enumerate}}
}