If $y=(\sin x-\cos x)^{\sin x-\cos x}, \frac{\pi}{4}
Here, $y=(\sin x-\cos x)^{(\sin x-\cos x)}$ .......(1)
Taking log on both sides,
$\log y=\log (\sin x-\cos x)^{(\sin x-\cos x)}$
$\log y=(\sin x-\cos x) \log (\sin x-\cos x)$
Differentiating it with respect to $x$ using product rule, chain rule,
$\frac{1}{y} \frac{d y}{d x}=\log (\sin x-\cos x) \frac{d}{d x}(\sin x-\cos x)+(\sin x-\cos x) \frac{d}{d x} \log (\sin x-\cos x)$
$\frac{1}{y} \frac{d y}{d x}=\log (\sin x-\cos x) \times(\cos x+\sin x)+\frac{(\sin x-\cos x)}{(\sin x-\cos x)} \frac{d}{d x}(\sin x-\cos x)$
$\frac{1}{y} \frac{d y}{d x}=(\cos x+\sin x) \log (\sin x-\cos x)+(\cos x+\sin x)$
$\frac{1}{y} \frac{d y}{d x}=(\cos x+\sin x)(1+\log (\sin x-\cos x))$
$\frac{d y}{d x}=y[(\cos x+\sin x)(1+\log (\sin x-\cos x))]$
Using (i),
$\frac{d y}{d x}=(\sin x-\cos x)^{(\sin x-\cos x)}[(\cos x+\sin x)(1+\log (\sin x-\cos x))]$