<s>[INST] Finding the slope of a tangent line to a polar curve at given points I am given the following polar curve and set of points:
$r^2$ = 9cos(2$\theta$)
$(0, \frac{\pi}{4})$
$ (0,-\frac{\pi}{4})
$
I need to find the slope of the line tangent to that curve at the given points. The textbook has had me solve many of these problems for equations of the form $r = a sin(\theta)$, but not for $r^2$.
My professor suggested that I pursue implicit differentiation. So by taking $\frac{d}{d\theta}$ of both sides, I get:
$
2r * \frac{dr}{d\theta} = \frac{d}{d\theta} 9cos(2\theta)
$
$
2r * \frac{dr}{d\theta} = -18sin(2\theta)
$
$
\frac{dr}{d\theta} = \frac{-9sin(2\theta)}{r}
$
The formula provided by my textbook that I am to use now is:
$\frac{dy}{dx} = \frac{f'(\theta)sin(\theta) + f(\theta)cos(\theta)}{f'(\theta)cos(\theta) -f(\theta)sin(\theta)}
$
Given that $f(\theta)=r$, I assume that $f'(\theta)$ = $\frac{dr}{d\theta}$; but what do I plug in for $f(\theta)$? $
 f(\theta) =r= \frac{-9sin(2\theta)}{\frac{dr}{d\theta}}?$ $ f(\theta) = \pm\sqrt{9cos(2\theta)}$?
Regardless, I can't plug in the given points into $\frac{dr}{d\theta}$, because $r=0$ in both points, so that would give me some undefined value. But if you look at the graph, the slopes at those points are 1 and -1.
Where have I gone wrong? 
 [/INST] You already have $$\dfrac{dy}{dx} =\frac{d(r\sin\theta)}{d(r\cos\theta)} = \frac{\sin\theta dr + r\cos\theta d\theta}{\cos\theta dr - r\sin\theta d\theta} = \frac{\sin\theta \frac{dr}{d\theta} + r\cos\theta}{\cos\theta \frac{dr}{d\theta}-r\sin\theta}.\ \ \   (1)$$
From $r=\pm 3\sqrt{\cos 2\theta}$, one has $\frac{dr}{d\theta} = \mp 3\frac{\sin 2\theta}{\sqrt{\cos 2\theta}}$.
Substitute in (1), one has $$\frac{dy}{dx} = \frac{-3\sin\theta \frac{\sin 2\theta}{\sqrt{\cos 2\theta}}+3\sqrt{\cos 2\theta}\cos\theta}{-3\cos\theta \frac{\sin 2\theta}{\sqrt{\cos 2\theta}}-3\sqrt{\cos 2\theta}\sin\theta} = \frac{-\cos 3\theta}{\sin 3\theta}$$
So, at $(r,\theta) = (0,\frac{\pi}{4})$, or $(x,y) = (0,0)$, slope of tangent line is $\frac{dy}{dx} = -\cot \frac{3\pi}{4}$.
</s>