I am considering the function $r^2=a^2\sin(2\theta)$ and am trying to find tangents perpendicular to the initial line, so $\frac{dx}{d\theta}=0.$
However, when I take the derivative by implicit differentiation, $\frac{dx}{d\theta}$ ends up being divided by $x$, which is $x=r\cos\theta =\sqrt{a^2\sin(2\theta)}\cos\theta$ so it seems like any solution to the numerator of $\frac{dx}{d\theta}$ being zero which is where cosine or sine are zero should be undefined.
However, in my text book, the tangent at $\theta=\pi/2$ is given as one solution, and from sketching the curve it looks to me like this should be a tangent perpendicular to the initial line?
So I was wondering why the answer is undefined, and how to deal with undefined tangents?
Thank you in advance.
EDIT: By initial line I mean the $\theta=0$ line.
My calculation steps were: $$ x=rcos(\theta) $$ $$ x^2=r^2\cos^2(\theta) $$ $$ =a^2\sin(2\theta)\cos^2(\theta) $$ $$ =2a^2\sin(\theta)\cos^3(\theta) $$ $$ 2x\frac{dx}{d\theta}=2a^2cos^2(\theta)[\cos^2(\theta)-3\sin^2(\theta)] $$ $$ \frac{dx}{d\theta}=\frac{2a^2\cos^2(\theta)[\cos^2(\theta)-3\sin^2(\theta)]}{2x} $$ $$ =\frac{2a^2\cos^2(\theta)[\cos^2(\theta)-3\sin^2(\theta)]}{a(2\sin(\theta)(\cos(\theta))^{\frac{1}{2}}} $$
So $\theta=\pi/2$ gives undefined $\frac{dx}{d\theta}$ although it is given as a solution to $\frac{dx}{d\theta}=0$ for the tangent to be perpendicular to $\theta=0$...