Integration of $x\cos(x)/(5+2\cos^2 x)$ on the interval from $0$ to $2\pi$ 
Compute the integral
  $$\int_{0}^{2\pi}\frac{x\cos(x)}{5+2\cos^2(x)}dx$$

My Try: I substitute $$\cos(x)=u$$
but it did not help. Please help me to solve this.Thanks 
 A: Using $\displaystyle\int_a^bf(x)\ dx=\int_a^bf(a+b-x)\ dx,$
$$I=\int_0^{2\pi}\frac{x\cos x}{5+2\cos^2x}dx=\int_0^{2\pi}\frac{(2\pi-x)\cos(2\pi-x)}{5+2\cos^2(2\pi-x)}\ dx=\int_0^{2\pi}\frac{(2\pi-x)\cos x}{5+2\cos^2 x}\ dx$$
$$2I=2\pi\int_0^{2\pi}\frac{\cos x}{5+2\cos^2x}dx$$
$$\implies I=\pi\int_0^{2\pi}\frac{\cos x}{7-2\sin^2x}dx$$
Set $\displaystyle\sin x=u$
A: As an indefinite integral this would be hard, maybe impossible, but there is a clever trick for the definite integral.  Let
$$I=\int_{0}^{2\pi}\frac{x\cos(x)}{5+2\cos^2(x)}dx\ .$$
Substituting $x=2\pi-t$ gives
$$I=\int_0^{2\pi}\frac{(2\pi-t)\cos(t)}{5+2\cos^2(t)}\,dt
  =\int_0^{2\pi}\frac{(2\pi-x)\cos(x)}{5+2\cos^2(x)}\,dx\ .$$
Adding the two expressions for $I$ gives
$$2I=2\pi\int_0^{2\pi}\frac{\cos(x)}{5+2\cos^2(x)}\,dx\ ,$$
and the integral on the RHS can now be done by various methods.
A: This is not an answer to the post but a reply to David's comment
The antiderivative does not express in terms of elementary functions. For your curiosity, I write it down, but, as said, it looks like a nightmare.
$$4 \sqrt{14}\int\frac{x\cos(x)}{5+2\cos^2(x)}dx=-2 i \text{Li}_2\left(-\frac{i \left(-7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)+2 i \text{Li}_2\left(\frac{i \left(-7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)+2 i \text{Li}_2\left(-\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)-2 i \text{Li}_2\left(\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)+2 x \log \left(1-\frac{i \left(\sqrt{35}-7\right) e^{-i
   x}}{\sqrt{14}}\right)-\pi  \log \left(1-\frac{i \left(\sqrt{35}-7\right) e^{-i
   x}}{\sqrt{14}}\right)-2 x \log \left(1+\frac{i \left(\sqrt{35}-7\right) e^{-i
   x}}{\sqrt{14}}\right)+\pi  \log \left(1+\frac{i \left(\sqrt{35}-7\right) e^{-i
   x}}{\sqrt{14}}\right)-2 x \log \left(1-\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)+\pi  \log \left(1-\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)+2 x \log \left(1+\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)-\pi  \log \left(1+\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)-4 \sin ^{-1}\left(\frac{\sqrt{7+\sqrt{14}}}{2^{3/4}
   \sqrt[4]{7}}\right) \log \left(1-\frac{i \left(\sqrt{35}-7\right) e^{-i
   x}}{\sqrt{14}}\right)+4 \sin ^{-1}\left(\frac{\sqrt{7+\sqrt{14}}}{2^{3/4}
   \sqrt[4]{7}}\right) \log \left(1+\frac{i \left(7+\sqrt{35}\right) e^{-i
   x}}{\sqrt{14}}\right)-\pi  \log \left(\sqrt{14} \sin (x)-7\right)+\pi  \log
   \left(\sqrt{14} \sin (x)+7\right)-4 i \sinh
   ^{-1}\left(\frac{\sqrt{7-\sqrt{14}}}{2^{3/4} \sqrt[4]{7}}\right) \log
   \left(1+\frac{i \left(\sqrt{35}-7\right) e^{-i x}}{\sqrt{14}}\right)+4 i \sinh
   ^{-1}\left(\frac{\sqrt{7-\sqrt{14}}}{2^{3/4} \sqrt[4]{7}}\right) \log
   \left(1-\frac{i \left(7+\sqrt{35}\right) e^{-i x}}{\sqrt{14}}\right)+8 i \sin
   ^{-1}\left(\frac{\sqrt{7+\sqrt{14}}}{2^{3/4} \sqrt[4]{7}}\right) \tan
   ^{-1}\left(\frac{\left(\sqrt{14}-7\right) \cot \left(\frac{1}{4} (2 x+\pi
   )\right)}{\sqrt{35}}\right)+8 \sinh ^{-1}\left(\frac{\sqrt{7-\sqrt{14}}}{2^{3/4}
   \sqrt[4]{7}}\right) \tan ^{-1}\left(\frac{\left(7+\sqrt{14}\right) \cot
   \left(\frac{1}{4} (2 x+\pi )\right)}{\sqrt{35}}\right)$$
