What is the domain of $y = (-2)^x\;?$ What is the domain of $y = (-2)^x\;?$


*

*I searched it on Wolfram, and it said it doesn't have a domain.  

*But does it not exist for all integer values?  

 A: In general, we can define $a^x$ as a real number and for $a < 0$ as long as $x$ is rational and has odd denominator. This includes integers (denominator $1$). For example,
$$
(-2)^{5} = -32 \\
(-2)^{5/3} = \sqrt[3]{-32} = -\sqrt[3]{32} \\
(-2)^{2/3} = \sqrt[3]{4}.
$$
This exponentiation satisfies all the right properties, for instance:


*

*$a^{bc} = (a^b)^c$ ($b$ and $c$ must have odd denominator)

*$a^{b+c} = a^b a^c$ ($b$ and $c$ must have odd denomiator)
We run into problems if we ever have something with even denominator. For example,
$$
(-2)^{2 \cdot \frac12} = (-2)^1 = -2,
$$
but
$$
\left((-2)^2\right)^{\frac12} = 4^{\frac12} = 2, 
$$
so $(a^b)^c \ne a^{bc}$ when we have even denominators.

So that we don't have to worry about the even denominator problem, it may be preferable in many cases to leave $a^x$ only for $a > 0$.
Alternatively, sometimes we define $a^x$ for $a < 0$ as a complex number by writing $-1$ as $e^{k \pi x}$ for an odd $k$. Let me give an example: $-2 = 2e^{i\pi}$, so we can define
$$
(-2)^x := 2e^{i\pi x}.
$$
This will give the expected answer for integer values of $x$, but for other rational $x$ with negative denominator, it will not agree with the definition I gave before.
The problem with doing this is that we are just picking out one answer arbitrarily (one value of $k$). We could have said $-2 = e^{-i\pi x}$ instead, or $-2 = e^{3\pi x}$, and we would have gotten a different answer.
A: The function $\;(-2)^x\;$ is defined as long as $\;x\;$ is not of the form $\;\frac m{2n}\;,\;\;m,n\in\Bbb N\;$ . Since in any non-trivial interval there are lots of numbers of this kind (in fact, infinitely many), it'd be really nasty to even begin to try to describe the domain of this thing, not to mention that it wouldn't be open, connected and some other things that are usually required for domains of real functions.
A: Actually yes, but not such as continous functions this is more like a sequence $\{(-2)^{n}\}_{n\in\mathbb{N}}=\begin{cases}
(2^n)\mbox{ if } n \mbox{ is even}.\\
-(2^n)\mbox{ if } n \mbox{ is odd}.\end{cases}$
and for the negative integeers you can use the exponent's law.
