<s>[INST] Max and min of $f(x)=\sin^2{x}+\cos{x}+2$. My first try was to look for when $\cos{x}$ and $\sin{x}$ attain their min and max respectively, which is easy using the unit circle. So the minimum of $\sin{x}+\cos{x}$ has maximum at $\sqrt{2}$ and minimum at $-\sqrt{2}.$ But if the sine-term is squared, how do I find the minimum of $\sin^2{x}+\cos{x}$?
I then tried the differentiation method:
$$f'(x)=2\sin{x}\cos{x}-\sin{x}=(2\cos{x}-1)\sin{x}=0,$$
which in the interval $(0,2\pi)$, gave me the the roots $\left(\frac{\pi}{2},\frac{3\pi}{2},\frac{\pi}{3},\frac{5\pi}{3}\right)$. So
$$f(\pi/2)=3, \quad f(3\pi/2)=3, \quad f(\pi/3)=\frac{13}{4}, \quad f(5\pi/3)=\frac{13}{4}.$$
So $f_{\text{max}}=\frac{13}{4}$ and $f_{\text{min}}=3.$ But the minimum should be $1$.
 [/INST] Credit to @iamwhoiam for suggesting this solution.
There's nothing wrong with your method - you just missed a root. When you find the roots of the first derivative, either $2 \cos x - 1$ or $\sin x$ should equal $0$, so we have:
First case: 
$2 \cos x - 1 = 0$, $\cos x = \frac{1}{2}$.
Since $\cos(x)$ is an even function, $\cos(x) = \cos(-x)$. Since we know that one solution is $x = \frac{\pi}{3}$, $x$ can also be $\frac{5\pi}{3}$.
Second case:
$\sin x = 0, \pi$. Using the properties of $\sin x$ we know these are the only solutions in the range $[0,2\pi)$.
Therefore the solutions in the range $[0, 2\pi)$ are: $x = 0, \frac{\pi}{3}, \frac{5\pi}{3}, \pi$. Substituting each in the original equation gives $3, \frac{13}{4}$, $\frac{13}{4}$ and $1$ respectively. The minimum of these critical points is $1$, which is the minimum value of the original function.
</s>