<s>[INST] Integral $\int_0^1 \log \frac{1+ax}{1-ax}\frac{dx}{x\sqrt{1-x^2}}=\pi\arcsin a$ Hi I am trying to solve this integral $$
I:=\int_0^1 \log\left(\frac{1+ax}{1-ax}\right)\,\frac{{\rm d}x}{x\sqrt{1-x^2}}=\pi\arcsin\left(a\right),\qquad
\left\vert a\right\vert \leq 1.
$$
It gives beautiful result for $a = 1$
$$
\int_0^1 \log\left(\frac{1+ x}{1-x}\right)\,\frac{{\rm d}x}{x\sqrt{1-x^2}}
=\frac{\pi^2}{2}.
$$
I tried to write
$$
I=\int_0^1 \frac{\log(1+ax)}{x\sqrt{1-x^2}}dx-\int_0^1 \frac{\log(1-ax)}{x\sqrt{1-x^2}}dx
$$
If we work with one of these integrals we can write
$$
\sum_{n=1}^\infty \frac{(-1)^{n+1} a^n}{n}\int_0^1 \frac{x^{n-1}}{\sqrt{1-x^2}}dx-\sum_{n=1}^\infty \frac{a^n}{n}\int_0^1 \frac{x^{n-1}}{\sqrt{1-x^2}}dx,
$$
simplifying this I get an infinite sum of Gamma functions. which i'm not sure how to relate to the $\arcsin$ Thanks.
 [/INST] View $I$ as a function of $a$, differentiate under integral sign and let 
$x = \sin\theta$, we have
$$\begin{align}
I'(a) &= \int_0^1 \left( \frac{x}{1+ax} - \frac{-x}{1-ax}\right) \frac{dx}{x\sqrt{1-x^2}}
= \int_{-1}^1 \frac{dx}{(1+ax)\sqrt{1-x^2}}\\
&= \int_{-\pi/2}^{\pi/2} \frac{d\theta}{1+a\sin\theta}
= \frac12 \int_0^{2\pi}\frac{d\theta}{1+a\sin\theta}
= \frac12 \int_0^{2\pi}\frac{d\theta}{1+a\cos\theta}
\end{align}
$$
Introduce $z = e^{i\theta}$ and convert above integral to a contour integral over the unit
circle in $z$, we get
$$I'(a) = \frac{1}{2i}\oint_{|z|=1} \frac{dz}{z+\frac{a}{2}(z^2+1)}
= \frac{1}{ai}\oint_{|z|=1} \frac{dz}{(z - \lambda_{+})(z - \lambda_{-})}
$$
where $\displaystyle\;\lambda_{\pm} = -\frac{1}{a} \pm \sqrt{\frac{1}{a^2}-1}.\;$
When $|a| \le 1$, only the root $\lambda_{+}$ lies inside the unit circle, we have
$$I'(a) = \frac{1}{ai}\frac{2\pi i}{\lambda_{+} - \lambda_{-}}
= \frac{2\pi}{2a\sqrt{\frac{1}{a^2}-1}} = \frac{\pi}{\sqrt{1-a^2}}
$$
Since $I(0) = 0$, we get
$$I(a) = \pi \int_0^a \frac{dt}{\sqrt{1-t^2}} = \pi \arcsin(a)$$
</s>