Show that $\displaystyle \frac{d}{dx}(\frac{1+cosx}{sinx})=-\frac{1}{1-cosx}$
I applied the quotient rule but to no avail.. really dont have any idea if my method was right, thanks in advance!
$\displaystyle \frac{d}{dx}\left(\frac{1 + \cos{x}}{\sin{x}}\right) = \frac{\sin{x}\,\frac{d}{dx}(1 + \cos{x}) - (1 + \cos{x})\,\frac{d}{dx}(\sin{x})}{\sin^2{x}}$
$\displaystyle = \frac{\sin{x}(-\sin{x}) - (1 + \cos{x})\cos{x}}{\sin^2{x}}$
$\displaystyle = \frac{-\sin^2{x} - \cos{x} - \cos^2{x}}{\sin^2{x}}$
$\displaystyle = \frac{-1 - \cos{x}}{\sin^2{x}}$
$\displaystyle = \frac{-(1 + \cos{x})}{1 - \cos^2{x}}$
$\displaystyle = \frac{-(1 + \cos{x})}{(1 - \cos{x})(1 + \cos{x})}$
$\displaystyle = -\frac{1}{1 - \cos{x}}$.