Evaluation of $\int_{-2}^{-1} \tan^{-1}\sqrt{\frac{x+1}{x-1}} dx$ Evaluation of $$\int_{-2}^{-1} \tan^{-1}\sqrt{\frac{x+1}{x-1}} dx$$
requires a special care when done by hand. The question is: How to do it and what is the right answer.
 A: Rewrite the function as
$$y = \tan^{-1}\sqrt{\frac{x+1}{x-1}} \implies x = 1 + \frac{2}{\tan^2y-1}$$
Then we can use the graphical inverse function trick, have a look at this box on Desmos. I have posted the image below for convenience.

The integral of the original function is related to the integral of this function by
$$\int_{-2}^{-1}\tan^{-1}\sqrt{\frac{x+1}{x-1}}dx = 2\cdot \frac{\pi}{6}+\int_0^{\frac{\pi}{6}}1 + \frac{2}{\tan^2y-1} dy$$
which is the area of the box minus the area of the inverse function. The last integral is added instead of subtracted because it is already negative. It is easy enough to do
$$= \frac{\pi}{3}-\int_0^{\frac{\pi}{6}}\frac{\cos^2y+\sin^2y}{\cos^2y-\sin^2y}dy = \frac{\pi}{3}-\int_0^{\frac{\pi}{6}} \sec 2y ~dy = \frac{\pi}{3}-\log\sqrt{2+\sqrt{3}}$$
A: $$\int\limits_{-2}^{-1}\arctan\sqrt{\frac{x+1}{x-1}}dx=x\arctan\sqrt{\frac{x+1}{x-1}}|_{-2}^{-1}-\int\limits_{-2}^{-1}x\cdot\frac{\left(\sqrt{\frac{x+1}{x-1}}\right)'}{1+\left(\sqrt{\frac{x+1}{x-1}}\right)^2}dx$$
Can you end it now?
A: @StephenMontgomery-Smith had almost the right substitution. With $x=\color{blue}{\boldsymbol{-}}\cosh(2a)$ the problem reduces to integrationn by parts with $u=\arctan(\tanh a),\,v=\cosh(2a)$: $$\begin{align}\int_0^{\tfrac12\operatorname{arcosh}2}\arctan(\tanh a)2\sinh(2a)da&=[\cosh(2a)\arctan(\tanh a)-a]_0^{\tfrac12\operatorname{arcosh}2}\\&=\tfrac{\pi}{3}-\tfrac12\ln(2+\sqrt{3})\\&\approx0.388718602734189.\end{align}$$I wouldn't normally quote that many significant figures, but numerical integration confirms all of them.
A: By letting $\;t=\sqrt{\cfrac{x+1}{x-1}}\;,\;$ we get $\;x=\cfrac{t^2+1}{t^2-1}\;$ and $$\int\limits_{-2}^{-1}x\cdot\frac{\left(\sqrt{\frac{x+1}{x-1}}\right)^\prime}{1+\left(\sqrt{\frac{x+1}{x-1}}\right)^2}dx=\int\limits_{\sqrt{\frac{1}{3}}}^0\frac{t^2+1}{t^2-1}\cdot\frac{1}{1+t^2}dt=\\= \int\limits_{\sqrt{\frac{1}{3}}}^0\frac{1}{t^2-1}dt=\int\limits_0^{\sqrt{\frac{1}{3}}}\frac{1}{1-t^2}dt=\frac{1}{2}\ln\left(\frac{1+t}{1-t}\right)\;\bigg|_0^{\sqrt{\frac{1}{3}}}=\\=\frac{1}{2}\ln\left(\frac{1+\frac{\sqrt{3}}{3}}{1-\frac{\sqrt{3}}{3}}\right)=\frac{1}{2}\ln\left(\frac{3+\sqrt{3}}{3-\sqrt{3}}\right)=\frac{1}{2}\ln\left(2+\sqrt{3}\right)\;.$$
Hence,
$$\int\limits_{-2}^{-1}\arctan\sqrt{\frac{x+1}{x-1}}dx=\\=x\arctan\sqrt{\frac{x+1}{x-1}}\;\bigg|_{-2}^{-1}-\int\limits_{-2}^{-1}x\cdot\frac{\left(\sqrt{\frac{x+1}{x-1}}\right)^\prime}{1+\left(\sqrt{\frac{x+1}{x-1}}\right)^2}dx=\\=2\arctan\sqrt{\frac{1}{3}}-\frac{1}{2}\ln\left(2+\sqrt{3}\right)=\\=2\arctan\frac{\sqrt{3}}{3}-\frac{1}{2}\ln\left(2+\sqrt{3}\right)=\frac{\pi}{3}-\frac{1}{2}\ln\left(2+\sqrt{3}\right)\;.$$
A: Note that when $x\in (-\infty, -1] \cup (1,\infty)$,
$$\frac{d}{dx} \tan^{-1} \sqrt{\frac{x+1}{x-1}}=-\frac{1}{2|x|} \frac{1}{\sqrt{x^2-1}}.$$
Next the integration by parts leads to  $$I=\int_{-2}^{-1} \tan^{-1} \sqrt{\frac{x+1}{x-1}}.~1 ~dx=\left . x \tan^{-1} \sqrt{\frac{x+1}{x-1}}\right|_{-2}^{-1}-\frac{1}{2}\int_{-2}^{-1} \frac{dx}{\sqrt{x^2-1}}.$$
$$\implies I=\frac{\pi}{3}-\frac{1}{2} \int_{1}^{2} \frac{dz}{\sqrt{z^2-1}}=\frac{\pi}{3}-\ln\sqrt{2+\sqrt{3}}.$$
