# 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?

-
You want to set the numerator equal to zero. Note $-(\sin x)^2 -(\cos x)^2=-1$. – David Mitra Jul 1 '12 at 20:50

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?
I see now that I was not identifying the trig identity. I see that determining the values which resolve the numerator to zero will determine the zeros of the derivative. Then with some algebra: $sinx=\frac{1}{2}$ Unfortunately, the next part of solving this question is causing me some difficulty. I am not sure how to define the sin function in respect to calculus. I still think of it in terms of a ratio. – Kurt Jul 1 '12 at 22:07
@Kurt In my opinion, thinking about the trig functions as ratios is the best way. Note there is an angle in the first quadrant and an angle in the second quadrant whose $\sin$ is $1/2$. Find these two values first. Then you can obtain the other solutions by adding integer multiples of $2\pi$ to these two solutions. This is what E.O. does in his answer. – David Mitra Jul 1 '12 at 22:32
$$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}$