Solution (source code)

= Solution

The double-angle identity for the <cosine> gives $\cos^2x-1=(\cos2x-1)/2$. Termwise <integration> therefore gives
$$
\boxed{\int(\cos^2x-1)\,dx=\frac14\sin2x-\frac x2+C.}
$$
Here $C$ is an arbitrary constant in the <antiderivative>.