Solution (source code)

= Solution

By <De Moivre's theorem>, $\cos5\theta$ is the <real part> of $(\cos\theta+i\sin\theta)^5$. Writing $c=\cos\theta$ and $s=\sin\theta$, the <binomial theorem> gives
$$
\cos5\theta=c^5-10c^3s^2+5cs^4.
$$
Use the <Pythagorean trigonometric identity> $s^2=1-c^2$ and expand:
$$
c^5-10c^3(1-c^2)+5c(1-2c^2+c^4)=16c^5-20c^3+5c.
$$
Therefore
$$
\boxed{\cos5\theta=16\cos^5\theta-20\cos^3\theta+5\cos\theta.}
$$