[Math] Given r = 2+sinθ, find the points on the given curve where tangent line is vert or horizontal

calculus

My actual question doesn't have to do with what's said in the title, I'm having trouble with the derivative portion.

This is from the solution:

enter image description here

Source: cramster.com

I am fine from the point I have to take the derivative of "r" and all the plugging in that goes on, but the step right after that is what I'm confused about. I can't figure out how they came up with the final step you see above in the picture. What simplifying was done to obtain that part?

Best Answer

It doesn't seem complicated to me : $$ \cos \theta \sin \theta + (2+\sin \theta) \cos \theta = \cos \theta ( \sin \theta + 2 + \sin \theta) = \cos \theta (2 + 2 \sin \theta) = 2 \cos \theta (1 + \sin \theta) $$ for the numerator, and $$ \begin{align} \cos \theta \cos \theta - (2+ \sin \theta) \sin \theta & = \cos^2 \theta - 2 \sin \theta - \sin^2 \theta \\ & = 1 - \sin^2 \theta - 2 \sin \theta - \sin^2 \theta = 1 - 2 \sin \theta - 2 \sin^2 \theta. \end{align} $$

Sometimes it seems there is magic when there is not. It happens.

Hope that helps,