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

The quotient rule states that for a function $y = f \frac{x}{g} \left(x\right)$, then $\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{f ' \left(x\right) g \left(x\right) - f \left(x\right) g ' \left(x\right)}{g} {\left(x\right)}^{2}$.
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\left(2 x - 4\right) \left({e}^{x} - 1\right) - \left({x}^{2} - 4 x\right) \left({e}^{x}\right)}{{e}^{x} + 1} ^ 2$
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\left(2 x {e}^{x} - 4 {e}^{x} - 2 x + 4\right) - {x}^{2} {e}^{x} + 4 x {e}^{x}}{{e}^{x} + 1} ^ 2$
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{{e}^{x} \left(- {x}^{2} + 6 x - 4\right) - 2 x + 4}{{e}^{x} + 1} ^ 2$