# Arctan in complex logarithm form

I tried to formulate the arctan function in a complex logarithmic form by integrating its derivative by using partial fraction decomposition. And I was wondering if my attempt is valid or not:

Using $\frac{d}{dz}\arctan(z) = \frac{1}{1+z^2}$ one knows that $\int \frac{1}{1+z^2} dz =\arctan(z)$ Using partial fraction decomposition one gets $\frac{1}{1+z^2} = \frac{1}{(z-i)(z+i)} = \frac{1}{2i}\frac{1}{(z-i)} - \frac{1}{2i}\frac{1}{(z-i)}$. Then one can integrate: $\int \frac{1}{1+z^2} dz = \frac{1}{2i} \int \frac{dz}{(z-i)} - \frac{1}{2i} \int \frac{dz}{(z+i)} = \frac{\log(z-i) -\log(z+i)}{2i}$

So my result would be $\arctan(z) = \frac{\log(z-i) -\log(z+i)}{2i}$. Is this correct?

Any comment or advice would be highly appreciated!

• You missed an integration constant, substitute $z=0$ to get it. – gammatester Jan 13 '15 at 10:43
• In the partial fraction decomposition, there is a minor typo, the $-\frac{1}{2i}\frac{1}{(z-i)}$ term should be $-\frac{1}{2i}\frac{1}{(z+i)}$ – Crystal Oct 23 '19 at 0:33
• You are losing generality. If $\log 1=0$, then $\frac{d}{dz}\log z=\frac{1}{z}$ unless $z\in\mathbb{R}_0^{-}$ (the principal branch is discontinuous there). – BIRA Aug 27 '20 at 22:27

## 3 Answers

As @gammatester mentioned, you forgot an integration constant. But what value should this integration constant be? We do know that we want $\arctan{(0)} = 0$. Then we would have

$$\frac{\log{(-i)} - \log{(i)}}{2 i} + C = 0$$

What is $\log{(-i)}$? Is $-i = e^{-i \pi/2}$, or $e^{i 3 \pi/2}$, or something else? Regardless, the question is, is the difference between the logs then $i \pi$ or $-i \pi$?

Here we note that the principal value of the arctan is defined with respect to a branch cut $-i z \in (-\infty,-1] \cup [1,\infty)$. Thus, we would take $-i = e^{-i \pi/2}$ and the difference between the logs to be $-i \pi$; thus, $C=\pi/2$. Thus

$$\arctan{z} = \frac1{2 i} \left [\log{(z-i)} - \log{(z+i)} - i \pi \right ] = \frac{i}{2} \log{\left ( \frac{i+z}{i-z}\right )}$$

$$\text{arctanh}(iz)=\sum_{i=0}\frac{(iz)^{2k+1}}{(2k+1)!}$$

but $$i^{2k+1}=i^{2k}i=\begin{cases}-i&\text{if }k\text{ is odd}\\i&\text{if }k\text{ is even},\\\end{cases}$$ then, $$\sum_{i=0}^\infty \frac{(iz)^{2k+1}}{(2k+1)!}=i\sum_{i=0}^\infty \frac{(-1)^kz^{2k+1}}{(2k+1)!}=i\arctan(z)$$ and thus $$\arctan(z)=\frac{\text{arctanh}(iz)}{i}.$$

But $\text{arctanh}(z)=\frac{1}{2}\ln\left(\frac{1+z}{1-z}\right)$ and so, we conclude that, $$\arctan(z)=\frac{1}{2i}\ln\left(\frac{1+iz}{1-iz}\right)=\frac{\ln(1+iz)-\ln(1-iz)}{2i}.$$

• I corrected it, tks :-) – idm Jan 13 '15 at 11:48
• Yes, that looks better. – Ron Gordon Jan 13 '15 at 11:52
• $\sum_{i=0}^\infty$ doesn't make much sense there, as $i$ is a constant... – BIRA Aug 27 '20 at 22:29

@gammatester: Yes, you are right! I missed that one! So using

(1) $$e^{i\frac{\pi}{2}} = \cos(\frac{\pi}{2}) + i\sin(\frac{\pi}{2}) = i$$

in my formula

$$\frac{\log(z-i) - \log(z+i)}{2i} + C ~~~~~~~~~$$ for $$z=0$$

I get $$C=\frac{\pi}{2}$$.

Then using (1) again I can rewrite this as

$$\frac{\log(z-i) - \log(z+i)}{2i} - i \cdot \log(i) =\frac{\log(z-i) +\log(i) - (\log(z+i)-\log(i))}{2i}$$

By applying logarithm laws I then get the same result as @idm !

$$\frac{\log(z-i) +\log(i) - (\log(z+i)-\log(i))}{2i} = \frac{\log(1+iz) - \log(1-iz)}{2i} = \arctan(z)$$

Many Thanks to both of you! :)