I've encountered the following question:

Find the coordinates of the points on the curve $\displaystyle y=\frac{cos(x)}{2+sin(x)}, 0 \le x < 2\pi$, where the tangent is horizontal.

My plan was to take the derivative and then try to find where x goes to infinity by taking the limit. Things quickly fell apart.

I managed to get the derivative of $\displaystyle f'(x)=\frac{-sin^2(x)-2sin(x)-cos^2(x)}{(2+sin(x))^2}$ however when I check my work with WolframAlpha I'm told I'm wrong with $\displaystyle f'(x)=-\frac{2sin(x)+1}{(2+sin(x))^2}$. Now I can see the identity. However I see -1 and WolframAlpha is saying +1. My train of thought is $\displaystyle -sin^2(x)-cos^2(x)=-1$. So where is my basic algebra failing me with +1?

Furthermore, is my thought process correct by thinking I need to find the limit as $\displaystyle x\rightarrow\infty$?