Another integral for $\pi$ Here is a new integral for $\pi$. 

$$\int_{0}^{1}\sqrt{\frac{\left\{1/x\right\}}{1-\left\{1/x\right\}}}\, \frac{\mathrm{d}x}{1-x} = \pi $$
  where $\left\{x\right\}$ denotes the fractional part of $x$.

Do you have any proof?
 A: This is just a (long) comment on Pranav Arora's fine answer.  I think there's a slightly easier way to get from
$$I=2\sum_{n=1}^\infty\int_0^\infty{x^2\over[(n+1)x^2+n][nx^2+(n-1)]}dx$$ 
to the telescoping sum.  
It's easy to check that
$$\begin{align}
{x^2\over[(n+1)x^2+n][nx^2+(n-1)]}&={n\over(n+1)x^2+n}-{n-1\over nx^2+(n-1)}\\
&={1\over\left({n+1\over n}\right)x^2+1}-{1\over\left({n\over n-1}\right)x^2+1}
\end{align}$$
From this and  the general arctangent integral
$$\int_0^\infty{1\over ax^2+1}dx={\pi\over2\sqrt a}$$
one can see directly that
$$I=2\sum_{n=1}^\infty\int_0^\infty{x^2\over[(n+1)x^2+n][nx^2+(n-1)]}dx=\pi\sum_{n=1}^\infty\left(\sqrt{n\over n+1}-\sqrt{n-1\over n} \right)$$
A: With the substitution $1/x=t$, the integral is:
$$I=\int_1^{\infty} \sqrt{\frac{\{t\}}{1-\{t\}}}\frac{dt}{t(t-1)}=\sum_{n=1}^{\infty}\int_n^{n+1}\sqrt{\frac{t-n}{n+1-t}}\frac{dt}{t(t-1)}$$
Next, use the substitution $\dfrac{t-n}{n+1-t}=x^2 \Rightarrow t=n+1-\dfrac{1}{1+x^2} \Rightarrow dt=\dfrac{2x}{(1+x^2)^2}\,dx$ i.e
$$I=2\sum_{n=1}^{\infty} \int_0^{\infty} \frac{x^2}{(x^2(n+1)+n)(nx^2+n-1)}\,dx$$
$$\Rightarrow I=2\sum_{n=1}^{\infty} \frac{1}{n(n+1)}\int_0^{\infty}\frac{x^2}{\left(x^2+\frac{n}{n+1}\right)\left(x^2+\frac{n-1}{n}\right)}\,dx$$
The above integral can be evaluated by decomposing into partial fractions i.e
$$\begin{aligned}
I &=\sum_{n=1}^{\infty} \frac{1}{n(n+1)}\frac{\pi}{\left(\sqrt{\frac{n}{n+1}}+\sqrt{\frac{n-1}{n}}\right)} \\
&=\pi\sum_{n=1}^{\infty} \frac{1}{\sqrt{n(n+1)}(n+\sqrt{n^2-1})}\\
&=\pi\sum_{n=1}^{\infty} \frac{n-\sqrt{n^2-1}}{\sqrt{n(n+1)}} \\
&=\pi \sum_{n=1}^{\infty} \left(\sqrt{\frac{n}{n+1}}-\sqrt{\frac{n-1}{n}}\right)
\end{aligned}$$
The final sum telescopes and its value is $1$. Hence,
$$\boxed{I=\pi}$$
A: Let me suggest a general approach.
We start with a theorem.

Theorem. (O. Oloa) Let $f$ be a piecewise continuous function on $(0,1)$ verifying $ \displaystyle \int_{0}^{1}  \frac{ \left|f (x) \right| }{x}  \: \mathrm{d}x <\infty.$
  Then $$  \int_{0}^{1}  f \left(\left\{1/x\right\}\right)   \frac{ \mathrm{d}x}{1-x} = 
  \int_{0}^{1}  f(x)   \frac{ \mathrm{d}x}{x} \qquad (*) $$ where $\left\{x\right\}$ denotes the fractional part of $x$.

