Prove the following integral is constant: $\int_{-1}^{+1} \frac{ \ln |a-x|^2 }{\sqrt{1 - x^2}} dx$ There is a famous improper integral with exact solution given by
$$\int_{0}^{+1} \frac{ \ln x }{\sqrt{1 - x^2}} dx = -\frac{\pi}{2} \ln 2$$
From this, it is pretty easy to generalize to the following variation:
$$\int_{-1}^{+1} \frac{ \ln |x|^2 }{\sqrt{1 - x^2}} dx = -2 \pi \ln 2$$
From what I can tell, we can even extend this further to show that:
$$\int_{-1}^{+1} \frac{ \ln |a-x|^2 }{\sqrt{1 - x^2}} dx = -2 \pi \ln 2$$
for any $|a| \leq 1$. Unfortunately, I have only been able to verify this numerically (i.e., testing it for various values in Wolfram Alpha). However, I cannot think of a straightforward way to prove it generally.
The identity has an interesting physics application I am working on. It shows that a surface charge density with the form
$$\sigma(x) = \frac{1}{\sqrt{1 - x^2}}$$
will also result in a constant potential along a thin strip from [-1,1]; an interesting result for transmission line models and a nice validation for simulation methods. I would love to see a straightforward proof of this. I suspect it has been done, as I have seen it mentioned in the literature. I just can't find a reference to it, and I do not see any easy way to replicate it myself.
Thanks in advance!
 A: This is a solution not using $P.V.$
Put $f(x)=\dfrac{1}{\sqrt{1-x^2}}$ and
\begin{equation*}
 I(a)=\int_{-1}^{1}\ln(|x-a|)f(x)\,\mathrm{d}x
\end{equation*}
where $-1\le a\le 1$.
The function $I$ is an odd function. Furthermore it is easy to evaluate when $a=1$. (Use the substitution $x=\sin t)$. Thus let us assume that $0 \le a<1$.
In order to make it possible to differentiate under the integral sign we rewrite $I(a)$. The intention is to remove the singularity in $x=a.$
As preparations, we calculate the integrals
\begin{alignat*}{1}
 I_1(a)=& \int_{-1}^{1}\ln(|x-a|)\,\mathrm{d}x =(1-a)\ln(1-a)+(1+a)\ln(1+a)-2\\[2ex] 
I_2(a)=& \int_{-1}^{1}(x-a)\ln(|x-a|)\,\mathrm{d}x =\dfrac{1}{2}\left((1-a)^2\ln(1-a)-(1+a)^2\ln(1+a)\right)+a .
\end{alignat*}
We observe that
\begin{equation}
 2+I_1(a)+I_2'(a)=0\tag{1}
\end{equation}
We cannot differentiate $\ln|x|$ at $x=0$. But the function
\begin{equation*}
g(x)=
\begin{cases}
 x^2\ln|x| &x\neq 0\\
 0&x=0
