Proof or Disproof That $\sin(\pi x) = Im( (-1)^x)$

96 Views Asked by At

While playing around with Mathematica, I decided to try plotting the function $(-1)^x$, and realized the imaginary part plotted along the x-axis, $f(x)=Im((-1)^x)$, looks like a sine wave. So I plotted $g(x)=\sin(\pi x)$, and wouldn't you know it they seem to match. I went on to test values, and sure enough they had equivalent evaluations at the sampled points.

With all that being said, I decided to try proving they equal for the fun of it, and realized I didn't know how to. I attempted to rework Euler's identity $e^{i*\theta} = \cos(\theta)+i*\sin(\theta)$, but to no success.

Thus to explicitly state: How do you prove (or disprove) the following equality:

$$f(x)=g(x) \quad \forall x \in \mathbb{R}$$

3

There are 3 best solutions below

5
On

First lets transform $\Im((-1)^x) \to \ \Im(e^{\ln((-1)^x)}) \to \Im(e^{x\ln(-1)}) \to \Im(e^{x\pi i}) \to \Im(i\sin(\pi x)+\cos(\pi x)) \to \sin(\pi x) \\ since \ (\Im(ai+b)=a)$

So therefore $sin(\pi x)=\Im((-1)^x)$

2
On

Both initial answers here make some assumptions about complex exponentiation that are not true.

While it is true that we usually define $\ln(-1)=\pi i,$ and we define $a^b$ as $e^{b\ln a},$ we can't use $(a^b)^c=a^{bc}$ in complex numbers, and we can't use $\ln(a^x)=x\ln a.$

At heart this is because $\ln a,$ as a normal single-valued function on complex numbers, is messy. It really makes more sense to allow $\ln a$ to take multiple values for each $a.$ So $\ln(-1)=\pi i,-\pi i,3\pi i,-3\pi i,\dots.$

Mathematica is using a single-valued $\ln,$ with $\ln(-1)=\pi i,$ the common choice, but then your observation is due to the fact that $(-1)^x=e^{x\ln(-1)}$ by definition, not because $(e^{i\pi})^x=e^{i\pi x}.$

6
On

Proof or Disproof That $ \sin(\pi \cdot x) = \Im((-1)^{x}) $

This might look kinda complex but it's actually pretty simple: $$ \begin{align*} \sin(\pi \cdot x) &= \Im((-1)^{x})\\ \sin(\pi \cdot x) &= \Im((e^{\ln(-1)})^{x})\\ \sin(\pi \cdot x) &= \Im((e^{(\pi + 2 \cdot k \cdot \pi) \cdot \mathrm{i}})^{x})\\ \sin(\pi \cdot x) &= \Im(e^{(\pi + 2 \cdot k \cdot \pi) \cdot x \cdot \mathrm{i}})\\ \sin(\pi \cdot x) &= \Im\left( \sum_{n = 0}^{\infty} \frac{\left( (\pi + 2 \cdot k \cdot \pi) \cdot x \cdot \mathrm{i} \right)^{n}}{n!} \right)\\ \sin(\pi \cdot x) &= \Im\left( \sum_{n = 0}^{\infty} \left( (-1)^{n} \cdot \frac{\left( (\pi + 2 \cdot k \cdot \pi) \cdot x \cdot \mathrm{i} \right)^{2 \cdot n}}{(2 \cdot n)!} + (-1)^{n} \cdot \frac{\left( (\pi + 2 \cdot k \cdot \pi) \cdot x \cdot \mathrm{i} \right)^{2 \cdot n + 1}}{(2 \cdot n + 1)!} \cdot \mathrm{i} \right) \right)\\ \sin(\pi \cdot x) &= \Im\left( \cos((\pi + 2 \cdot k \cdot \pi) \cdot x) + \sin((\pi + 2 \cdot k \cdot \pi) \cdot x \right) \cdot \mathrm{i})\\ \sin(\pi \cdot x) &= \sin((\pi + 2 \cdot k \cdot \pi) \cdot x) \quad \text{for } k = 0\\ \sin(\pi \cdot x) &= \sin(\pi \cdot x) \quad \square \end{align*} $$ But if you use a diffrent value of k it's not true anymore: (e.g. k = 1)

$$\sin(\pi \cdot x) \ne \sin((\pi + 2 \cdot 1 \cdot \pi) \cdot x)\\$$ $$\sin(\pi \cdot x) \ne \sin((\pi + 2 \cdot k \cdot \pi) \cdot x)\\$$