Tangent slope of cardioid graph

calculusderivativesslopetangent line

Hi i am student working on calculus and i have got question that i came up with wrong answer.

enter image description here

So we get $r=2(1+\cos\theta)$ cardioid function and the question is to looking for Θ angle where tangent to the curve is horizontal.

My calculation process is quite simple

since the tangent slope is $$\frac{dy}{dx} = \frac{\frac{dy}{d\theta}}{\frac{dx}{d\theta}}$$
and this equation should be $0$ in order for tangent to be horizontal.

so i came up with the answer as $\arcsin(1/\sqrt 2)$
enter image description here

but the problem is in the book, it say the answer is $\pi/3$

and in description, it also mentioned that $dy/dx$ factors into $2(2 \cos \theta – 1)(\cos \theta + 1)$ which i totally don't understand how this equation come out of from where.

i assume just missing some simple silly thing
hope someone can help me out
thanks

Best Answer

Start by writing explicitly $x$ and $y$:$$r=2(1+\cos\theta)\\x=r\cos\theta=2(1+\cos\theta)\cos\theta\\y=r\sin\theta=2(1+\cos\theta)\sin\theta$$ Then $$\frac{dy}{d\theta}=2(1+\cos\theta)\cos\theta+2(-\sin\theta)\sin\theta\\=2\cos^2\theta-2\sin^2\theta+2\cos\theta\\=4\cos^2\theta+2\cos\theta-2$$ When you set it equal to $0$, you get $$2\cos^2\theta+\cos\theta-1=0$$ The solutions are $$\cos\theta=\frac{-1\pm\sqrt{1^2+4\cdot 2}}{2\cdot 2}=\frac{-1\pm3}4$$ So the solutions are $\cos\theta=\frac12$ and $\cos\theta=-1$. The first solution correspond to $\theta=\frac\pi3$ and $\theta=2\pi-\frac\pi3$. The second solution correspond to the origin