Why does Im($(-1/10^n)^{-1/10^n}$) turn into the digits of pi as integer n gets larger?

73 Views Asked by At

$(-.001)^{-.001} \approx 1.007 - .0031634i$, $(-.000001)^{-.000001} \approx 1.000014 - .00000314164$, and $(-.000000001)^{-.000000001} \approx 1.0000000207 - .00000000314159271i$. Notice that as we approach 0 from the negative direction for $x^x$ by magnitudes of ten, the imaginary component more closely approximates pi, divided by an increasing power of ten. Why does this happen?

2

There are 2 best solutions below

0
On

For $r>0$ and small, we have principal value $$ (-r)^{-r} = e^{-r\ln r} \cos(r\pi)-i e^{-r\ln r}\sin(r\pi) . $$ The imaginary part is $$ -e^{r\ln r}\sin(r\pi) $$ Now, for $r$ very close to zero, we have $r\ln r \approx 0$ and $e^{r\ln r} \approx 1$ and $\sin(r\pi) \approx r\pi$. And of course, this $r\pi$ is what you are seeing when $r$ is a negative power of $10$.

0
On

Recall Euler's formula:

$$e^{i\theta} = \cos\theta + i\sin\theta$$

This allows us to define the logarithm of a negative or complex number:

$$\log (\cos\theta + i\sin\theta) = i\theta$$ $$\log (r(\cos\theta + i\sin\theta)) = \log r + i\theta$$

So, if $a < 0$, then $\log(a) = \log(-a) + ik\pi$, where $k$ is an odd integer. So:

$$\log(\frac{-1}{10^n}) = \log(\frac{1}{10^n}) + ik\pi$$ $$= -n \log(10) + ik\pi$$

So

$$\left(\frac{-1}{10^n}\right)^{-1/10^n}$$ $$=\exp(\frac{-1}{10^n} \log \frac{-1}{10^n})$$ $$=\exp(\frac{-1}{10^n} (-n \log(10) + ik\pi))$$ $$=\exp(\frac{n\log(10)}{10^n} - i\frac{k\pi}{10^n})$$ $$=\exp(\frac{n\log(10)}{10^n})\exp(i\frac{-k\pi}{10^n})$$ $$=\exp(\frac{n\log(10)}{10^n})\left(\cos(\frac{-k\pi}{10^n}) + i \sin(\frac{-k\pi}{10^n}) \right)$$ $$=\exp(\frac{n\log(10)}{10^n})\cos(\frac{-k\pi}{10^n}) + i\exp(\frac{n\log(10)}{10^n})\sin(\frac{-k\pi}{10^n})$$

Thus,

$$\Im{\left(\frac{-1}{10^n}\right)^{-1/10^n}} = \exp(\frac{n\log(10)}{10^n})\sin(\frac{-k\pi}{10^n})$$

If $n$ is reasonably large, then fractions with $10^n$ in the denominator will be very close to zero. So we can use the approximations:

  • $e^x \approx 1$, with an error of less than 1% if $|x| < 0.00995$.
  • $\sin(x) \approx x$, with an error of less than 1% if $|x| < 0.245$.

This gives us:

$$\Im{\left(\frac{-1}{10^n}\right)^{-1/10^n}} \approx \frac{-k\pi}{10^n}$$

The value $k$ depends on the “branch cut” used to define the complex logarithm. Python uses to use $k=+1$ (so that $\log(-1) = i\pi$), but other implementations may use $k=-1$. Assuming $k=+1$.

$$\Im{\left(\frac{-1}{10^n}\right)^{-1/10^n}} \approx \frac{-\pi}{10^n}$$

So you just get $\pi$ with the decimal point shifted.