The value of the integral $\int_0^{\pi} x \cos^2 x \: dx$ is

1. $\pi^2/8$
2. $\pi^2/4$
3. $\pi^2/2$
4. $\pi^2$