# $\arctan x=\frac{1}{2}i[\ln(1-ix)-\ln(1+ix)]$

In wikipedia it says,

$$\arctan x=\frac{1}{2}i[\ln(1-ix)-\ln(1+ix)]$$

I want to now why is this true and what does a logarithm of a complex number even mean. I'm guessing that if I use the Taylor series I can prove this result.

Thanks

• I also think Taylor works, but I found this would be a bit boring.. maybe there is a more creative/insightful approach. Jun 12, 2016 at 21:11
• If we are willing for a while to operate formally, we can write $1+x^2=(1+ix)(1-ix)$, then express $\frac{1}{(1+ix)(1-ix)}$ as $\frac{A}{1-ix}+\frac{}{1+ix}$ using partial fractions machinery, and integrate. Jun 12, 2016 at 21:16
• If you want the link with the complex logarithm, see en.wikipedia.org/wiki/… and en.wikipedia.org/wiki/Atan2. It is what do you need to find the proof. Jun 12, 2016 at 21:28

## 4 Answers

As $e^{i\varphi} = \cos\varphi + i\sin\varphi$ we get $$\sin \varphi = \frac{e^{i\varphi} - e^{-i\varphi}}{2i}, \quad \cos\varphi = \frac{e^{i\varphi} + e^{-i\varphi}}{2}$$ which leads to $$\tan \varphi = \frac{e^{i\varphi} - e^{-i\varphi}}{i(e^{i\varphi} + e^{-i\varphi})}.$$ Let $\tan \varphi = x$, then $$\frac{e^{i\varphi} - e^{-i\varphi}}{e^{i\varphi} + e^{-i\varphi}} = ix$$ and solving it we find that $$e^{i\varphi} = \sqrt{\frac{1 + ix}{1 - ix}}$$ which leads us to $$\arctan x = \varphi = \frac{1}{i}\ln\sqrt{\frac{1 + ix}{1 - ix}} = \frac{i}{2}\left[\ln(1 - ix) - \ln(1 + ix)\right].$$

• @Ahmed S. Attaalla I've edited my post, does it look clear now? Jun 12, 2016 at 21:33
• Yes thank you. It is clear now. Jun 12, 2016 at 21:33
• Can we do this backwards? Ie NOT already assuming Euler's formula, NOR the complex definition of sine etc. I start with only that there is an obvious link between arctan and complex logarithms through integrating 1/(1+x^2) and its 2 equivalent complex factors. This gets me to the equation in the title. Rearranging gets me to the penultimate equation (above) with the square root of the ratio of complex numbers. However in my quest to move backwards toward Euler's formula from here, I cannot get to the previous equation where the ratio of the complex exponentials.= ix. How should I move on?
– Drex
Apr 18, 2020 at 20:42

We know

$$\int \frac{dx}{1+x^2}=\arctan(x) +c_1$$

Now notice $$\int \frac{dx}{1+x^2}=1/2\int \frac{1}{1+ix}+\frac{1}{1-ix} dx$$ $$=\frac{1}{2i}[\ln(1+ix)-\ln(1-ix)]+c_2$$

Expanding the fraction $\frac{1}{2i}$ with i and comparing both expressions results in: $$\arctan(x)=\frac{i}{2}[\ln(1-ix)-\ln(1+ix)]+c_3.$$

Plug in $x=0$ to determin $c_3=0$.

There is a nice geometrical interpretation of this too. Sadly I'm on mobile so I can't include an image right now but it works like this:

When a complex number is represented in an Argand diagram (i.e. as a point on the plane where the $x$-coordinate is the real part and the $y$-coordinate is the imaginary part) one can consider the distance from the origin (the modulus) and the angle anti-clockwise from the real ($x$) axis to the number (that is, the line from the origin to the number), called the argument. When a number is below the real axis we consider the angle as negative rather than bigger than $\pi$.

Consider how complex exponential works: $$\mathrm e^{x+\mathrm i y} = \mathrm e^x(\cos y + \mathrm i \sin y).$$ Thus we see that the logarithm of a complex number should be a complex number where the real part is the logarithm of the modulus and the imaginary part is the argument. We ignore the problems where there are multiple values this could be and will say that the imaginary part is between $-\pi$ and $\pi$. It will turn out we don't need to think about what e.g. $\log(-1)$ should be.

Now we come back to the identity in question. First we let $x>0$ be a real number (certainly the identity is true if $x=0$) and we rearrange the right hand side to get: $$\arctan x = \frac1{2\mathrm i}\left[\log(1+\mathrm i x) - \log(1-\mathrm i x)\right].$$

Draw an Argand diagram. Label the origin $O$ and now label the point $(1,x)$ (corresponding to $1+\mathrm i x$) by $A$ and the point $(1,-x)$ by $B$. Finally label the point $(1,0)$ by $C$.

We see that the real parts of both logarithms must be the same (as $OA$ and $OB$ have the same length). The imaginary part of the first logarithm is the angle $\widehat{COA}$ and the imaginary part of the second is negative the angle $\widehat{BOC}$. Thus the difference of the logarithms will be the number $2\mathrm i \theta$ where $\theta$ is the angle $\widehat{COA}$ (equal to $\widehat{BOC}$ by symmetry). Thus the right hand side of the equation is equal to $\theta$. However we consider the right triangle $ACO$ and see that $$\tan \theta = \frac{|AC|}{|OC|}=x.$$

Thus we have proven the identity for positive $x$. The same reasoning follows for the identity for negative $x$.

If $\arctan x=y,$

$$\ln(1-ix)-\ln(1+ix)=\ln\dfrac{1-ix}{1+ix}=\ln\dfrac{1-i\tan y}{1+i\tan y}=\ln(e^{-2iy})=-2iy$$

• I don't see how all those tangents turned into an exponential. Can you please explain. Jun 13, 2016 at 5:00
• @AhmedS.Attaalla, $$\dfrac{1-i\tan y}{1+i\tan y}=\dfrac{\cos y-i\sin y}{\cos y+i\sin y}=\dfrac{e^{-iy}}{e^{iy}}=?$$ Jun 13, 2016 at 5:03