I have always been intrigued by the equation $y=(-1)^x$, perhaps because it is so simple yet so difficult to find information about. It's the closest thing to a trigonometric function attainable using only "basic" math. If you evaluate it for only whole numbers, it exhibits trigonometric behavior, going up and down the x-axis to a peak of $±1$. When we start plugging in decimal values, it gets tricky, yielding "real" values for fractions with odd numbers and complex values for fractions with even numbers. What do you do with this infinitesimal oscillation? A normal graphing software will not graph the equation. Wolfram Alpha, however, offers a graph, which looks like this.
I, unfortunately, couldn't understand how the website arrives at these curves, when really $(-1)^{1\over3}$ should equal $-1$. Yet, I discovered how the cosine function can be expressed in terms of $y=(-1)^x$ by manipulating Euler's identity.
$$e^{iπ}=-1$$ $$e^{iπx}={(-1)}^x$$ $$e^{ix}={(-1)}^{x\overπ}$$ $$e^{-ix}={(-1)}^{{-x\overπ}}$$
Since $\cos x={e^{ix}+e^{-ix}\over 2}$, adding the two above equations and dividing by two allows us to conclude that
$${(-1)^{x\overπ}+(-1)^{-x\overπ}\over 2}=\cos x$$
Wolfram Alpha confirms:
I have not seen this transformation anywhere. Am I the first to find it? It would be pretty cool if I were. Another stunning relationship I found is that the equation $y=(-1)^{-ix\overπ}$ yields the ordinary function $y=e^x$. This can be proven almost the exact same way. I think this is fascinating, and I am confused why so little is written about this. The only problem is, the relationships work when you derive them, but when you plug in numbers, why the graphs would look like that is baffling.