Prove that \[ \sin^2\left(\frac{\pi}{8}+\frac{x}{2}\right) – \sin^2\left(\frac{\pi}{8}-\frac{x}{2}\right) = \frac{1}{\sqrt2}\sin x \]
Proof:
Using the identity
\[
\sin^2A-\sin^2B=(\sin A-\sin B)(\sin A+\sin B)
\]
let
\[
A=\frac{\pi}{8}+\frac{x}{2}
\]
and
\[
B=\frac{\pi}{8}-\frac{x}{2}
\]
Then,
\[
LHS=
(\sin A-\sin B)(\sin A+\sin B)
\]
Using the identities
\[
\sin A-\sin B
=
2\cos\frac{A+B}{2}\sin\frac{A-B}{2}
\]
and
\[
\sin A+\sin B
=
2\sin\frac{A+B}{2}\cos\frac{A-B}{2}
\]
we get
\[
LHS=
\left(
2\cos\frac{A+B}{2}\sin\frac{A-B}{2}
\right)
\]
\[
\times
\left(
2\sin\frac{A+B}{2}\cos\frac{A-B}{2}
\right)
\]
Now,
\[
A+B=\frac{\pi}{4}
\]
and
\[
A-B=x
\]
Therefore,
\[
LHS=
2\cos\frac{\pi}{8}\sin\frac{x}{2}
\cdot
2\sin\frac{\pi}{8}\cos\frac{x}{2}
\]
\[
=
4\sin\frac{\pi}{8}\cos\frac{\pi}{8}
\sin\frac{x}{2}\cos\frac{x}{2}
\]
Using
\[
2\sin\theta\cos\theta=\sin2\theta
\]
we get
\[
2\sin\frac{\pi}{8}\cos\frac{\pi}{8}
=
\sin\frac{\pi}{4}
=
\frac{1}{\sqrt2}
\]
and
\[
2\sin\frac{x}{2}\cos\frac{x}{2}
=
\sin x
\]
Hence,
\[
LHS=
\frac{1}{\sqrt2}\sin x
\]
Therefore,
\[
\boxed{
\sin^2\left(\frac{\pi}{8}+\frac{x}{2}\right)
–
\sin^2\left(\frac{\pi}{8}-\frac{x}{2}\right)
=
\frac{1}{\sqrt2}\sin x
}
\]