x = 3cosq – 2cos3q, y = 3sinq – 2sin3q.
Given, x = 3cosq – 2cos3q, y = 3sinq – 2sin3q.
Differentiating both the parametric functions w.r.t. q
$\frac{d x}{d \theta}=-3 \sin \theta-6 \cos ^{2} \theta \cdot \frac{d}{d \theta}(\cos \theta)$
$=-3 \sin \theta-6 \cos ^{2} \theta \cdot(-\sin \theta)$
$=-3 \sin \theta+6 \cos ^{2} \theta \cdot \sin \theta$
$\frac{d y}{d \theta}=3 \cos \theta-6 \sin ^{2} \theta \cdot \frac{d}{d \theta}(\sin \theta)$
$=3 \cos \theta-6 \sin ^{2} \theta \cdot \cos \theta$
$\therefore \frac{d y}{d x}=\frac{d y / d \theta}{d x / d \theta}=\frac{3 \cos \theta-6 \sin ^{2} \theta \cos \theta}{-3 \sin \theta+6 \cos ^{2} \theta \cdot \sin \theta}$
$\Rightarrow \frac{d y}{d x}=\frac{\cos \theta\left(3-6 \sin ^{2} \theta\right)}{\sin \theta\left(-3+6 \cos ^{2} \theta\right)}=\frac{\cos \theta\left[3-6\left(1-\cos ^{2} \theta\right)\right]}{\sin \theta\left[-3+6 \cos ^{2} \theta\right]}$
$=\cot \theta$
Thus, $\frac{d y}{d x}=\cot \theta$.