Finding the range of $f(x)=\cos x\left(\sin x+\sqrt{\smash[b]{\frac12+\sin^2x}}\right)$ 
How do I find the number of integers in the  range of
  $$f(x)= \cos x\left( \sin x + \sqrt{\dfrac 12 +\sin^2 x} \right)?$$

I set the derivative equal to $0$ but the method isn't efficient here because it gives a very complicated trigonometric equation. What's the proper way to do this then? 

Since you are asking about integers in the range, we do not need to fully know the end points of the range, and we don't need calculus.
Clearly the integer $0$ is in the range, considering $x=\pi/2$.
Since $f(\pi/4)=\frac{\sqrt{2}}{2}\left(\frac{\sqrt{2}}{2}+1\right)=\frac{1+\sqrt{2}}{2}>1$, the integer $1$ is in the range as well (by the Intermediate Value Theorem). 
Is $2$ in the range? If so, then $$
\begin{align}
2&=\cos x\left( \sin x + \sqrt{\dfrac 12 +\sin^2 x} \right)\\
2-\sin(x)\cos(x)&=\cos(x)\sqrt{\dfrac 12 +\sin^2 x}\\
4-4\sin(x)\cos(x)+\sin^2(x)\cos^2(x)&=\cos^2(x)\left(\dfrac 12 +\sin^2 x\right)\\
4-4\sin(x)\cos(x)&=\frac{1}{2}\cos^2(x)\\
4-2\sin(2x)&=\frac{1}{2}\cos^2(x)
\end{align}
$$
This has no solutions since the smallest the left side can be is $2$, and the largest the right side can be is $\frac{1}{2}$.
So $2$ is not in $f$'s range. Again using the Intermediate Value Theorem, no integer larger than $2$ is in the range either, or else $2$ would be in the range.
Lastly, note that $x\mapsto\pi-x$ preserves $\left( \sin x + \sqrt{\dfrac 12 +\sin^2 x} \right)$ but negates $\cos(x)$. So $f(\pi-x)=-f(x)$. And this means that $f$ takes negative values just as it takes positive values. That is, $-1$ is in the range, but not $-2$ or anything smaller.
So the integers in the range of $f$ make up the set $\{-1,0,1\}$.
