5

The idea of continuity of a function is something I come across quite regularly, but I've never really understood it well. I'm trying to fix that by looking at some interesting functions.

What happens continuity wise for $x<0$ in this function:

$$f(x)=x^x$$

I can't find a quick answer to this. Apologies if this is a duplicate. I'm looking for a detailed explanation.

Andres Mejia
  • 20,977
Bamboo
  • 1,049

4 Answers4

3

As mentioned in another answer, writing $x^x$ is the same as writing $e^{x\log x}$. But complex analysis tells us that there are many possible branches of $\log x$ that you could choose. Namely, you can define it on any simply connected region in $\mathbb C$ not containing zero, and you can add $2\pi i$ as many times as you like.

Since you're asking about real negative values of $x$, you'd need a branch of the logarithm that avoids this half line in the complex plane. For example, you could choose the branch $$\log z=\log|z|+i\theta$$ where $-\frac{\pi}{2}<\theta<\frac{3\pi}{2}$. In any such branch, the complex logarithm is analytic and therefore continuous on the negative real half-line.

To conclude, the answer to your question is that $x^x$ is always continuous for $x<0$ provided you've picked a well-defined meaning of the function.

I apologize that this explanation requires that you've seen complex analysis, but this question cannot be adequately answered otherwise.

Funktorality
  • 3,221
0

If $x<0$, then $x^x$ is not defined. The domain of $x^x$ is $\{\ldots,-3,-2,-1\}\cup[0,\infty)$. In general, you cannot raise negative numbers to general real numbers. Only to integer powers.

For an easy example to understand why, what is $(-1/2)^{-1/2}$? I guess it would be $1/\sqrt{-1/2}$, but now you are taking a square root of a negative number.

Going back to your introduction, $x^x$ is continuous on its domain, if you allow one-sided continuity at $0$ and consider a function on $-\mathbb{N}$ to be continuous. (Are you looking for a proof of that?)


Let $a,b$ be real. $a^b$ means $\exp(b\ln(a))$. When $a$ is positive, this is fine and means what everyone thinks it means. There is a canonical choice for the value of $\ln(a)$ when $a$ is positive, so you use that, then multiply by $b$, then exponentiate base $e$.

When $a$ is negative, there is no canonical choice anymore for what $\ln(a)$ means. For example, $\exp(\ln(2)-\pi i), \exp(\ln(2)+\pi i), \exp(\ln(2)+3\pi i)$, etc. all equal $-2$, so $\ln(-2)$ has just as much right to be $\ln(2)-\pi i$ as $\ln(2)+\pi i$, etc. It's common to take the branch cut where $\ln(-2)$ is $\ln(2)+\pi i$, but that is a convention, not a canonical choice.

So for negative $a$, since $\ln(a)$ can mean lots of things, so can $b\ln(a)$, and so can $\exp(b\ln(a))$. So there is generally no good single value to assign to "$a^b$" when $a$ is negative.

The exception comes when $b$ is an integer. Then and only then, even though there are multiple values for $b\ln(a)$, they all go to the same place when put through $\exp$. This is because the multitude of values for $\ln(a)$ all differ by some integer multiple of $2\pi i$. So multiplying any two by an integer $b$, you still have two complex numbers that differ by an integer multiple of $2\pi i$. And $\exp$ will send all such numbers to the same place.

Conversely if $a$ is negative and $b$ is not an integer, then there exist two values for $\ln(a)$ such that the corresponding two values of $b\ln(a)$ do not differ by an integer multiple of $2\pi$. And therefore $\exp$ will give distinct outputs for these two numbers. And so $\exp(b\ln(a))$ will have no single meaning.

This still doesn't address when $a=0$. The definition of $a^b$ can be extended continuously to when $a=0$ when $b$ is positive ($0^b=0$), and not when $b$ is negative. This leaves $0^0$, which is well-debated elsewhere on this site. I fall into a camp that interprets $0^0=1$, which happens to make $x^x$ defined and right-continuous at $0$.

So the definition $a^b=\exp(b\ln(a))$ has a single meaning exactly for $(a,b)\in\left(\mathbb{R}_{<0}\times\mathbb{Z}\right)\cup\left(\{0\}\times\mathbb{R}_{\geq0}\right)\cup\left(\mathbb{R}_{>0}\times\mathbb{R}\right)$. Applied to $x^x$, this means the domain is $\{\ldots,-3,-2,-1\}\cup[0,\infty)$.

