Trigonometry tangent line question How would I figure this out.
Find all x values between $0$ and $2\pi$ where the line tangent to the graph of
$y=\frac{\cos x}{2+ \sin(x)}$ is horizontal. 
I did the deriavative 
$\frac{(2+\sin(x)-\sin(x)+\cos(x)\cos(x)}{(2+\sin x)^2}$ but I think I need to find $x$

For a horizontal tangent line you need the derivative to be zero. After all, $\operatorname{d}\!y/\!\operatorname{d}\!x$ gives you the gradient of the tangent line to the graph $y=f(x)$. We are told that
$$y = \frac{\cos x}{2+\sin x}$$
Using the quotient rules, and the standard trig identity $\sin^2x+\cos^2x \equiv 1$ we see that
$$\frac{\operatorname{d}\!y}{\operatorname{d}\!x} = \frac{1+2\sin x}{\cos^2x-4\sin x-5} \equiv \frac{1+2\sin x}{(2+\sin x)^2}$$
Since $-1 \le \sin x \le 1$ for all real $x$ it follows that the horizontal tangent lines are gives by $1+2\sin x = 0$. In other words $\sin x = -\frac{1}{2}$. The principal value of which is $x=-\frac{\pi}{6}$. Plotting the graph of $y=\sin x$ and the line $y=-\frac{1}{2}$ can help to find the other solutions. We have:
$$x \in \left\{2\pi n - \frac{\pi}{6} : n \in \mathbb{Z} \right\} \cup \left\{(2n+1)\pi + \frac{\pi}{6} : n \in \mathbb{Z} \right\}$$
Restricting this to the interval $[0,2\pi]$ we have $x=\frac{7}{6}\pi$ and $x=\frac{11}{6}\pi$.
