How to find: $\int^{2\pi}_0 (1+\cos(x))\cos(x)(-\sin^2(x)+\cos(x)+\cos^2(x))~dx$? How to find: $$\int^{2\pi}_0 (1+\cos(x))\cos(x)(-\sin^2(x)+\cos(x)+\cos^2(x))~dx$$
I tried multiplying it all out but I just ended up in a real mess and I'm wondering if there is something I'm missing.

You have to linearise the integrand. The simplest way to do is with Euler's formulae. To shorten the computation, set $u=\mathrm e^{\mathrm ix}$. Starting with $\cos x =\dfrac{u+\bar u}2$ and taking into account the relations 
$$u\bar u=1,\quad u^n+\bar u^n=2\cos nx,$$
we have
\begin{align*}
(1+\cos x)&\cos x(-\sin^2x+\cos x+\cos^2x)=(1+\cos x)\cos x(\cos x+\cos 2x)\\
&=\Bigl(1+\frac{u+\bar u}2\Bigr)\frac{u+\bar u}2\Bigl(\frac{u+\bar u}2+\frac{u^2+\bar u^2}2\Bigr)\\
&=\frac18(2+u+\bar u)(u+\bar u)\bigl(u+\bar u+u^2+\bar u^2\bigr)\\
&=\frac18\bigr(u^4+\bar u^4+3(u^3+\bar u^3)+4(u^2+\bar u^2)+5(u+\bar u)+6\bigl)\\
&=\frac14(\cos 4x+3\cos 3x+4\cos 2x+5\cos x+3)
\end{align*}
Consequently the  integral from $0$ to $2\pi$ is equal to
$$\frac{3\pi}2.$$
