Behavior of $f(x)=(-1)^x$

75 Views Asked by At

For what $x$ is $f(x)=(-1)^x$ a real number, and when is it a complex number?

When I graph it online, the graph glitches out and has points all over the place.

3

There are 3 best solutions below

2
On BEST ANSWER

This is the same as $\exp(x\pi i)=\cos(x\pi)+i\sin(x\pi)$. For it to be real, $\sin(x\pi)=0$, i.e. $x$ is an integer.

0
On

If you recall that $(-1) = e^{i \pi}$ then $$f(x)= e^{i \pi x}$$ Which is then $$\cos(\pi x) +i\sin(\pi x)$$

Does this help at all?

2
On

When $-1$ is raised to power of $x$ the complex number so formed has a real part $\cos \pi x $ and imaginary part $\sin \pi x.$ This can be found using Euler formula $ e^{i \pi}=-1$. The two parts are graphed below .. with each part having a period or wave length $\lambda=2, $ the roots are at $x=..,-2,-1,0,1,2,...$ etc.

Real part vanishes for all integer values of $x$ as is obvious from graph and direct check by plugin.

The $f(x)$ thus is always complex for all real values of $x$

Again for complex $x= a+ib ,\, f(x) $ is complex.

enter image description here