# How can I show that $\int_0^\pi \frac{x\,dx}{1+\cos^2(x)} = \frac{\pi^2}{2\sqrt{2}}$

Show that $$\int_0^\pi \frac{x\,dx}{1+\cos^2(x)} = \frac{\pi^2}{2\sqrt{2}}$$ I tried using change of variable $x = \pi-y$ and then ended up with integral $\int_0^\pi \frac{1}{1+\cos^2(y)}dy$ which I think doesn't make thing easier. I am wondering if there is any other clever change of variable or some trick to compute this original integral.

I think your start is good. I add that part for completeness. \begin{align} I & =\int_0^{\pi}\frac{x}{1+\cos^2x}\,dx=[y=\pi-x]\\ &=\int_0^\pi\frac{\pi-y}{1+\cos^2y}\,dy\\ &=\pi\int_0^\pi\frac{1}{1+\cos^2y}\,dy-I, \end{align} and so $$I=\frac{\pi}{2}\int_0^\pi \frac{1}{1+\cos^2y}\,dy.$$ This way we got rid of the $x$ in the numerator.
Then, let us use this trick: $$\frac{1}{1+\cos^2y}=\frac{1}{\sin^2y+2\cos^2y}=\frac{1}{\sin^2y}\frac{1}{1+2\cot^2y}.$$ Let $u=\cot y$. This leads to $$\int_{-\infty}^{+\infty}\frac{1}{1+2u^2}\,du,$$ which I'm sure you can calculate.
• Thank you mickep. And yes I there is a factor of $\pi/2$ in front of the second integral. – Paul555 Jan 20 '15 at 21:18
I think your change of variables is wrong, but anyway. Split into integral of $x$ and integral of $$x(\tan^2(x) +1)$$ then use the identity $$\frac{1}{\cos^2(x)}= \tan^2(x) + 1$$ First term you can compute and for the second term just use integration by parts noting that $\tan^2(x) + 1$ is the derivative of $\tan(x)$.