Logarithm identity in complex analysis Does identity $\log(z^2)= 2\log(z)$ hold for $z \in \mathbb{C}\setminus \{0\}$?
First I tried:
$$2\log(z)= 2\log (r) + 2 i \operatorname{Arg}(z) + 4k\pi i, k \in \mathbb{Z}$$
$$\log(z^2)= \log(r^2 e^{2 i \phi})= 2\log(r) + i \operatorname{Arg}(z^2) + 2 k \pi i , k \in \mathbb{Z}$$
where $\operatorname{Arg}(z) \in (-\pi, \pi]$.
If we let $z=i$, then  $\log(i^2) = 0 + i\operatorname{Arg}(-1) + 2k \pi i= i \pi+ 2k \pi i$
and  $2 \log(i)=  i \pi  +4 k \pi i  $,
which is different.
On the other hand, I found  somewhere that $\log(z w )= \log(z) + \log(w)$, and if we apply it here, we get $\log(z^2)= 2 \log(z)$.
Now I don't know what to conclude and  in the case that identity holds, do we need some assumptions on the branch of logarithm? Does it hold  for the main branch i.e. $\operatorname{Log}$? I would be thankful for any help.
 A: Yes, you need some assumptions on the branch of the logarithm. The equation $\log\left(z^2\right) = 2\log(z)$ does not always hold.
Let's take your example and let $z=i$. Consider the branch defined by $\theta \in \left(\dfrac{3\pi}{4}, \dfrac{11\pi}{4}\right)$. We have
$$
\log\left(i^2\right) = \log(-1) = \log\left(1e^{i\pi}\right) = \log(1) + i\pi = i\pi
$$
Since $\dfrac{\pi}{2} \equiv \dfrac{5\pi}{2} \pmod{2\pi}$ (extending modulo congruences to real numbers), we have
$$
2\log(i) = 2\log\left(1e^{i5\pi/2}\right) = 2\left(\log(1) + i\dfrac{5\pi}{2}\right) = 5\pi i.
$$
Obviously, they are not equal, disproving the equation in question.
However, the equation does hold if $\theta \in \left(\dfrac{\pi}{4}, \dfrac{9\pi}{4}\right)$. I am sure you can prove that for yourself.

On the other hand, I found  somewhere that $\log(z w )= \log(z) + \log(w)$, and if we apply it here, we get $\log(z^2)= 2 \log(z)$.

For any branch of $\log(z)$ and if $z,w \neq 0$, then $\log(zw) = \log(z) + \log(w) + i2\pi n$ for some $n \in \mathbb{Z}$. The formula I quoted in gray above does hold for modulo $2\pi i$. Note that the $\exp$ complex function is periodic on $2\pi i$, meaning you would have to choose which logarithm to take.

Does it hold  for the main branch i.e. $\operatorname{Log}$?

If you mean "main branch" as in the principal branch $\theta \in (-\pi, \pi]$, then no. Take $z=-i$ as a counterexample.
