Integrate $\arctan{\sqrt{\frac{1+x}{1-x}}}$ I use partial integration by letting $f(x)=1$ and $g(x)=\arctan{\sqrt{\frac{1+x}{1-x}}}.$ Using the formula: 
$$\int f(x)g(x)dx=F(x)g(x)-\int F(x)g'(x)dx,$$
I get
$$\int1\cdot\arctan{\sqrt{\frac{1+x}{1-x}}}dx=x\arctan{\sqrt{\frac{1+x}{1-x}}}-\int\underbrace{x\left(\arctan{\sqrt{\frac{1+x}{1-x}}}\right)'}_{=D}dx.$$
So, the integrand $D$ remains to simplify:
$$D=x\cdot\frac{1}{1+\frac{1+x}{1-x}}\cdot\frac{1}{2\sqrt{\frac{1+x}{1-x}}}\cdot\frac{1}{(x-1)^2} \quad \quad (1).$$
Setting $a=\frac{1+x}{1-x}$ for notation's sake I get
$$D=x\cdot\frac{1}{1+a}\cdot\frac{1}{2\sqrt{a}}\cdot\frac{1}{(x-1)^2}=\frac{x}{(2\sqrt{a}+2a\sqrt{a})(x^2-2x+1)},$$
and I get nowhere. Any tips on how to move on from $(1)?$
NOTE: I don't want other suggestions to solutions, I need help to sort out the arithmetic to the above from equation (1).
 A: Use change of variable
$$\theta=\arctan\sqrt{\frac{1+x}{1-x}}\in[0,\frac{\pi}{2}).$$
Then we have
$$x=\frac{\tan^2\theta-1}{\tan^2\theta+1}=\sin^2\theta-\cos^2\theta=-\cos2\theta.$$
Therefore
\begin{align}
\int\arctan\sqrt{\frac{1+x}{1-x}}dx&=-\int\theta\,d\cos 2\theta=-\theta\cos 2\theta+\int\cos 2\theta d\theta\\
&=-\theta\cos 2\theta+\frac{1}{2}\sin 2\theta+C\\
&=x\arctan\sqrt{\frac{1+x}{1-x}}+\frac{1}{2}\sqrt{1-x^2}+C.
\end{align}
A: By letting $x=\frac{z-1}{z+1}$ the given integral boils down to
$$ 2\int \frac{\arctan\sqrt{z}}{(z+1)^2}\,dz\stackrel{z\mapsto u^2}{=}4\int\frac{u\arctan u}{(u^2+1)^2}\,du\stackrel{\text{IBP}}{=}\frac{u-(1-u^2)\arctan u}{u^2+1}. $$
Your method leads to the same solution by noticing that
$$\frac{d}{dx}\,\arctan\sqrt{\frac{1+x}{1-x}}=\frac{\frac{d}{dx}\sqrt{\frac{1+x}{1-x}}}{1+\frac{1+x}{1-x}}=\frac{1-x}{2}\cdot\frac{\frac{d}{dx}\frac{1+x}{1-x}}{2\sqrt{\frac{1+x}{1-x}}}=\frac{1-x}{2}\cdot\frac{\frac{2}{(1-x)^2}}{2\sqrt{\frac{1+x}{1-x}}}$$
simplifies to $\frac{1}{2\sqrt{1-x^2}}$.
A: Hint: make the substitution $x = \cos \theta$ with $0 \le \theta \le \pi$.  Then $1 + x = 2 \cos^2(\theta/2)$, $1 - x = 2 \sin^2(\theta/2)$, so $\sqrt{\frac{1+x}{1-x}} = |\cot(\theta/2)|$.  But by the choice of range of $\theta$, $\cot(\theta/2)$ is positive.  So $\arctan \sqrt{\frac{1+x}{1-x}} = \frac{\pi}{2} - \frac{\theta}{2}$.  (Note this if you restrict to working with real numbers only this will work only for $x \in [-1,1)$; however, for $x > 1$ or $x < -1$, the square root is pure imaginary anyway.  If you want to integrate it anyway, you might need other arguments, for example $x = \cosh \theta$ for $x > 1$.)
A: Inverse trig identities are less familiar than regular trig identities. So perhaps if you invert this, so that regular trig identities would apply, you find something noteworthy:
$$\begin{align}
y&=\arctan\sqrt{\frac{1+x}{1-x}}\\
\tan(y)&=\sqrt{\frac{1+x}{1-x}}\\
\tan^2(y)&=\frac{1+x}{1-x}\\
\tan^2(y)-x\tan^2(y)&=1+x\\
-x-x\tan^2(y)&=1-\tan^2(y)\\
x&=\frac{\tan^2(y)-1}{\tan^2(y)-1}\\
&=\frac{\tan^2(y)-1}{\sec^2(y)}\\
&=\sin^2(y)-\cos^2(y)\\
&x=-\cos(2y)
\end{align}$$
So now you can invert that back, and actually $y=\frac{1}{2}\arccos(-x)$, much easier to work with if you know the antiderivative for $\arccos$.
A: Continuing from
$$D=x\cdot\frac{1}{1+\frac{1+x}{1-x}}\cdot\frac{1}{2\sqrt{\frac{1+x}{1-x}}}\cdot\frac{1}{(x-1)^2},$$
and observing that $(x-1)^2 = (1-x)^2$, you can take the two factors of $(1-x)$ from the final denominator and multiply them into the first two fractions. This gives
$$\begin{align}
D&=x\cdot\frac{1}{(1-x)+(1+x)}\cdot\frac{1}{2(1-x)\sqrt{\frac{1+x}{1-x}}}\\
&=x\cdot\frac12\cdot\frac1{2\sqrt{(1+x)(1-x)}}\\
&=\frac x{4\sqrt{1-x^2}}
\end{align}
$$
