Hacker News new | ask | show | jobs
by kazinator 713 days ago
Yes, it does have to do with exponentiating e, though.

e^(iπ) is (e^i)^π.

There is a concrete complex number e^i:

  [1]> (exp 1)
  2.7182817
  [2]> (expt (exp 1) #c(0 1))
  #C(0.54030234 0.84147096)
See, it's around 0.54 + 0.84i. It's on the unit circle.

When you raise this number to pi, you get -1.

  [3]> (expt * pi)
  #C(-1.0 1.2776314E-7)
This means it's the pi-th root of -1; let's try it:

  [4]> (expt -1 (/ pi))
  #C(0.5403023058681397174L0 0.84147098480789650666L0)
and e must be the i-th root of this:

  [5]> (expt * (/ #c(0 1)))
  #C(2.7182818284590452354L0 -4.6847612413106414363L-20)
Yes; it is all literally exponentiation which we can approximate with concrete floating-point numbers that know nothing about the formula we are exploring.
1 comments

> There is a concrete complex number e^i:

Yes, that is true, of course. But consulting a Lisp REPL merely demonstrates that it is true. It does not explain why it is true.

You'd get further, pedagogically speaking, by pointing out that (e^i)^i = e^(i*i) = e^(-1) = 1/e, and so e^i is a number that is in some sense "half way" between e and 1/e when you are exponentiating. As an analogy, consider:

e^(1/2) * e^(1/2) = e^(1/2 + 1/2) = e^1 = e

as a demonstration that e^(1/2) is a number that is in some sense "half-way" between 1 and e when you are multiplying, a.k.a. the square root of e. But that still leaves unanswered the question of what "half-way" means when exponentiating rather than multiplying.

Obtaining an intuition for what it means to use an imaginary exponent takes work.

Exponents give us expoential decay/growth in the real number line, but periodicity in the imaginary domain, which is strange.

In physics, this lets us analyze decaying or amplifying oscillations in a unified way. (Laplace transform and all that.)