How do you differentiate f(x) = (x^2-4x)/(xcotx+1) using the quotient rule?

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\left(2 x - 4\right) \left(x \cot x + 1\right) + \left(\frac{x}{\sin} ^ 2 \theta - \cot x\right) \left({x}^{2} - 4 x\right)}{x \cot x + 1} ^ 2$
$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\frac{d \left({x}^{2} - 4 x\right)}{\mathrm{dx}} \left(x \cot x + 1\right) - \frac{d \left(x \cot x + 1\right)}{\mathrm{dx}} \left({x}^{2} - 4 x\right)}{x \cot x + 1} ^ 2 =$
$\frac{\left(2 x - 4\right) \left(x \cot x + 1\right) - \left(- \frac{x}{\sin} ^ 2 \theta + \cot x\right) \left({x}^{2} - 4 x\right)}{x \cot x + 1} ^ 2 =$
$\frac{\left(2 x - 4\right) \left(x \cot x + 1\right) + \left(\frac{x}{\sin} ^ 2 \theta - \cot x\right) \left({x}^{2} - 4 x\right)}{x \cot x + 1} ^ 2$