How to derive the value of $\log(-1)$? My book gives the following relation which I cannot derive myself. How to approach it?
$$\log(-1)=(2n+1)\pi i, n=0,\pm1,... $$
The definition of logarithm I am using is, $\log z$ is any complex number  $ w$ such that $e^w=z$.
 A: Hint
Using Euler identity, for integer $n$, $$\cos (  (2 n+1)\pi)+i \sin (  (2 n+1)\pi)=e^{i(2 n+1)\pi}=-1$$
A: On the complex plane, $e^z = e^{z+2\pi ki}$ for any integer $k$. This is a bit funny, right? While the equality holds, we see that $z \ne z + 2\pi ki$ ! So if we try the inverse of the exponential function, it's a bit ambiguous as to what number we get back. Does $\log e^z = z$ or does $\log e^z = z + 2\pi i$? 
The logarithm can return different complex numbers! It appears that the complex logarithm, is multi-valued. Here's a common definition:
$$\log z = \log |z| + i \arg z +i2\pi k$$
Where $\arg z$ returns the argument or angle of the complex number $z$. Note that the final term $i2\pi k$ accounts for the infinitely many values that can be returned. If we let $z=re^{i\phi}$ and substitute into the line above, we get
$$\log z = \log r + i\phi +i2\pi k$$
Then
$$\log (-1) = \log |-1| + i(2k+1)\pi = i(2k+1)\pi$$
Now this multi-valued business can be inconvenient, so we restrict the outputted values. This is called choosing a branch. A common, or principal branch is where $\phi \in [0,2\pi)$. Another common one is where $\phi \in [-\pi,\pi)$. Note that the branch we choose covers the plane entirely, and turns the multivalued function into a single valued one. Choosing the branch $\phi \in [0,2\pi)$, we can then say
$$\log_0 z = \log r + i\phi$$
where I use a subscript $0$ to denote my chosen branch. Then
$$\log_0( -1) = \log |-1| + i\pi = i\pi$$
