Finding abs max with trig function I have $g(x)=\sqrt{3}-2\cos(x)$ on $[0,\pi]$. 
I did $g'(x)=-(-2\sin(x))=2\sin(x)$
and then $\pi$ and $0$ as the critical numbers. I evaluated the original function at each of the critical numbers and got 
\begin{eqnarray}
g(0)&=&-0.2679\\
g(\pi)&=&3.732\\
g(2\pi)&=&-0.2679
\end{eqnarray}
That would put $3.732$ as the abs max but that's not right. What am I doing wrong here?
 A: Your answer is correct: $g(\pi) = \sqrt{3} +2 \approx 3.73$ is the max on $[0,\pi]$.
Careful about g(0), though. It actually equals sqrt3. Also $2\pi$ isn't on the interval, so there's no need to calculate $g(2\pi)$.
It's useful to quickly plot your curve to see if your result makes sense. WolframAlpha.com gives the plot seen below. You can clearly see the absolute max occurs near $\pi$.

A: It seems that you are attempting to find the local extrema and then determine which extrema is the local maximum on the interval $[0,\pi]$.  
Given the function $g(x)= \sqrt{3} -2\cos(x) $ , we take the derivative of g(x) and set it to 0 to find the local extrema:
$$  
g'(x)= 2\sin(x)   \implies 2\sin(x)=0 \implies x= k\pi , k \in Z
$$
Since we are looking at $x\in[0,\pi]$ we only need to take $k\in{0,1}$ which corresponds to $x=0$, and $x=\pi$, which results in $g(0)=\sqrt{3}-2$ and $g(\pi)=\sqrt{3}+2$.  
From this we can see that the local maximum of $g(x)$ on $[0,\pi]$ is $g(\pi)$ and the local minimum is $g(0)$.
A: On $[0,\pi], \cos (x) \geq -1 \Rightarrow \sqrt{3} - 2\cos(x) \leq \sqrt{3}+2$, and this is the abs max value which occurs at $x = \pi$.
