Evaluating two integrals involving $\tan^{-1}\left(\frac{\sqrt{x(1-x)}}{x+\frac12}\right)$ 
I want to show
$$I:=\int_0^{1}\tan^{-1}\left(\frac{\sqrt{x(1-x)}}{x+\frac12}\right)dx=\frac{\pi}{8}$$
and
$$J:=\int_0^{1}\frac{1}{1-x}\tan^{-1}\left(\frac{\sqrt{x(1-x)}}{x+\frac12}\right)dx=\pi\log \frac{3}{2}$$

My work:
Let us try to do the first one. Note that by making a change of variable $x\mapsto 1-x$ we have
$$I=\int_0^1 \tan^{-1}\left(\frac{\sqrt{x(1-x)}}{\frac32-x}\right)dx$$
Adding the two expression of $I$ and doing some simple algebra lead us to
$$2I=\int_0^1 \tan^{-1}\left(\frac{8}{3}\sqrt{x(1-x)}\right)dx$$
We can obtain similar expression for $2J$ as well. But I am not sure how to deal with this integral. The fractor $\frac{3}{8}$ looks really odd here. However, if you plug it in wolframalpha they indeed give you the desired result. I also tried substituting $x=\sin^2\theta$ or $x=\cos^2\theta$. The expression didn't simplify. Perhaps there is some clever way to do it.
 A: We can use an Euler substitution to simplify both integrals, namely: $\frac{\sqrt{x(1-x)}}{x}=t\Rightarrow x=\frac{1}{1+t^2}$.
$$I=\int_0^1\arctan\left(\frac{\sqrt{x(1-x)}}{\frac{1}{2}+x}\right)dx=\int_0^\infty\arctan\left(\frac{2t}{3+t^2}\right)\left(\frac{1}{1+t^2}\right)'dt$$
$$\overset{IBP}=\int_0^\infty \left(\frac{1}{1+t^2}-\frac{3}{9+t^2}\right)\frac{1}{1+t^2}dt=\color{blue}{\int_0^\infty \frac{1}{(1+t^2)^2}dt}-\int_0^\infty \frac{1}{1+t^2}\frac{3}{9+t^2}dt$$
$$\overset{\color{blue}{t\to \frac{1}{t}}}=\color{blue}{\frac12\int_0^\infty \frac{1}{1+t^2}dt}+\frac{1}{8}\int_0^\infty \frac{3}{9+t^2}dt-\frac{3}{8}\int_0^\infty \frac{1}{1+t^2}dt=\frac{\pi}{8}$$

Similarly for the second integral we obtain:
$$J=\int_0^1\arctan\left(\frac{\sqrt{x(1-x)}}{\frac{1}{2}+x}\right)\frac{dx}{1-x}=2\int_0^\infty \arctan\left(\frac{2t}{3+t^2}\right) \frac{1}{t(1+t^2)}dt$$
$$\overset{IBP}=\int_0^\infty \left(\frac{1}{1+t^2}-\frac{3}{9+t^2}\right)(\ln(1+t^2)-2\ln t)dt$$
Now we can differentiate under the integral sign considering the following integral:
$$J(a)=\int_0^\infty \left(\frac{1}{1+t^2}-\frac{3}{9+t^2}\right)(\ln(a^2+t^2)-2\ln t)dt$$
$$\Rightarrow J'(a)=\int_0^\infty \left(\frac{1}{1+t^2}-\frac{3}{9+t^2}\right)\frac{2a}{a^2+t^2}dt$$
$$=\int_0^\infty \left(\frac{1}{1-a^2}\frac{2a}{a^2+t^2}-\frac{2a}{1-a^2}\frac{1}{1+t^2}+\frac{2a}{9-a^2}\frac{3}{9+t^2}-\frac{3}{9-a^2}\frac{2a}{a^2+t^2}\right)dt$$
$$=\pi\left(\frac{1}{1-a^2}-\frac{a}{1-a^2}+\frac{a}{9-a^2}-\frac{3}{9-a^2}\right)=\pi\left(\frac{1}{1+a}-\frac{1}{3+a}\right)$$
$$J(0)=0\Rightarrow J=\pi\int_0^1 \left(\frac{1}{1+a}-\frac{1}{3+a}\right)da=\pi\ln\left(\frac{3}{2}\right)$$
A: Hint: Using integration by parts and $x=\sin^2t,u=\cot t$, one has
\begin{eqnarray}
I&=&\int_0^{1}\tan^{-1}\left(\frac{\sqrt{x(1-x)}}{x+\frac12}\right)dx\\
&=&x\tan^{-1}\left(\frac{\sqrt{x(1-x)}}{x+\frac12}\right)\bigg|_0^1-\int_0^{1}x\frac{1-4 x}{\sqrt{(1-x) x} (8 x+1)}dx\\
&=&-2\int_0^{\pi/2}\frac{\sin^2t(1-4\sin^2t)}{8\sin^2t+1}dt\\
&=&-2\int_0^{\pi/2}\frac{\csc^2t-4}{(8+\csc^2t)\csc^2t}dt\\
&=&-2\int_0^{\pi/2}\frac{\cot^2t-3}{(9+\cot^2t)(1+\cot^2 t)}dt\\
&=&-2\int_0^{\infty}\frac{u^2-3}{(9+u^2)(1+u^2)^2}du
\end{eqnarray}
which is not hard to handle.