2'5 9'2
  • 54,717
  • 1
    Why couldn't we drop the restraints of continuity? $(-1)^{-1}$ is defined. It's not obvious to me that $f:\mathbb{R}\rightarrow\mathbb{R}$ would be discontinuous in every interval where $x<0$... though a continuous interval would be surprising. – zahbaz May 29 '16 at 04:41
  • @zahbaz You can either define $a^b$ as (1) $\exp(b\ln(a))$ for real $a,b$, or as (2) $\overbrace{a\cdot\cdots\cdot a}^b$ when $a$ is real and $b$ is in $\mathbb{N}$, $1/(\overbrace{a\cdot\cdots\cdot a}^b)$ when $a$ is real and $b$ is in $-\mathbb{N}$. The two definitions match in the conditions where they overlap. But that's it. There is no extension for negative $a$ and noninteger $b$. Unless you are of the school that counts $(-2)^{1/3}$ to be the same as $\sqrt[3]{-2}$, which I do not (nor do most computer algebra systems). – 2'5 9'2 May 29 '16 at 06:09
  • @zahbaz Even then though, you still only have $a^b$ defined for negative $a$ when $b$ is a member of a subset of the rationals. If you intend to otherwise give meaning to $a^b$ when $a$ is negative, what is the definition you have in mind? – 2'5 9'2 May 29 '16 at 06:10
  • Didn't have a definition in mind. I questioned out of curiosity. (Ps ... the downvote wasn't mine) – zahbaz May 29 '16 at 06:46
0

In the real case, $x^x$ is not defined when $x<0$, except for some particular value. For example, $(-1/2)^{-1/2}$ is not defined.

But we can define $z^z=\exp(z\log z)$ for $z\ne 0$, which is a multi-valued function in complex analysis.

Eclipse Sun
  • 9,338
  • 21
  • 44
  • Forgive my ignorance of imaginary/complex numbers, but would not $x^x$ be defined at, say, $x=-2$, which gives $-2^{-2}$? – Leonidas Lanier May 29 '16 at 04:42
  • $x^x$ is defined at $-2$ as a real function, i.e. $(-2)^{-2}=1/4$. Note that as a complex function, $\log (-2)=\log2+(2k+1)\pi$, and $\exp(-2\log(-2))=\exp(-2\log2)=1/4$ which coincides with its usual meaning. – Eclipse Sun May 29 '16 at 05:30
  • @LanierFreeman I appended to my answer an explanation of $a^b$ and what happens when $a$ is negative. It does require some understanding of complex numbers, and in particular how $\ln$ and $\exp$ work on complex numbers. But it explains why $x^x$ only makes sense for $x$ in ${\ldots,-3,-2,-1}\cup[0,\infty)$. – 2'5 9'2 May 29 '16 at 06:54
-4

The quickest and easiest way to make a statement on this function's continuity is to take a derivative. This requires logarithmic differentiation. The derivative is: $$f'(x) = x^x(\ln(x) + 1)$$

Note that $\ln(x)$ is only valid for positive entries. So, this tells us that $f$ is continuous for positive numbers.

Kaynex
  • 2,448
  • 2
    Continuity does not imply differentiability. – Eclipse Sun May 29 '16 at 04:18
  • 2
    @Kaynex Yes, and so what? – Eclipse Sun May 29 '16 at 04:27
  • Hmm. I see your point Eclipse, that I only proved that it is continuous for positive numbers. Mind you, I'm the only one to have made a statement on that so far. – Kaynex May 29 '16 at 04:28
  • 2
    Your argument is circular since when you differentiated you assumed continuity. – Funktorality May 29 '16 at 05:42
  • @Stan Corey Carter I'm not certain I follow. I've never known differentiation to assume continuity. I've instead known differentiation to tell us about continuity. Does anyone have a counter example? – Kaynex May 29 '16 at 17:15
  • What I mean is when you apply the rules of differentiation you learned in calculus, you're implicitly assuming that everything is differentiable except possibly at a few singularities. This is reasonable because pretty much any "standard" function you can write down is going to be differentiable except at maybe a few obvious points. The correct argument for $x^x$ ($x>0$) is as follows: continuity is immediate from the facts that (1) $x\mapsto x$ is continuous and (2) $(x,y)\mapsto x^y$ is continuous for $x,y>0$. Thus no differentiation is required. – Funktorality May 29 '16 at 17:52
  • One of the things I like about math is that there are multiple ways to solve problems. I attempted to go through something other than simply stating what you did above. I made no assumption on continuity, as the derivative doesn't rely on that assumption. I got the correct answer as the method holds some merit. It's not a strong proof by any means, but definitely isn't circular. – Kaynex May 29 '16 at 19:47
  • You did make an assumption about continuity, because writing $f'(x)$ is meaningless for a function that is not continuous. – Funktorality May 29 '16 at 23:23
  • On the contrary, $f'(x)$ does not exist for a function that is not continuous, as we can easily show with the definition of the derivative. The fact that it exists here tells you...?

    Also worth noting, according to you, all I assumed was that the function was continuous. Using this method, I discovered that the function was only definitely continuous for the positive reals, which is not the assumption I made. Why did I not get that the function was continuous everywhere, if that's what I'm assuming?

    – Kaynex May 30 '16 at 08:04