$\int_{0}^{\pi}\frac{x dx}{1+ e \sin x}=K\frac{\arccos e}{\sqrt{1-e^{2}}}$ $$\int_{0}^{\pi}\frac{x dx}{1+ e \sin x}=K\frac{\arccos e}{\sqrt{1-e^{2}}}, (e^{2}\lt1)$$
Find value of $K$ ?
I have solved till this step .
$$\int_{0}^{\pi}\frac{x dx}{1+ e \sin x}=\frac{1}{2}
\int_{0}^{\pi}\frac{ \pi dx}{1+ e \sin x}$$
 A: We have
$$\begin{split}
\int_{0}^{\pi}\frac{x dx}{1+ e \sin x} &= \int_{0}^{\frac \pi 2}\frac{x dx}{1+ e \sin x} + \int_{\frac \pi 2}^{\pi}\frac{x dx}{1+ e \sin x}\\
&= \int_{0}^{\frac \pi 2}\frac{x dx}{1+ e \sin x} + \int_{0}^{\frac \pi 2}\frac{(\pi - s) ds}{1+ e \sin s} \,\,\,\,\text{ (with } s=\pi-x\text{)}\\
&= \pi\int_{0}^{\frac \pi 2}\frac{dx}{1+ e \sin x}
\end{split}$$
Now, using $u=\tan \frac x 2$,
$$\begin{split}
\int_{0}^{\frac \pi 2}\frac{dx}{1+ e \sin x} &= 2\int_0^{1}\frac{du}{(1+e\frac{2u}{1+u^2})(1+u^2)}\\
&=2\int_0^{1}\frac{du}{(1+2eu + u^2)}\\
&= \frac 2 {1-e^2}\int_0^{1}\frac{du}{1 + \frac{(u+e)^2}{1-e^2}}\\
&= \frac 2 {\sqrt{1-e^2}}\int_{\frac{e}{\sqrt{1-e^2}}}^{\frac{1+e}{\sqrt{1-e^2}}} \frac{dv}{1+v^2}\,\,\,\text{(with }v=\frac{u+e}{\sqrt{1-e^2}}\text{)}\\
&=\frac 2 {\sqrt{1-e^2}} \left(\arctan\left(\frac{1+e}{\sqrt{1-e^2}}\right) - \arctan \left(\frac{e}{\sqrt{1-e^2}}\right)\right)\\
&=\frac 2 {\sqrt{1-e^2}} \arctan\left(\frac{\frac{1}{\sqrt{1-e^2}}}{1+\frac{1+e}{\sqrt{1-e^2}}\frac{e}{\sqrt{1-e^2}}}\right)\\
&=\frac 2 {\sqrt{1-e^2}} \arctan\left(\frac{\sqrt{1-e^2}}{1+e}\right)\\
&=\frac 1 {\sqrt{1-e^2}} \arccos(e)
\end{split}$$
Conclusion:
$$\int_{0}^{\pi}\frac{x dx}{1+ e \sin x}=\frac{\pi}{\sqrt{1-e^2}}\arccos(e)$$ and $K=\pi$
A: $$F(a)=\int_0^\pi\frac{xdx}{1+a\sin x}$$
Somehow, you have shown that 
$$F(a)=\frac\pi2\int_0^\pi\frac{dx}{1+a\sin x}$$
With which CAS seems to agree. We exploit symmetry:
$$F(a)=\pi\int_0^{\pi/2}\frac{dx}{1+a\sin x}$$
Then we preform the substitution $t=\tan\frac{x}2$, to see that 
$$F(a)=2\pi\int_0^1\frac{1}{1+a\frac{2t}{t^2+1}}\frac{dt}{t^2+1}$$
So that 
$$F(a)=2\pi\int_0^1\frac{dt}{t^2+2at+1}$$
Then we consider the integral 
$$I(x;a,b,c)=\int\frac{dx}{ax^2+bx+c}$$
Complete the square on the bottom
$$I(x;a,b,c)=\int\frac{dx}{a(x+\frac{b}{2a})^2+g}$$
Where $g=c-\frac{b^2}{4a}$. I leave it as a challenge to you to use the trig sub $x+\frac{b}{2a}=\sqrt{\frac{g}{a}}\tan u$ to see that
$$I(x;a,b,c)=\frac2{\sqrt{4ac-b^2}}\arctan\frac{2ax+b}{\sqrt{4ac-b^2}}$$
So we see that 
$$F(a)=2\pi\left[I(1;1,2a,1)-I(0;1,2a,1)\right]$$
$$F(a)=\frac{2\pi}{\sqrt{1-a^2}}\left(\arctan\sqrt{\frac{1+a}{1-a}}-\arctan\frac{a}{\sqrt{1-a^2}}\right)$$
Which works for $a^2<1$. Amazingly this simplifies down to 
$$F(a)=\frac{\pi\arccos a}{\sqrt{1-a^2}}$$
So we have that $K=\pi$.
