Finding horizontal tangents for trig function I am asked to find the points on the curve at white the tangent is horizontal, for the function: 
$$y=\frac{\cos x}{2+\sin x}$$
To find the points at which the tangent is horizontal, I need to know what values will result in the derivative of the function equaling zero, so I differentiate using quotient rule:
$$y'=\frac{(-2\sin x-\sin^2 x)-\cos^2 x}{(2+\sin x)^2}$$
The algebra in simplifying the derivative from here is what is holding be back. Also, have I differentiated this correctly? 
 A: Yes, you computed the derivative correctly (assuming you meant to write $(\sin x)^2$ or $\sin^2 x$, not $\sin x^2$).
You need to find the points where the derivative is zero. First note that since $\sin$ is bounded in absolute value by 1, the denominator in your expression for the derivative is never zero. So, the zeroes of the derivative are precisely the zeroes of the numerator of your expression.  You thus have to solve the equation
$$
(-2\sin x -\sin^2 x)-\cos^2 x=0;
$$
a task that is made tractable upon using the Pythagorean identity $\sin^2 x+\cos^2 x=1$. Utilizing this (and a bit of algebra) produces the equivalent equation
$$
-2\sin x-1=0.
$$
Can you take it from here?
A: $$y'=0 \iff\frac{(-2\sin x-\sin^2 x)-\cos^2 x}{(2+\sin x)^2}=0\longrightarrow(-2\sin x-\sin^2 x)-\cos^2 x=0$$
Multiplying both sides of the following trig identity $\sin^2x+\cos^2x=1$ gives:
$$-\sin^2x-\cos^2x=-1$$
Thus 
$$\begin{align*}-2\sin x-\sin^2 x-\cos^2 x&=0\\
-2\sin x-1 &=0\\
\sin x&=-1/2 \end{align*}$$
Therefore $x=\7pi/6+2k\pi, k\in\mathbb{Z}$ or $x=11pi/6+2k\pi, k\in\mathbb{Z}$
