# Math Help - How to plot (-1)^x in Matchematica?

1. ## How to plot (-1)^x in Matchematica?

I'm having a hard time trying to plot $(-1)^x$ in Mathematica. The output appears to be empty.

Plot[(-1)^x, {x, -10, 10}, PlotRange -> 2]

Shouldn't this graph be continuous on intervals of the form [n, n+1) where n is an integer?

2. Originally Posted by Ontolog
I'm having a hard time trying to plot $(-1)^x$ in Mathematica. The output appears to be empty.

Plot[(-1)^x, {x, -10, 10}, PlotRange -> 2]

Shouldn't this graph be continuous on intervals of the form [n, n+1) where n is an integer?
No consider the interval $[0,1]$

and consider the points $x=2^{-n}=\sqrt[2n]{-1}, n \in \mathbb{N}$

This will be imaginary but

$x=3^{-n}=\sqrt[3n]{-1}, n \in \mathbb{N}$

will be real.

3. Is there any way to graph (-1)^x in a meaningful way? I originally came across it because of its usefulness when applied over the natural numbers since it alternates between 1 and -1. However I'm curious how to visualize the general graph of this function, so I suppose it would require a graph on the complex plane which I have no idea how to do.

4. Originally Posted by Ontolog
Is there any way to graph (-1)^x in a meaningful way? I originally came across it because of its usefulness when applied over the natural numbers since it alternates between 1 and -1. However I'm curious how to visualize the general graph of this function, so I suppose it would require a graph on the complex plane which I have no idea how to do.
Here is Wolfram Alpha's plot

plot &#40;-1&#41;&#94;x - Wolfram|Alpha

5. Originally Posted by Ontolog
I'm having a hard time trying to plot $(-1)^x$ in Mathematica. The output appears to be empty.

Plot[(-1)^x, {x, -10, 10}, PlotRange -> 2]

Shouldn't this graph be continuous on intervals of the form [n, n+1) where n is an integer?
Try $(-1)^{x} = e^{i\ \pi\ x}$ ... or , which of course is the same, $(-1)^{x} = \cos \pi x + i\ \sin \pi x$...

Kind regards

$\chi$ $\sigma$