# Complex number $\ln(i)$ into rectangular form?

I am going through the Mathematics of the DFT book by Julius O. Smith III.

One of the questions ask the following:

How would you convert the complex number $\ln(i)$ into the form $x + yi$, where $x$ is the real part and $y$ is the imaginary part?

I am stumped.

• Do you know Euler's formula ($e^{ix} = \dotsb$)? – Daniel Fischer Aug 4 '13 at 21:46
• The definition of the logarithm is $\ln z=\ln |z|+i \arg z$. – user1337 Aug 4 '13 at 22:07

Remember that any non-zero complex number $z = x+iy$ can be written in the form $z = r e^{i\theta}$, where $r = |z|$ and $\theta$ is the "argument" of $z$, i.e. the angle between $z$ and the positive real axis when we identify $\mathbb C$ with $\mathbb R^2$. Since $e^{i\theta} = \cos\theta + i\sin\theta$, this is just writing $z$ in polar coordinates. $\theta$ is a priori defined only up to a multiple of $2\pi$, but we can get a unique value of $\theta$ by requiring $\theta\in [0,2\pi)$.

Now, we can also write $re^{i\theta} = e^{i\theta + \ln r}$. So, it is natural to define the logarithm of $z$ as $\ln z = i\theta + \ln r$, so that it cancels the exponential.

In the case $z= i$, we have $r = |i| = 1$ and $\theta = \pi/2$, since $i$ is on the positive imaginary axis, which makes a right angle with the positive real axis. Therefore $\ln(i) = i\pi/2 + \ln 1 = i\pi/2$.

• (+1) Even $0=0e^{i0}$. There is no uniqueness when writing $z=re^{i\theta}$ since $z=re^{i(\theta+2\pi)}$, so the fact that any $\theta$ works for $0$ is not any worse than for any other $z\in\mathbb{C}$. – robjohn Aug 4 '13 at 22:07
• It is worse since the set of such $\theta$ is discrete for $r\neq 0$. The map $\mathbb{R}\times\mathbb{R}\rightarrow \mathbb{C}$, $(r,\theta)\mapsto re^{i\theta}$ is smooth away from $r=0$, but singular at points where $r=0$. – Kevin Ventullo Aug 4 '13 at 23:14

By using Euler's formula, here is an example:

$$e^{(i*\frac{\pi}{2})}=i \tag{1}$$

$$ln(e^{(i*\frac{\pi}{2})})=ln(i) \tag{2}$$

$$ln(e^{(i*\frac{\pi}{2})})=i*\frac{\pi}{2} \tag{3}$$

$$ln(i)=i*\frac{\pi}{2} \tag{4}$$