The Weierstrass substitution stuck in my head after I used it to prove the rigidity of the braced hendecagon (and tridecagon). Thus I had another look at this question which I eventually answered in a very complicated way, and hit upon a potentially simpler approach. For reference the original question is reproduced below:
Pick three points from the uniform distribution over a unit circle's circumference. What is the probability $P(x)$ of the triangle thus formed containing $(x,0)$ where $0\le x\le1$?
My new approach represents the three points by their Weierstrass parameters – $\left(\frac{1-t^2}{1+t^2},\frac{2t}{1+t^2}\right)$ and similarly for $u$ and $v$ – and then computes the barycentric coordinates of $(x,0)$; they will all be positive iff the triangle contains the point. The raw expressions are a bit messy, but cylindrical algebraic decomposition shows that if $t<u<v$ containment occurs iff $0<v\land t<k/v\land k/v<u<k/t$ where $k=\frac{x-1}{x+1}$, which leads to a single triple integral for the probability:
$$P(x)=\frac6{\pi^3}\int_0^\infty\int_{-\infty}^{k/v}\int_{k/v}^{k/t}\frac1{(1+t^2)(1+u^2)(1+v^2)}\,du\,dt\,dv$$
Note that both integration region and integrand are invariant under the involution $(t,u,v)\to(v,-u,t)$, which simplifies the region description and allows solving the first two levels easily:
$$P(x)=\frac{12}{\pi^3}\int_0^\infty\int_{-\infty}^{k/v}\int_{k/v}^0\frac1{(1+t^2)(1+u^2)(1+v^2)}\,du\,dt\,dv$$
$$=\frac{12}{\pi^3}\int_0^\infty\frac{\tan^{-1}av\cot^{-1}av}{1+v^2}\,dv\qquad a=\frac{1+x}{1-x}=-\frac1k\tag1$$
I have not been able to solve this last parametric integral; both Mathematica and Rubi fail on it except at $a=1$. Because I found the probability by another method, however, I know what the result must be:
$$P(x)=\frac14-\frac3{2\pi^2}\operatorname{Li}_2(x^2)\qquad x=\frac{a-1}{a+1}\tag2$$
How can $(2)$ be obtained from $(1)$?
Best Answer
One common way to solve such integrals is to differentiate under the integral sign w.r.t. a.
Here is another approach using Fourier Series. $$I(a)=\int_0^\infty\frac{\arctan(ax)\operatorname{arccot}(ax)}{1+x^2}dx\overset{\large ax\to \tan(x/2)}=\frac{a}{4}\int_0^\pi\frac{x\left(\pi-x\right)}{1+a^2-(1-a^2)\cos x}dx$$ Refering to this thread we can expand the denominator into Fourier series as: $$\frac{1}{1+a^2-(1-a^2)\cos x}=\frac{1}{2a}+\frac{1}{a}\sum_{n=1}^\infty \left(\frac{1-a}{1+a}\right)^n\cos(nx)$$ $$\Rightarrow I(a)=\frac18\int_0^\pi x(\pi-x)dx+\frac14\sum_{n=1}^\infty \left(\frac{1-a}{1+a}\right)^n\int_0^\pi x(\pi-x)\cos(nx)dx$$ $$=\frac{\pi^3}{48} - \frac{\pi}{4}\sum_{n=1}^\infty \left(\frac{1-a}{1+a}\right)^n\frac{1+(-1)^n}{n^2}=\frac{\pi^3}{48}-\frac{\pi}{8}\operatorname{Li}_2\left(\left(\frac{1-a}{1+a}\right)^2\right)$$ Where $\operatorname{Li_2}(x)$ is the dilogarithm function (from this link the series representation alongside the third functional equation is useful).