Let $ f(x) = \large\frac{x^2 \cos \bigg( \Large\frac{\pi}{4}\bigg)}{\sin x}$

By quotient rule,

$f'(x) = \cos \large\frac{\pi}{4}$$, \bigg[\large\frac{\sin x \large\frac{d}{dx}(x^2)-x^2\large\frac{d}{dx}(\sin x)}{\sin^2x}\bigg]$

$= \cos \large\frac{\pi}{4}$$, \bigg[\large\frac{\sin x.2x-x^2\cos x}{\sin ^2x}\bigg]$

$ = \large\frac{x \cos \large\frac{\pi}{4}[2\sin x - x\cos x]}{\sin^2x}$