TITLE: Evaluate $\int_0^1 \sin\left(\sqrt{\frac{1-x}{x}}-\sqrt{\frac{x}{1-x}}\right)\frac{dx}{x\left(3x^2 - 3x +1\right)}$
QUESTION [8 upvotes]: I have it on good authority that the following monstrosity
$$I=\int_0^1 \sin\left(\sqrt{\frac{1-x}{x}}-\sqrt{\frac{x}{1-x}}\right)\frac{dx}{x\left(3x^2 - 3x +1\right)}$$
is not only convergent but has an analytic closed form. After spending a long time struggling with it I was not able to convert it into a familiar form, mainly because of the nested function within the $\sin(\cdot)$ term which I am unable to get rid of.
The essential singularities of the integrand about $x=0$ and $x=1$ make it difficult even to approximate the integral to any meaningful precision, so I am unable even to formulate a conjecture as to the closed form.
I am hoping that some kind soul will be able to rid me of this suspense and solve the devil-incarnate that is this integral.

REPLY [9 votes]: $$\int_{0}^{1}\sin\left(\frac{1-2x}{\sqrt{x(1-x)}}\right)\frac{dx}{x(3x^2-3x+1)}\stackrel{x\mapsto\frac{1+z}{2}}{=}-4\int_{-1}^{1}\sin\left(\frac{2z}{\sqrt{1-z^2}}\right)\frac{dz}{(1+z)(1+3z^2)}$$
Through the substitution $z=\frac{t}{\sqrt{4+t^2}}$ the last integral becomes
$$ \int_{-\infty}^{+\infty}\sin(t)\frac{t-\sqrt{4+t^2}}{1+t^2}\,dt =\int_{-\infty}^{+\infty}\frac{t\sin(t)}{1+t^2}\,dt = \color{red}{\frac{\pi}{e}}$$
due to parity and the residue theorem.