%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                       %
%  Rolle's Theorem and the Mean Value Theorem           %
%                                                       %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\problemgrouptitle{Rolle's Theorem and the Mean Value Theorem}

\item Using Rolle's Theorem, show that the graph of $f(x)=x^3-2x^2-7x-2$ has a horizontal tangent line at a point with $x$-coordinate between $-1$ and $4$. Next find the value $x=c$ guaranteed by the theorem at which this occurs.
\answer{$f$ is continuous on $[-1,4]$, differentiable on $(-1,4)$, and $f(-1)=f(4)=2$ so Rolle's Theorem applies.  Solving $f'(c)=0$ shows $c=7/3$ or $c=-1$, however only $c=7/3$ is in the open interval $(-1,4)$.}

\lab{\addtoanswerkey{\clearpage}}
\item By Rolle's Theorem it follows that if $f$ is a function defined on $[0,1]$ with the following properties:
\begin{enumerate}[label=(\alph*)]
\item\label{itm:rolle1} $f$ is continuous on $[0,1]$
\item\label{itm:rolle2} $f$ is differentiable on $(0,1)$
\item\label{itm:rolle3} $f(0)=f(1)$
\end{enumerate}
then there exists a least one value $c$ in $(0,1)$ with $f'(c)=0$.  Show that each condition is required for the conclusion to follow by giving a counterexample in the case that \ref*{itm:rolle1}, \ref*{itm:rolle2}, or \ref*{itm:rolle3} is not required.

\answer{Each of the following graphs of $f$ give one possible counterexample.  There is no point in the interval $[0,1]$ where the function has a horizontal tangent and hence the conclusion to Rolle's theorem is invalid.
\begin{multicols}{3}
\begin{enumerate}
\item Continuity fails:

\resizebox{0.95\columnwidth}{!}{
\asycode{%
import graph;
size(200,0);
real f(real x) {return -0.5*x+1;}
pair F(real x) {return (x,f(x));}
draw(graph(f,0,1,operator ..),red+2);
xaxis(shift(-7,-10)*Label("$x$",align=E),xmax=1.15,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=0.5,Size=3,Label(fontsize(10))),above=true);
yaxis(shift(-8,-7)*Label("$y$",align=N),ymax=1.15,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=0.5,Size=3,Label(fontsize(10))),above=true);
dot(F(0),4+black);
dot(F(0),3+white);
dot((0,0.5),4+black);
dot((0,0.5),3+red);
}
}
\item Differentiability fails:

\resizebox{0.95\columnwidth}{!}{
\asycode{%
import graph;
size(200,0);
real f(real x) {return -abs(x-0.5)+1;}
pair F(real x) {return (x,f(x));}
draw(graph(f,0,1,operator ..),red+2);
xaxis(shift(-7,-10)*Label("$x$",align=E),xmax=1.15,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=0.5,Size=3,Label(fontsize(10))),above=true);
yaxis(shift(-8,-7)*Label("$y$",align=N),ymax=1.15,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=0.5,Size=3,Label(fontsize(10))),above=true);
}
}
\item $f(0)\neq f(1)$:

\resizebox{0.95\columnwidth}{!}{
\asycode{%
import graph;
size(200,0);
real f(real x) {return 0.5*x+0.5;}
pair F(real x) {return (x,f(x));}
draw(graph(f,0,1,operator ..),red+2);
xaxis(shift(-7,-10)*Label("$x$",align=E),xmax=1.15,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=0.5,Size=3,Label(fontsize(10))),above=true);
yaxis(shift(-8,-7)*Label("$y$",align=N),ymax=1.15,Arrow(HookHead,size=4),ticks=Ticks(n=1,Step=0.5,Size=3,Label(fontsize(10))),above=true);
}
}
\end{enumerate}
\end{multicols}
}

\item Suppose that $f$ is continuous on $[-3,4]$, differentiable on $(-3,4)$, and that $f(-3)=5$ and $f(4)=-2$\,.  Show there is a $c$ in $(-3,4)$ with $f'(c)=-1$\,.
\answer{Use the Mean Value Theorem.}

\item Verify the Mean Value Theorem for the function $f(x)=x^3+2x-2$ on the interval $[-1,2]$\,.
\answer{$c=1$ in $(-1,2)$ has $\displaystyle f'(c)=\frac{10-(-5)}{2-(-1)}=5$\,.}
