I cannot calculate $\tan^{-1}(1+i)$ I use the formula below for inverse tangent function:
$$\tan^{-1}(z)= \frac {i} 2 \log \biggr( \frac {i+z}{i-z} \biggr)$$
I have written 
$$\tan^{-1}(1+i)= \frac {i} 2 \log \biggr( \frac {i+1+i}{i-1-i} \biggr)=  \frac {i} 2 \log (-2i-1)$$
The answer is $n\pi i , n\in \mathbb Z$ but I don’t know or I cannot see what is the argument of $-2i-1$
I know it is basic question but I couldn’t see how can I do
Thanks for helps
 A: To calculate the value of 
$$\log(-2i-1)$$
You can use the formula 
$$z=re^{i\theta}=x+iy$$
$$\log(z)=\log(r)+i(\theta+2n\pi)=\log\left(\sqrt{x^2+y^2}\right)+i\tan^{-1}(y/x)+2n\pi i$$
In your problem,
$$x=-1,y=-2$$
Then
$$\log(-2i-1)=\log(\sqrt{5})+i\tan^{-1}(2)+2n\pi i$$
The final answer will then be 
$$\frac{i}{2}(\log(\sqrt{5})+i\tan^{-1}(2)+2n\pi i)=\frac{\log(5)}{4}i-\frac{\tan^{-1}(2)}{2}-n\pi$$
A: The number $-1-2i$ is in the third quadrant, so its argument, taken in $[0,2\pi)$, is
$$
\theta=\pi+\arctan\frac{-2}{-1}=\pi+\arctan2
$$
(it would be wrong to say that the argument is $\arctan2$). Thus
$$
-1-2i=\sqrt{5}e^{i\theta}
$$
and its logarithms are
$$
\frac{1}{2}\log5+i\theta+2k\pi i
$$
and therefore
$$
\frac{i}{2}\left(\frac{1}{2}\log5+i\theta+2k\pi i\right)=-\theta-k\pi + \frac{i}{4}\log5=
-\frac{\pi}{2}-\frac{1}{2}\arctan2-k\pi + \frac{i}{4}\log5
$$
that can also be written as
$$
\frac{\pi}{2}-\frac{1}{2}\arctan2+k\pi+\frac{i}{4}\log5
$$
A: Let $x+iy=\tan^{-1}(1+i)$
$\tan(x+iy)=1+i$
$\dfrac{i\sin(x+iy)}{\cos(x+iy)}=i(1+i)=\dfrac{-1+i}1$
Apply Componendo and dividendo 
$$\dfrac{e^{i(x+iy)}}{e^{-i(x+iy)}}=\dfrac{1-1+i}{1-(-1+i)}\iff e^{2i(x+iy)}=\dfrac i{2-i}$$
$$\iff e^{-2y}\cdot e^{i(2x)}=\dfrac{i(2+i)}{2^2+1^2}=\dfrac{-1+2i}5$$
Take modulus, $e^{-2y}=\dfrac{\sqrt{(-1)^2+2^2}}5,-2y=-\dfrac12\ln5, y=?$
$$\implies e^{2ix}=\cos\dfrac{-1}{\sqrt5}+i\sin\dfrac2{\sqrt5}$$
Using atan2,  $$2x=2m\pi+\pi+\arctan\dfrac2{-1}=2m\pi+\pi-\arctan2$$  where $m$ is any integer
