why is $\tan^{-1}$ equal to a sum of logarithms I can integrate the function $\frac{1}{x^2 + 1}$ two different ways.
$\int\frac{dx}{x^2 + 1} = \arctan(x) + C_1$
or using partial fractions:
$\int\frac{dx}{x^2 + 1} = \frac{i}{2} \int ( \frac{1}{x+i} - \frac{1}{x-i})~ dx = \frac{i}{2} \ln(x+i) - \frac{i}{2} \ln(x-i) + C_2$
Is there an easier or more intuitive way to see that the inverse tangent is a sum of logarithms (or differs from by a constant from a sum of logarithms)?
 A: Given $\tan \theta = x$ we have
$$
\frac{e^{i\theta}-e^{-i\theta}}{i(e^{i\theta}+e^{-i\theta})} = x
$$
so solving this for $e^{i\theta}$ is solving a quadratic equation.  Once we have $e^{i\theta}$ we take the log and divide by $i$ to get $\theta$.  This is why the $\arctan$ can be written in terms of complex logarithms.
$$
\arctan(x) = \theta = \frac 1{2i}\log\frac{1+ix}{1-ix}
$$
A: An intuition somewhat similar to the $\exp$ function versus $\,\cos,\,\sin$ (distinguishing the even and odd terms of the Taylor expansion of $\,\exp(ix)\,$) is obtained using the Taylor expansion for $|z|<1$ of :
$$\log(1+z)=z - \frac{z^2}2+\frac{z^3}3-\frac{z^4}4+\frac{z^5}5-\cdots$$
so that for $|x|<1$ :
$$-i\,\log(1+ix)=x - \frac{ix^2}2-\frac{x^3}3+\frac{ix^4}4+\frac{x^5}5-\cdots$$
using $\;\displaystyle \frac{-i\log(1+ix)+i\log(1-ix)}2\;$ to keep only the odd powers returns :
$$\tag{1}\boxed{\frac{\log(1+ix)-\log(1-ix)}{2\,i}=x -\frac{x^3}3+\frac{x^5}5-\cdots=\arctan(x)}$$
(I wrote it this way instead of your $\,x+i,\,x-i\,$ version because of the sign difference adding $\pm\dfrac{\pi}2$ as plotted by Alpha that disappear after differentiation)

A simpler way to obtain $(1)$ is to start with the classical (for $\,x$ and $y\,$ real with $\,x>0$) :
$$x+iy=\sqrt{x^2+y^2}\ e^{\large{\,i\arctan\frac yx}}$$
replace $\,(x,y)\,$ by $\,(1,x)\;$ and take the logarithm to get for $x$ real :
$$\tag{2}\boxed{\log(1+ix)=\frac 12\log(1+x^2)+i\,\arctan(x)}$$
Keep only the imaginary part and conclude!
A: You have to be careful in using complex logarithms. If you are using the principal branch of logarithm then the connection between logarithm  and $\arctan$ is as follows: if $z=re^{i\theta}$ with $-\pi <\theta <\pi$ then $log \,z=\log |z|+i\theta$ and $\theta =\arctan \frac y x$ where $x$ and $y$ are the real and imaginary parts of $z$. In this case note that $|x-i|=|x+i|$ so the real part cancels out. 
