About the relation $\tan^{-1} x= 2\tan^{-1}\left(x+\sqrt{1+x^2}\right)-\frac\pi2$ It is well known that 
$$\int\frac{1}{1+x^2}\,\mathrm{d}x=\tan^{-1}x+C \tag{1}$$ 
However, I integrated this differently and got an unusual result. 
Suppose we make the substitution $x=\sinh\theta$ and $\mathrm{d}x=\cosh\theta\,\mathrm{d}\theta$ so the integral becomes $$\int\frac{\cosh\theta}{\cosh^2\theta}\,\mathrm{d}\theta=\int\frac{1}{\cosh\theta}\,\mathrm{d}\theta \tag{2}$$
By the definition of $\cosh\theta$, we can rewrite this as $$\int\frac{2e^\theta}{e^{2\theta}+1}\,\mathrm{d}\theta=2\tan^{-1}e^\theta+C \tag{3}$$
Using the fact that $e^\theta=\cosh\theta+\sinh\theta$, we get $e^\theta=x+\sqrt{1+x^2}$, so the answer is then $$2\tan^{-1}\left(x+\sqrt{1+x^2}\right)+C \tag{4}$$ 
Equating $(4)$ with $(1)$, we have $$2\tan^{-1}\left(x+\sqrt{1+x^2}\right)+C=\tan^{-1}x \tag{5}$$
Plugging in $x=0$, we find $C=-\frac\pi2$. We now have the following strange relationship

$$\tan^{-1} x= 2\tan^{-1}\left(x+\sqrt{1+x^2}\right)-\frac\pi2 \tag{$\star$}$$
  This leads me to wonder: Why is this true geometrically, and does this relationship extend into the complex plane?


We need to be very careful with principal values ,
Let arccot$(x)=2y\implies x=\cot2y$ and $0<2y<\pi$
$x+\sqrt{1+x^2}=\dfrac{\cos2y+1}{\sin2y}=\cot y$ as $y\ne\dfrac\pi2$
$\implies2\tan^{-1}(x+\sqrt{1+x^2})=2\left(\dfrac\pi2-\cot^{-1}(x+\sqrt{1+x^2})\right)=\pi-2y$
and $\tan^{-1}x=\dfrac\pi2-\cot^{-1}x=\dfrac\pi2-2y$
