logarithmic potential gives out a constant integral over an absolutely continuous measure The question is as follows

Prove that the integral
  $$\int_0^1\frac{\log|x-y|}{\sqrt{x(1-x)}} dx$$
  is constant for $0<y<1$.

This problem stems out from potential theory, and in fact it is the integral of the Logarithmic Potential over a measure with density $(x(1-x))^{-1/2}$ over $[0,1]$.
This is one of the cases where changing derivative and integrals don't sum up to anything useful.
General substitutions seem to fail, or to transform the integral in a more orrible computation.
 A: $$\int_{0}^{y}\frac{\log(y-x)}{\sqrt{x(1-x)}}\,dx +\int_{y}^{1}\frac{\log(x-y)}{\sqrt{x(1-x)}}\,dx = \int_{0}^{y}\frac{\log(y-x)}{\sqrt{x(1-x)}}\,dx +\int_{0}^{1-y}\frac{\log(1-y-x)}{\sqrt{x(1-x)}}\,dx$$
and for any $a\in(0,1)$ we have
$$\begin{eqnarray*} g(a)=\int_{0}^{a}\frac{\log(a-x)}{\sqrt{x(1-x)}}&=&\sqrt{a}\int_{0}^{1}\frac{\log(a)+\log(1-z)}{\sqrt{z(1-az)}}\,dz\\&=&2\log(a)\arcsin(\sqrt{a})+\int_{0}^{1}\frac{\log(z)\,dz}{\sqrt{(1-z)(\frac{1-a}{a}+z)}}.\end{eqnarray*}$$
By defining, for any $b>0$, $h(b)=\int_{0}^{1}\frac{\log(z)\,dz}{\sqrt{(1-z)(b+z)}}$, we have
$$ h(b) = \int_{0}^{1}\frac{\log(1-z)\,dz}{\sqrt{z(1+b-z)}}= 2\int_{0}^{1}\frac{\log(1-u^2)\,du}{\sqrt{1+b-u^2}}=2\int_{0}^{\arcsin\frac{1}{\sqrt{b+1}}}\log\left(1-(b+1)\sin^2\theta\right)\,d\theta  $$
hence
$$\begin{eqnarray*} g(a)&=&2\log(a)\arcsin(\sqrt{a})+2\int_{0}^{\arcsin\sqrt{a}}\log\left(1-\frac{\sin^2\theta}{a}\right)\,d\theta\\&=&2\int_{0}^{\arcsin\sqrt{a}}\log(a-\sin^2\theta)\,d\theta\\&=&2\int_{\arcsin\sqrt{1-a}}^{\pi/2}\log(a-\cos^2\theta)\,d\theta\\&=&2\int_{\arcsin\sqrt{1-a}}^{\pi/2}\log(\sin^2\theta-(1-a))\,d\theta\\g(1-a)&=&2\int_{\arcsin\sqrt{a}}^{\pi/2}\log\left(\sin^2\theta-a\right)\,d\theta \end{eqnarray*}$$
$$ g(a)+g(1-a)=2\int_{0}^{\pi/2}\log\left|a-\sin^2\theta\right|\,d\theta=\int_{0}^{\pi}\log\left|a-\frac{1+\cos \theta}{2}\right|\,d\theta $$
and the RHS is constant (hence equal to $-2\pi\log 2$) by the mean value property of harmonic functions.
