Why does the graph of x^x undefined for x is less than or equal to 0?

1. Nov 7, 2012

tahayassen

Let f(x)=(x)^(x)

f(-1)=(-1)^(-1)
=1/-1
=-1

But according to wolframalpha, f(-1) does not exist.

2. Nov 7, 2012

G.I.

The function works only in integer point. For each non integer point the function goes in Complex Set, and so isn't defined on real. Easilly, to avoid the calculator have problem on any other point lesser then 0, the programmer block each of that point with "does not exist" message.

Fruthermore I can rewrite the f(x) in this way:
f(x)=exp(x*ln(x)).
And ln(x<0) is undefined.

3. Nov 7, 2012

Best Pokemon

http://www.wolframalpha.com/input/?i=f(x)+=+x^x

If you look at the graph of the function itself (without plugging anything in) you will see that it shows that at x=-1 it is imaginary.

4. Nov 7, 2012

Matt Benesi

ln (-x) = ln(x) + $i \pi$

http://www.wolframalpha.com/input/?i=(-1)^(-1)

It says "negative 1". :)

5. Nov 7, 2012

uart

That graph show that the imaginary part of f(-1) is 0 and that the real part is -1. That is, f(-1) = -1 + 0i.

It's as the first reply said, f(x)=x^x is not (in general) a real valued function for x<0, though it is real for the negative integers.

6. Nov 8, 2012

tahayassen

So it's a matter of limitations of computers/programming that x<0 doesn't exist for the real-valued plot? Why does the real part for x<0 exist on the complex-valued plot?

7. Nov 9, 2012

Matt Benesi

Remember x^x = (e^(log(x)))^x = e^(x*log(x))

log (-x) = log(x) + $i\pi$

This means that you'll have the magnitude x^(-x), and the angle x*i*pi.

With the angle you'll have:

cos (x*pi) * x^(-x) for the real portion and
sin (x*pi) *x^(-x) for the imaginary portion.

Correct this if I made a mistake.. tired. :)

8. Nov 10, 2012

Millennial

Knowing that $z=r\exp(i\theta + 2ki\pi)$ where $r=|z|=\sqrt{\Re^2(z)+\Im^2(z)}$, $\theta=\mathrm{arg}(z)=\mathrm{atan2}(\Im(z),\Re(z))$ and k is an arbitrary integer, one has $\log(z)=\log(r) + i\theta + 2ki\pi = \log|z| + i\mathrm{arg}(z) + 2ki\pi$. Now, we consider our function for an arbitrary negative integer, with the principal branch of the complex logarithm (k=0):

$$(-x)^(-x) = \exp((-x)\log(-x)) = \frac{1}{\exp(x\log(-x))} = \frac{1}{\exp(\log(x)+xi\pi)}= \frac{1}{x(\cos(x\pi)+i\sin(x\pi))}$$

Now, note that if x was not an integer, we would be stuck here. However, we know for integer x, $\cos(x\pi) = (-1)^x$ and $\sin(x\pi) = 0$, which leaves us with our final answer:

$$= \frac{1}{x(-1)^x}$$

So why did I go through this? I wanted to show why Wolfram does not display the graph for $x \leq 0$. The function is defined as a real value only in the positive reals and the negative integers. For negative reals, we get the ugly-looking answer $\displaystyle \frac{1}{x(\cos(x\pi)+i\sin(x\pi))} = \frac{\cos(\pi x)-i\sin(\pi x)}{x}$, which can't be simplified further.

9. Nov 10, 2012

lavinia

10. Nov 10, 2012

Matt Benesi

I saw the graph on Wolfram Alpha. Really nice pretty one if you constrain the x variable:
http://www.wolframalpha.com/input/?...*Plot.plotlowerrange-.*Plot.plotupperrange---

Note... I am a fan of the Alpha. I also think the borderline ASD having character in Alphas is pretty awesome... and hilarious. Do you like strange tangents? :p

It's actually (so you don't confuse people- look at the first post):
$$\dfrac{\cos(\pi x)-i\sin(\pi x)}{x^x}$$
or (rewritten version of my post above your post):
$${x^{-x}}\times \left({\cos(\pi x)-i\sin(\pi x)}\right)$$

Last edited: Nov 10, 2012