#### Answer

$\frac{dy}{dx} = -cosec^{2} (\pi - \frac{1}{x}) \times \frac{1}{x^{2}}$

#### Work Step by Step

$y =cot u$
where,
$u = (\pi - \frac{1}{x})$
Now,
$\frac{dy}{du} = -cosec^{2} u$
and,
$\frac{du}{dx} =\frac{1}{x^{2}}$
So,
$\frac{dy}{dx} = \frac{dy}{du} \times \frac{du}{dx}$
$\frac{dy}{dx} = -cosec^{2} u \times \frac{1}{x^{2}}$
$\frac{dy}{dx} = -cosec^{2} (\pi - \frac{1}{x}) \times \frac{1}{x^{2}}$