What is the domain of $(-1)^x$?
I can see that the function is never continuous but it would be defined when $x$ is an integer. However, Wolfram Alpha says the domain is an empty set.
What is the domain of $(-1)^x$?
I can see that the function is never continuous but it would be defined when $x$ is an integer. However, Wolfram Alpha says the domain is an empty set.
On
The definition that $b^n = \underbrace{b*b*...*b}_{n\text { times}}$ is a simple definition that only works if $n$ is an integer (actually if you really think about it the definition only works if $n\ge 2$ but... we won't worry about that.)
It's not an adequate definition for any serious work. So we must extend the definition. This is a case of replacing the definition, not simply of saying "It means one thing if $x$ is and integer and another thing if $x$ is rational number and a third thing if $x$ is a real irrational."
The extended definition is $exp(x\ln b)$ where $\ln x = \int_{1}^x \frac 1t dt$ and $\exp(x) = \ln^{-1}(x)$. This is an extended definition and it is "downward compatible". If $x=n$ is an integer then $b^n = e^{n\ln b} =\underbrace{b*b*...*b}_{n\text { times}}$ but that is now consequence; not the definition.
However the cost of extending the definition to the real numbers is that $b^n; b \le 0$ no longer makes any sense and it not valid.
$b^x$ is simply not considered defined if $b < 0$; even if $n$ is an integer.
At least not for the extension the reals. If we extend to the Complex we have another definition and domain.
Wolfram Alpha is assuming the real definition and $b^x$ is not defined for $b\le 0$.
Assuming that $x$ is real $$y=(-1)^x\implies \log(y)=x \log(-1)$$ From the famous Euler's identity $e^{i\pi}+1=0$ then $$\log(y)=x \log(e^{i \pi})\implies y=e^{i \pi x}=\cos(\pi x)+i\sin(\pi x)$$ So, $y$ is a real number if $x$ is an integer since, in such a case, $\sin(\pi x)=0$.
Similarly, $y$ would be an imaginary number when $x=\frac{2k+1}{2}$ since, in such a case, $\cos(\pi x)=0$.
For any other situation, $y$ would be a complex number.
If $x$ is a complex number $(x=a+ib)$, the same approach would lead to $$y=e^{-\pi b}(\cos(a \pi)+i\sin(a \pi))$$ and you notice that the problem is the same with $a$ as it was for real $x$.