# How to visualize $f(x) = (-2)^x$

### Background

I teach Algebra and second year Algebra to middle school students. We are currently studying Exponential, Power, and Logarithmic functions. We study exponential functions (of the form $$f(x) = ab^x$$ where $$a \neq 0, b > 0$$). I've taught the basics of exponential functions before and I've wondered about the function $$f(x) = (-2)^x$$. At first I was confused as to why the calculator would not graph any exponential function with a negative base. Then I realized that depending on the roots, say for $$(-2)^{1.25}$$ and $$(-2)^{1/3}$$ some very different calculations would need to be performed. I'm still lost as to how you would explain $$(-2)^\pi$$ but I suppose that's just being annoying. I want to know how to explain the output of $$f(x) = (-2)^x$$.

I know for example that there are a host of values for which the output would be imaginary. If we limit the domain of $$x$$ to rational numbers with odd denominators
$$(-2)^{2/5} = \left(\sqrt[5]{-2}\right)^2 \approx 1.3195$$
$$(-2)^{3/5} = \left(\sqrt[5]{-2}\right)^3 \approx -1.5157$$)
we should be able to compute $$f(x)$$ for all such numbers. I would then think the graph would look something like