\documentclass{article}
\input{/home/william/preamble.tex}
\usepackage{graphicx}
\begin{document}
	{\noindent 21-120 Differential and Integral Calculus \hfill Summer Session I 2010\\}
	{\centering Quiz 8\medskip\\}
	\hrule
	{
		\begin{prob*}
			\mbox{}
			For \[ f(x) = \cos^2(x)-2\sin(x) \]
			Find the following:-
			\begin{enumerate}
				\item All local maximums and minimums
				\item The absolute maximum and minimum on the interval $[0,2\pi]$.
			\end{enumerate}
		\end{prob*}
		\begin{soln*}
				Taking the first derivative, we have \[ f'(x) = -2\cos(x)\sin(x) - 2\cos(x)\] After factoring, and setting to 0, we have \[ -2\cos(x)(\sin(x)+1)=0\] Notice, $\cos(x)=0$ on $\frac{\pi}{2}+2\pi n$ and $\frac{3\pi}{2}+2\pi n$. Another way to write this is $\frac{\pi}{2}+\pi n$. For the other zeros, we have to solve when $\sin(x)=-1$. This happens only at $\frac{3\pi}{2}+2\pi n$, which was already covered by the other zeros. Thus we conclude that the critical points are $\frac{\pi}{2}+\pi n$ for any $n\in\Z$.

				Now we ask, which of these are positive, and which negative? To do this easily, we note that $\sin(x)+1$ is never negative, and $-2$ is always negative. Thus the entire expression will be negative when $\cos(x)$ is positive (Quadrants I and IV) and positive when $\cos(x)$ is negative (Quadrants II and III).
				\[ \xymatrix{
					0\ar@{-}[r]^{-} & \frac{\pi}{2} \ar@{-}[r]^{+} & \frac{3\pi}{2}\ar@{-}[r]^{-} & 2\pi
				}
				\]
				So we see that $\frac{3\pi}{2}+2\pi n$ is where there local maximums occurs and $\frac{\pi}{2}+2\pi n$ is where the local minimums occur. Now these values will be calculated.

				Now, we need to find the values at these two critcal points, and the endpoints.
				\begin{align*}
					f(0) &= 1 \\
					f(\frac{\pi}{2}) &= -2\\
					f(\frac{3\pi}{2}) &= 2\\
					f(2\pi) &= 1
				\end{align*}
				Therefore, the location of all local mins and maxs are $(\frac{3\pi}{2}+2\pi n,2)$ and $(\frac{\pi}{2}+2\pi n,-2)$. Also, we know that the absolute minimum is $-2$ and absolute maximum is $2$ on the interval $[0,2\pi]$ (and actually in the whole graph since it's periodic).
				\begin{figure}[h]
					\centering
					\includegraphics[bb=0 0 803 470,scale=.25]{quiz8.png}
				\end{figure}
		\end{soln*}
	}
\end{document}
