The manipulation of logarithms in $(*)$ doesn't hold over the complex numbers. I'm not deleting it, as the answers I got, and the rest of my post make no sense without it, but I also don't want to confuse anyone who may also be new to complex logarithms.
I know the integral upto addition of a constant is $\tan^{-1}(x).$ And, in fact it's not hard to show. However, I'm curious about the case where you start from $1/(1+x^2),$ and without knowing $d/dx\tan^{-1}(x)=1/(1+x^2)$ solving $$\int \frac{1}{1+x^2}.$$
Let us work modulo constants, so we need not write them. Then $$\int\frac{1}{1+x^2}=\int\left(\frac{1}{2i(x-i)}-\frac{1}{2i(x+i)}\right)$$ $$=\frac{1}{2i}\left(\ln(x-i)-\ln(x+i)\right)=\frac{\ln\left(\frac{x-i}{x+i}\right)}{2i}.\text{ }(*)$$ It should be clear now that our result is purely real, as $|(x-i)/(x+i)|=1.$ Moreover, it is clear that $$\ln\left(\frac{x-i}{x+i}\right)=i\cdot\text{argument}\left(\frac{x-i}{x+i}\right).$$
Now, I know that $$\frac{x-i}{x+i}=\frac{(x-i)^2}{{x^2+1}}=\frac{x^2-1}{{x^2+1}}-\frac{2xi}{{x^2+1}}.$$
This tells us $$\tan\left(\text{argument}\left(\frac{x-i}{x+i}\right)\right)=-\frac{2x}{x^2-1}.$$ So we can deduce that $$\int\frac{1}{1+x^2}=\frac{1}{2}\tan^{-1}\left(-\frac{2x}{x^2-1}\right).$$
From here I'm not quite sure how to proceed though. How would one show that modulo constants $$\tan(x)^{-1}=\frac{1}{2}\tan^{-1}\left(\frac{-2x}{x^2-1}\right)?$$
I guess it is clear if you differentiate both, but that presumes we already had $\tan^{-1}(x)$ in mind.
$$\tan^{-1}(x)=\frac{1}{2}\tan^{-1}\left(\frac{-2x}{x^2-1}\right)?$$
Let $$\tan^{-1}\left(\frac{-2x}{x^2-1}\right)=\alpha$$
That is $$ \tan \alpha = \frac{2x}{1-x^2} = \frac {2\tan (\alpha /2)}{1-\tan ^2 (\alpha /2)}$$
With $$x= \tan (\alpha /2)$$ we get $$ \tan ^{-1} (x) = \alpha /2$$
Which is what we wanted to prove.