Let $f(x) = \large\frac{x}{\sin^nx}$

By quotient rule,

$f'(x) =\large\frac{\sin^nx \large\frac{d}{dx}x-x\large\frac{d}{dx}\sin^nx}{\sin^{2n}x}$

It can be easily shown that $ \large\frac{d}{dx}$$\sin^nx=n \sin^{n-1}x \cos x$

Therefore,

$f'(x) =\large\frac{\sin^nx \large\frac{d}{dx}x-x\large\frac{d}{dx}\sin^nx}{\sin^{2n}x}$

$= \large\frac{\sin^nx.1-x(n \sin^{n-1}x \cos x)}{\sin^{2n}x}$

$ = \large\frac{\sin^{n-1}x(\sin x-nx\cos x)}{\sin^{2n}x}$

$ = \large\frac{\sin x-nx \cos x}{\sin^{n+1}x}$