Principal branch of logarithm I need to compute $\log(1+i)$ and $\text{Log}(1+i)$, $\text{Log}$ meaning the principal branch.
What I do is to express $(1+i)$ in polar coordinates, then equate it with $$\sqrt {2}(\cos \pi/4+ i\sin \pi/4)= \sqrt{2}\mathrm{e}^{\frac{\pi i}{4}}$$
Is this true? Can I now take $\log \sqrt{2}\mathrm{e}^{\frac{\pi i}{4}}=\frac{\sqrt{2}\pi i}{4}$?
And now $\text{Log}(1+i)=\log|\sqrt{2}|+\frac {\pi i}{4}+ 2\pi k$?
Can someone please tell what is wrong with my computation? What I am really confused about is how different it is to compute the principal brach and the other
Help would be appreciated!
 A: The complex logarithm $\log(z)$ is defined as the inverse function to the exponential function, i.e. it satisfies $e^{\log(z)} \equiv z$.  Since $re^{i\theta} = re^{i\theta + 2\pi k i}$ for all $k\in\mathbb{Z}$ we have that any choice of an integer $k$ in $$\log(re^{i\theta}) = \log(r) + i\theta + 2\pi k i$$ is a valid inverse to the complex exponential. The logarithm is therefore a multivalued function and each value of $k$ defines what we call a different branch of the logarithm. The $k$'th branch is usually defined such that $\text{Im}[\log(z)] \in (\pi(2k-1),\pi(2k+1)]$. The principal branch corresponds to the choice $k=0$ which means that we just have
$$\text{Log}(z) = \log(|z|) + i\text{arg}(z)$$

The general expression for $\log(1+i)$ is therefore the multivalued function
$$\log(1+i) = \log(|1+i|) + i\text{arg}(1+i) + 2\pi k i = \log\sqrt{2} + \frac{\pi i}{4} + 2\pi i k$$
The expression for the principal branch follows by taking $k=0$ in the expression above giving us
$$\text{Log}(1+i) = \log(|1+i|) + i\text{arg}(1+i) = \log\sqrt{2} + \frac{\pi i}{4}$$
