Solution (source code)

= Solution

Put $w=e^{i\theta}$. By <Euler's formula>, $w-w^{-1}=2i\sin\theta$. The <binomial theorem> gives
$$
(w-w^{-1})^7=w^7-7w^5+21w^3-35w+35w^{-1}-21w^{-3}+7w^{-5}-w^{-7}.
$$
Group opposite powers and use $w^j-w^{-j}=2i\sin(j\theta)$:
$$
(2i)^7\sin^7\theta=2i\big[\sin7\theta-7\sin5\theta+21\sin3\theta-35\sin\theta\big].
$$
Since $(2i)^7=-128i$, division by $-2i$ yields
$$
\boxed{64\sin^7\theta=35\sin\theta-21\sin3\theta+7\sin5\theta-\sin7\theta.}
$$
This derivation is an application of the same exponential representation underlying <De Moivre's theorem>.