# Find the derivative of the given function $cosec \: x$

Let $f(x) = cosex\: x$. Accordingly, from the first principle,
$f'(x) = \lim\limits_{h \to 0}= \large\frac{f(x+h)-f(x)}{h}$
$f'(x) = \lim\limits_{h \to 0}\large\frac{1}{h}$$[ cosec (x+h)- cosec\: x] = \lim\limits_{h \to 0}\large\frac{1}{h}$$\bigg[ \large\frac{1}{\sin(x+h)} - \large\frac{1}{\sin x} \bigg]$
$= \lim\limits_{h \to 0}\large\frac{1}{h}$$\bigg[ \large\frac{\sin x - \sin(x+h)}{\sin (x+h)\sin x}\bigg] = \lim\limits_{h \to 0}\large\frac{1}{h}$$\bigg[ \large\frac{2\cos \bigg( \Large\frac{x+x+h}{2}\bigg).\sin \bigg( \Large\frac{x-x-h}{2} \bigg)}{\sin (x+h) \sin x} \bigg]$
$= \lim\limits_{h \to 0} \large\frac{1}{h}$$\bigg[ \large\frac{2 \cos \bigg( \Large\frac{2x+h}{2} \bigg)\sin\bigg( -\Large\frac{ h}{2}\bigg)}{\sin (x+h)\sin x} \bigg] = \lim\limits_{h \to 0}= \large\frac{ -\cos \bigg( \Large\frac{2x+h}{2} \bigg). \Large\frac{sin\bigg( \Large\frac{h}{2} \bigg)}{ \Large\frac{h}{2} } }{\sin (x+h)\sin x} = \lim\limits_{h \to 0} \bigg[ \Large\frac{-\cos \bigg(\Large\frac{ 2x+h}{2} \bigg)}{\sin(x+h)\sin x}\bigg]$$. \lim\limits_{\large\frac{h}{2} \to 0} \Large\frac{sin\bigg( \Large\frac{h}{2} \bigg)}{\bigg( \Large\frac{h}{2}\bigg) }$
$= \bigg( \large\frac{-\cos x}{\sin x \sin x} \bigg).1$
$= -cosec x \cot x$