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?

Let $x=1$ and evaluate this relationship.
– Mason May 01 '18 at 03:53