Prove that:
$\sin ^{2}\left(\frac{\pi}{8}+\frac{x}{2}\right)-\sin ^{2}\left(\frac{\pi}{8}-\frac{x}{2}\right)=\frac{1}{\sqrt{2}} \sin x$
$\mathrm{LHS}=\sin ^{2}\left(\frac{\pi}{8}+\frac{x}{2}\right)-\sin ^{2}\left(\frac{\pi}{8}-\frac{x}{2}\right)$
$=\frac{1}{2}\left\{1-\cos 2\left(\frac{\pi}{8}+\frac{x}{2}\right)\right\}-\frac{1}{2}\left\{1-\cos 2\left(\frac{\pi}{8}-\frac{x}{2}\right)\right\}$
$=\frac{1}{2}\left\{\cos \left(\frac{\pi}{4}-x\right)-\cos \left(\frac{\pi}{4}+x\right)\right\}$
Using the identity $\cos C-\cos D=-2 \sin \frac{C+D}{2} \sin \frac{C-D}{2}$, we get
$=\frac{1}{2}\left\{-2 \sin \left(\frac{\left(\frac{\pi}{4}-x\right)+\left(\frac{\pi}{4}+x\right)}{2}\right) \sin \left(\frac{\left(\frac{\pi}{4}-x\right)-\left(\frac{\pi}{4}+x\right)}{2}\right)\right\}$
$=-\sin \frac{\pi}{4} \sin (-x)$
$=\sin \frac{\pi}{4} \sin x \quad[\because \sin (-x)=-\sin x]$
$=\frac{1}{\sqrt{2}} \sin x=\mathrm{RHS}$
Hence proved.