Proof. One has  \begin{align*} \int_{0}^{1}  f \left(\left\{1/x\right\}\right)   \frac{ \mathrm{d}x}{1-x} &=
\sum_{k=1}^{\infty}\int_{\frac{1}{k+1}}^{\frac{1}{k}}  
f \left(\left\{1/x\right\}\right)   \frac{ \mathrm{d}x}{1-x}   \\
&= \sum_{k=1}^{\infty} \int_{k}^{k+1}  f \left(\left\{ u \right\}\right)  \: \frac{\mathrm{d} u}{u(u-1)} \\
&= \sum_{k=1}^{\infty} \int_{k}^{k+1} f \left(u-k\right)  \: \frac{\mathrm{d} u}{u(u-1)} \\
&= \sum_{k=1}^{\infty} \int_{0}^{1} f \left(v\right) \: \frac{\mathrm{d} v}{(v+k)(v+k-1)}  \\
&= \int_{0}^{1} f \left(v\right) \sum_{k=1}^{\infty} \frac{1}{(v+k)(v+k-1)} \mathrm{d} v \\
&=  \int_{0}^{1}  f(v)   \frac{ \mathrm{d}v}{v},\end{align*} where the permutation between the infinite sum and the integration is allowed by the dominated convergence theorem: let $v \in (0,1)$, as $N$ tends to $\infty$, \begin{align}
\displaystyle f \left(v\right) \sum_{k=1}^{N} \frac{1}{(v+k)(v+k-1)} & = f(v) \sum_{k=1}^{N}\left(\frac{1}{v+k-1}-\frac{1}{v+k}\right) 
=  \frac{f(v)}{v}-\frac{f(v)}{v+N} \longrightarrow \frac{f(v)}{v} \nonumber \end{align} 
and one has \begin{align}
\displaystyle  \left|f \left(v\right) \sum_{k=1}^{N} \frac{1}{(v+k)(v+k-1)}\right| 
 = \left| \frac{f(v)}{v}-\frac{f(v)}{v+N}\right| 
 = \frac{\left| f(v) \right|}{v}-\frac{\left| f(v) \right|}{v+N} \leq  \frac{ \left|f (v) \right| }{v} \nonumber 
\end{align} the latter function being such that $ \displaystyle \int_{0}^{1}  \frac{ \left|f (v) \right| }{v}  \: \mathrm{d}v <\infty$ by hypothesis. $\square$
Now, to get our result one may apply $(*)$ with $\displaystyle f(x)=\sqrt{\frac{x}{1-x}}$. Clearly $f$ satisfies the hypotheses of our Theorem and $$
\displaystyle \int_{0}^{1} \left| f(x) \right|  \: \frac{ \mathrm{d}x}{x} =
\int_{0}^{1} \left( \frac{x}{1-x}\right)^{1/2} \frac{ \mathrm{d}x}{x} 
= 2 \int_{0}^{1} \frac{1}{\sqrt{1-u^2}} \: \mathrm{d}u
= \pi. $$ 
Similarly, inserting successively \begin{align} \displaystyle f(x):= \sqrt{\frac{x}{1-a^2 x}} \, ,\qquad 0 < a \leq 1 \nonumber  \end{align} and
\begin{align}\displaystyle f(x):=\sqrt[n]{\frac{x}{1-x}} \, ,\qquad n=2,3, \cdots\nonumber  \end{align}
into $(*)$ gives some generalizations.  

Proposition 1. Let $ 0 < a \leq 1$. Then \begin{align} 
 \displaystyle \int_{0}^{1} \sqrt{\frac{\left\{1/x\right\}}{1-a^2 \left\{1/x\right\}}}\, \frac{\mathrm{d}x}{1-x} 
& = \frac{2\arcsin a}{a}    \end{align}  where $\left\{x\right\}$ denotes the fractional part of $x$. 

The initial integral is obtained with $a=1$.

Proposition 2. Let $n=2,3, \cdots .$ Then \begin{align} 
 \displaystyle \int_{0}^{1} \sqrt[n]{\frac{\left\{1/x\right\}}{1-\left\{1/x\right\}}}\, \frac{\mathrm{d}x}{1-x} 
& = \frac{\pi}{\sin(\pi/n)}   \end{align}  where $\left\{x\right\}$ denotes the fractional part of $x$. 

The initial integral is obtained with $n=2$.
The (new) identity $(*)$ may be seen as a dual of the Gauss famous invariance result in ergodic theory:  

Theorem. Let $f \in L^1(0,1)$. Then
  $$ \int_{0}^{1}  f \left(\left\{1/x\right\}\right) \frac{ \mathrm{d}x}{x+1} = 
  \int_{0}^{1}  f(x)   \frac{ \mathrm{d}x}{x+1}
$$
  where $\left\{x\right\}$ denotes the fractional part of $x$.

