<s>[INST] integral $C(a,b)=\int_0^{2\pi}\frac{xdx}{a+b\cos^2 x}$ I am looking for other methods to find the general integral
$$C(a,b)=\int_0^{2\pi}\frac{xdx}{a+b\cos^2x}$$
To do so, I first preformed $u=x-\pi$:
$$C(a,b)=\int_{-\pi}^{\pi}\frac{xdx}{a+b\cos^2x}+\pi\int_{-\pi}^{\pi}\frac{dx}{a+b\cos^2x}$$
The sub $x\mapsto -x$ provides 
$$\int_{-\pi}^\pi \frac{xdx}{a+b\cos^2x}=0$$
and with symmetry, 
$$C(a,b)=2\pi\int_0^\pi \frac{dx}{a+b\cos^2x}$$
Then we use $t=\tan(x/2)$:
$$C(a,b)=4\pi\int_0^\infty \frac1{a+b\left[\frac{t^2-1}{t^2+1}\right]^2}\frac{dt}{t^2+1}$$
$$C(a,b)=\frac{4\pi}{a+b}\int_0^\infty \frac{x^2+1}{x^4+2\frac{a-b}{a+b}x^2+1}dx$$
Then we consider 
$$N_s(k)=\int_0^\infty\frac{x^{2s}}{x^4+2kx^2+1}dx$$
Then $x\mapsto 1/x$ gives
$$N_s(k)=N_{1-s}(k)$$
and with $s=0$:
$$C(a,b)=\frac{8\pi}{a+b}\int_0^\infty \frac{dx}{x^4+2kx^2+1}\qquad k=\frac{a-b}{a+b}$$
Then with 
$$x^4+(2-c^2)x^2+1=(x^2+cx+1)(x^2-cx+1)$$
we have that 
$$\begin{align}
u(c)=N_0\left(\frac{2-c^2}2\right)=&\frac1{4c}\int_0^\infty\frac{2x+c}{x^2+cx+1}dx-\frac1{4c}\int_0^\infty\frac{2x-c}{x^2-cx+1}dx\\
&+\frac14\int_0^\infty\frac{dx}{x^2+cx+1}+\frac14\int_0^\infty\frac{dx}{x^2-cx+1}
\end{align}$$
The first two integrals vanish and we have 
$$u(c)=\frac14I(1,c,1)+\frac14I(1,-c,1)$$
where 
$$I(a,b,c)=\int_0^\infty\frac{dx}{ax^2+bx+c}=\frac2{\sqrt{4ac-b^2}}\left[\frac\pi2-\arctan\frac{b}{\sqrt{4ac-b^2}}\right]$$
So 
$$4u(c)=\frac2{\sqrt{4-c^2}}\left[\frac\pi2-\arctan\frac{c}{\sqrt{4-c^2}}+\frac\pi2-\arctan\frac{-c}{\sqrt{4-c^2}}\right]$$
$$u(c)=\frac{\pi}{2\sqrt{4-c^2}}$$
$$N_0(a)=\frac\pi{2\sqrt{2+2a}}$$
And then 
$$C(a,b)=\frac{8\pi}{a+b}N_0\left(\frac{a-b}{a+b}\right)$$
$$C(a,b)=\frac{4\pi^2}{\sqrt{a^2+ab}}$$
How else can you prove this? Have fun ;)

As it turns out, we may be missing a factor of $1/2$, so we may actually have 
$$C(a,b)=\frac{2\pi^2}{\sqrt{a^2+ab}}$$
an issue discussed in the comment section of @Song's answer.
 [/INST] By making change of variable $u=2\pi -x$, we have
$$\begin{align*}
C(a,b)&=\int_0^{2\pi}\frac{2\pi -u}{a+b\cos^2 u}du=\int_0^{2\pi}\frac{2\pi}{a+b\cos^2 u}du-C(a,b),
\end{align*}$$ hence $\displaystyle C(a,b)=\pi\int_0^{2\pi}\frac{1}{a+b\cos^2 u}du$. On the other hand, we find that
$$\begin{align*}
\int_0^{2\pi}\frac{1}{a+b\cos^2 u}du&=4\int_0^{\frac\pi 2}\frac{1}{a\sin^2 u+(b+1)\cos^2 u}du
\\&=4\int_0^{\frac\pi 2}\frac{1}{a\tan^2 u+b+1}\sec^2 u\ du
\\&=4\int_0^\infty \frac{dv}{av^2+(b+1)}\tag{$v=\tan u$}
\\&=\frac{4}{\sqrt{a^2+ab}}\left[\arctan\left(\frac{\sqrt{a}v}{\sqrt{b+1}}\right)\right]^\infty_0\\&=\frac{2\pi}{\sqrt{a^2+ab}}.
\end{align*}$$ This gives $$
C(a,b)=\frac{2\pi^2}{\sqrt{a^2+ab}}.
$$ (I guess $2\pi^2$ is the right constant since this gives the right result $2\pi^2$ when $a=1,b=0$.)
</s>