\end{cases}
\end{equation*}
is differentiable for all $x$ and $g'$ is continuous.
Rewrite.
\begin{gather*}
 I(a)= 
 \int_{-1}^{1}\ln(|x-a|)\cdot\left(f(x)-f(a)-f'(a)(x-a)\right)\,\mathrm{d}x +f(a)I_1(a)+f'(a)I_2(a).
\end{gather*}
Now the singularity in the integrand is removed. Differentiation yields
\begin{gather*}
 I'(a)=\int_{-1}^{1}\left(\dfrac{1}{a-x}\cdot\left(f(x)-f(a)-f'(a)(x-a)\right)-\ln(|x-a|)f''(a)(x-a)\right)\,\mathrm{d}x +\\[2ex]
 f'(a)I_1(a)+f(a)I_1'(a)+f''(a)I_2(a)+f'(a)I_2'(a)=\\[2ex]
 \int_{-1}^{1}\dfrac{1}{a-x}\cdot\left(f(x)-f(a)\right)\,\mathrm{d}x +f(a)I_1'(a)+f'(a)(2+I_1(a)+I_2'(a))= [\text{see } (1)]\\[2ex]
 \int_{-1}^{1}\dfrac{1}{a-x}\cdot\left(f(x)-f(a)\right)\,\mathrm{d}x +f(a)I_1'(a)
\end{gather*}
However, via the substitutions $x=\sin t$ and $u=\tan\frac{t}{2}$ we get
\begin{gather*}
 \int_{-1}^{1}\dfrac{1}{a-x}\cdot\left(f(x)-f(a)\right)\,\mathrm{d}x=\\[2ex]
 \dfrac{-1}{\sqrt{1-a^2}}\int_{-1}^{1}\dfrac{x+a}{\sqrt{1-x^2}\left(\sqrt{1-x^2}+\sqrt{1-a^2}\right)}\,\mathrm{d}x=\\[2ex]
 \dfrac{1}{\sqrt{1-a^2}}\ln\left(\frac{1-a}{1+a}\right)=-f(a)I_1'(a)
\end{gather*}
Consequently $I'(a)=0$ and $I(a)$ does not depend on $a$.
A: Here is another explanation: Substitute $x = \cos\theta$. Then fof $|a| \leq 1$,
\begin{align*}
\int_{-1}^{1} \frac{\log|x - a|^2}{\sqrt{1-x^2}} \, \mathrm{d}x
&= 2 \int_{-1}^{1} \frac{\log|x - a|}{\sqrt{1-x^2}} \, \mathrm{d}x \\
&= 2 \int_{0}^{\pi} \log\left|\cos\theta - a\right| \, \mathrm{d}\theta \\
&= \int_{-\pi}^{\pi} \log\left|\cos\theta - a\right| \, \mathrm{d}\theta \\
&= \int_{-\pi}^{\pi} \left( \log\left|e^{2i\theta} - 2ae^{i\theta} + 1\right| - \log 2 \right) \, \mathrm{d}\theta \\
&= -2\pi \log 2 + \operatorname{Re}\left[ \frac{1}{i} \int_{|z|=1} \frac{\log(z^2 - 2az + 1)}{z} \, \mathrm{d}z \right],
\end{align*}
where we utilized the formula $\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2}$ and $\log|z| = \operatorname{Re}(\log z)$. Since $z^2 - 2az + 1 = 0$ only at the points $a \pm i\sqrt{1-a^2}$ on the unit circle $|z| = 1$ and the integrand has only logarithmic singularities there, the Cauchy integration formula still works, giving
$$ \frac{1}{2\pi i} \int_{|z|=1} \frac{\log(z^2 - 2az + 1)}{z} \, \mathrm{d}z
= \left. \log(z^2 - 2az + 1)\right|_{z=0}
= 0. $$
Therefore the desired identity holds.
A: Let's try to take the derivative, to make it simpler let's write the integral as:
$$ \lim_{\epsilon \rightarrow 0}\int_{-1}^{1} \frac{\ln(x-a)^2}{\sqrt{1-x^2}}(\theta(x-(a+\epsilon))+\theta((a-\epsilon) -x)) $$
Also, for simplicity let's think about $a$ as about positive constant. The derivative:
$$ \frac{d}{da} \int_{-1}^{1} \frac{\ln(x-a)^2}{\sqrt{1-x^2}}(\theta(x-(a+\epsilon))+\theta((a-\epsilon) -x)) = P.V. \int_{-1}^1 \frac{2}{(x-a)\sqrt{1-x^2}} + \int_{-1}^1 \frac{\ln(x-a)^2}{\sqrt{1-x^2}}(-\delta(x-(a+\epsilon))+\delta((a-\epsilon) -x))$$
Let's look at the integral with $\delta$ functions:
$$ \int_{-1}^1 \frac{\ln(x-a)^2}{\sqrt{1-x^2}}(-\delta(x-(a+\epsilon))+\delta((a-\epsilon) -x)) = \frac{\ln(\epsilon^2)}{\sqrt{1-(a-\epsilon)^2}} -\frac{\ln(\epsilon^2)}{\sqrt{1-(a+\epsilon)^2}} \xrightarrow{\epsilon \rightarrow 0} 0 $$
Thus we are interested in P.V. only:
$$ P.V. \int_{-1}^1 \frac{2}{(x-a)\sqrt{1-x^2}} $$
Now let's use that:
$$ \frac{1}{x+i\epsilon} = P.V. \frac{1}{x}-i\pi \delta(x) \Rightarrow P.V. \frac{1}{x-a} = \frac{1}{x-a+i\epsilon}+i\pi \delta(x-a) $$
Therefore:
$$ P.V. \int_{-1}^1 \frac{2}{(x-a)\sqrt{1-x^2}} = i\pi \frac{2}{\sqrt{1-a^2}}+\int_{-1}^1 \frac{1}{x-a+i\epsilon} \frac{1}{\sqrt{1-x^2}} $$
The integral is definitely real so we need to think only about the real part of the second term:
$$ \lim_{\epsilon \rightarrow 0}\Re \int_{-1}^1 \frac{1}{x-a+i\epsilon}\frac{1}{\sqrt{1-x^2}} $$
This limit can be computed by hand, I guess, however I used Mathematica. The real part of the answer is proportional to:
$$ \propto \Re (\log(a-1)-\log(1-a)) =0 $$
Thus, derivative for $|a|<1$ is zero.
