9
$\begingroup$

Why is the log of $x$ equal to the log of the absolute value of $x$ plus $i$ times $\pi$?

$$\log(x)=\log(|x|)+i\pi\text{, for }x < 0$$

Where does the $\pi$ come from? Is it from a logarithmic identity?

I know it sounds silly, but I was not able to find an answer from existing solutions: here, here, and here.

  • 2
    It comes from the identity $e^{i\pi} +1 = 0$, we rearrange this to be $\log(-1) = i \pi$, then for any negative number, $\log(-x) = \log( (-1) \cdot (x) ) = \log(-1) + \log(x) = i \pi + \log(x)$2017-01-09
  • 2
    Are you familiar with the [complex logarithm](https://en.wikipedia.org/wiki/Complex_logarithm#Definition_of_principal_value)?2017-01-09
  • 0
    Probably it comes from $e^{i\pi}=-1$2017-01-09
  • 0
    someday, when you study complex analysis, you will understand that what you said is only approximately true...2017-01-09
  • 0
    If the universe is only real numbers the log of a negative number makes no sense. But if the universe consists of complex numbers, then we have to define what $e^{i}$ could *possibly* mean. Long story short and hand waving $e^{i\pi} = -1$ and $e^{a+bi} = e^a(\cos b + i \sin b)$ [research euler's formula]. So $\log -1 = i\pi$ and $\log -|m| = \log -1 + \log |m| = i\pi + \log|m|$. So where did the $\pi$ come from. It came from discovering if $e^{a + bi} $ is going to mean *anything* it has to mean $e^a(\cos b + i \sin b)$ and now exponents and trig are eternally linked and $\pi$ shows up.2017-01-09
  • 1
    You asked "why is this not always true" but you linked to [a page that says the formula _is_ always true](http://www.wolframalpha.com/input/?i=is+(log(-%7Cx%7C))+equal+to+(log(%7Cx%7C)%2Bi*pi)).2017-01-09
  • 0
    @GEdgar I'm learning math on my own. Where's a good place to start learning about complex analysis?2017-01-09
  • 0
    @DavidK Haha yeah I misread what it said. Sorry about that, I fixed it.2017-01-09
  • 0
    So, I'm working with hypercomplex numbers and seeing that introducing negative reals produce a complex result, I was just wondering, how do you interpret this once your domain is say, the quaternions (or more)? I would think that the negative reals are no more related to i than j, k, etc.2018-11-16

3 Answers 3

15

$e^{πi} + 1 = 0$.

$e^{πi} = -1$.

$πi = \log(-1)$.

$\log(-1) + \log(|a|) = \log(-|a|)$.

$\log(-|a|) = \log(|a|)+iπ$.

4

Slightly tongue in cheek but partially seriously I'm going to say "magic".

What I mean is before we talk about $\ln -k$ for a negative number we have to define what on earth it could possibly mean to have $e^{m} = -k$. There is no "natural" meaning to that and mathematicians, in one sense, must contrive a meaning for it. If our universe is the real numbers then this is .... impossible. If $b > 0$ then $b^x > 1$ and $e^x$ being negative is simply impossible.

But what if our universe is the complex numbers. Then if $z = a + bi$ ($i^2 = -1$) then what could $e^{a+bi}$ possibly mean? After all we can't just "multiply $e$ by itself the square root of negative one times".

Well, we know for real numbers, $e^{x + y} = e^xe^y$ and $\frac {de^x}{dx} = e^x$. For this to still be true for complex numbers as well as for real numbers the only way to define $e^{z}$ where $z$ is a complex number, so that $e^{z+w} = e^ze^w$ and so that $\frac {d^z}{dz}$ the only possible way for that to stay true we have to define $e^{a+bi} = e^a(\cos b + i \sin b)$.

Okay. That was ... a lot of hand waving. But it works and if you study complex analysis it will be derived in great detail. BUT this means....

$e^{i\pi} = e^{0 + i\pi} = e^0(\cos \pi + i \sin \pi) = 1*(-1 + i*0) = -1$.

This is Euler's Formula, one of the most famous mathematical formula in history.

Suddenly $e^z$ being a negative number is not impossible. But if $e^z$ is negative then we need to have $e^{z} = e^{a + bi} = e^a(\cos b + i \sin b)$ so $\cos b + i \sin b$ is a negative number. That means $b = \pi$ . So $z = i \pi$.

So this means $\ln -1*x = \ln -1 + \ln x = i\pi + \ln x$.

And that's where $\pi$ comes from. When we define $e^{a+bi} = e^a(\cos b + i \sin b)$, exponents become thoroughly linked with trigonometric functions. As such, $\pi$ is an essential part of the inverse.

For the real numbers only and logs of positive real numbers only, we don't have to worry as $e^x = e^{x + 0*i} = e^x(\cos 0 + i \sin 0) = e^x(1 + i*0) = e^x= k$ and $\ln k = x$ and $\pi$ is not relevant.

4

The standard explanation would go like this:

Any complex number $z$ can be written in polar form: $$z = |z|e^{i\theta}.$$ So, if we want to define the complex logarithm, we do so as follows: $$\log (z) = \log(|z|e^{i\theta}) = \log(|z|) + \log(e^{i\theta}) = \log(|z|) + i\theta.$$ In particular, the logarithm of a negative real number $x$ can then be calculated as $$\log (x) = \log(|x|e^{i\pi}) = \log(|x|) + \log(e^{i\pi}) = \log(|x|) + i\pi.$$

However, this explanation is not sufficient and the logarithm as presented is NOT a well-defined function. The angle $\theta$ is, well, an angle, and hence only defined up to multiples of $2\pi$: $$|z|e^{i\theta} = |z|e^{i(\theta+k2\pi)}$$ for all $k \in \mathbb{Z}$. Therefore, the complex logarithm is only defined up to multiples of $2\pi i$ !

For example: $$\log (x) = \log(|x|e^{i\frac{3}{2}\pi}) = \log(|x|) + \log(e^{i\frac{3}{2}\pi}) = \log(|x|) + i\frac{3}{2}\pi,$$ or maybe $$\log (x) = \log(|x|e^{-i\frac{177}{2}\pi}) = \log(|x|) + \log(e^{-i\frac{177}{2}\pi}) = \log(|x|) - i\frac{177}{2}\pi.$$ But clearly $\pi \neq \frac{3}{2}\pi \neq -\frac{177}{2}\pi$. The point is: the complex logarithm is not a function, but what we call a multivalued function. To turn it into a proper function, we must restrict what $\theta$ is allowed to be, for example $\theta \in (-\pi,\pi]$. This is called the principal complex logarithm and is usually denoted by $\operatorname{Log}$ (capital L).

Technically, it doesn't matter to what range you restrict $\theta$, as long as the resulting logarithm is a proper function (not a multivalued function) and you are consistent in your restriction of $\theta$. For example, the following "proof" can be obtained if you're sloppy: \begin{align} e^{\pi i} = -1 & \implies (e^{\pi i})^2 = (-1)^2 & \text{ (square both sides)}\\ & \implies e^{2\pi i} = 1 & \text{ (calculate the squares)}\\ & \implies \log (e^{2\pi i}) = \log(1) & \text{ (take the logarithm)}\\ & \implies 2\pi i = 0 & \text{ (calculate the logarithms)} \end{align} Clearly this is wrong!