y=xxy = x^x

Graph of the Function y=xxy = x^x

y=xxy = x^x has the same variable in the base and in the exponent. It is neither a power function like xax^{a} nor an exponential like axa^{x}, and its true nature only appears once it is rewritten as xx=exlnxx^x = e^{x \ln x}.

Domain

Over the reals the domain is restricted to x>0x > 0. For negative xx the logarithm in exlnxe^{x \ln x} is undefined, and (0.5)0.5(-0.5)^{-0.5}, for instance, is not a real number. Negative integers do give values, such as (1)1=1(-1)^{-1} = -1, but they form no interval and so cannot be drawn as a curve.

Behavior at the origin

As x0+x \to 0^{+} we have xlnx0x \ln x \to 0, so the limit is as follows.

limx0+xx=e0=1\lim_{x \to 0^{+}} x^x = e^{0} = 1

The indeterminate form 000^0 settling at 11 is what makes the left end of the graph rise toward height 11. Since x=0x = 0 is not in the domain, that point is a hole.

Monotonicity and extrema

The derivative is y=xx(lnx+1)y' = x^x(\ln x + 1). As xx>0x^x > 0, the sign comes from lnx+1\ln x + 1, giving a minimum, both local and global, at x=1ex = \dfrac{1}{e}. Its value is as follows.

(1e)1/e=e1/e0.692\left( \frac{1}{e} \right)^{1/e} = e^{-1/e} \approx 0.692

The curve falls from 11 at the left end down to 0.6920.692 before turning upward, a shape that surprises most people on first sight.

Concavity

The second derivative is y=xx[(lnx+1)2+1x]y'' = x^x\left[ (\ln x + 1)^2 + \dfrac{1}{x} \right]. The bracket is positive for every x>0x > 0, so the curve is concave up throughout and has no inflection point.

Rate of growth

xxxxx^x
1e\dfrac{1}{e}0.6920.692, the minimum
1111
2244
332727
44256256

At the integers the values are simply nnn^n. This outgrows every exponential axa^{x}, because the base itself keeps increasing. It is also closely tied to the factorial: Stirling's formula n!2πn(ne)nn! \approx \sqrt{2\pi n}\left( \dfrac{n}{e} \right)^{n} shows that n!n! grows at essentially the rate of nnen\dfrac{n^n}{e^n}.

The sophomore's dream

The definite integral from 00 to 11 has a strikingly simple series representation.

01xxdx=n=1(1)n1nn0.7834\int_0^1 x^{x}\,dx = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^{n}} \approx 0.7834

Similarly 01xxdx=n=11nn1.2913\int_0^1 x^{-x}\,dx = \sum_{n=1}^{\infty} \dfrac{1}{n^{n}} \approx 1.2913. Because the integrals turn straight into series of the same shape, these identities are known as the sophomore's dream. They follow from expanding the integrand e±xlnxe^{\pm x \ln x} as an exponential series and integrating term by term.

Relation to other functions

The exponent xlnxx \ln x is worth studying in its own right, and its minimum point is exactly the minimum point of xxx^x. Exchanging base and exponent gives x1/x=e(lnx)/xx^{1/x} = e^{(\ln x)/x}, whose maximum is e1/e1.445e^{1/e} \approx 1.445 at x=ex = e.

FunctionPosition of the extremumExtremum
xxx^xx=1ex = \dfrac{1}{e}minimum e1/e0.692e^{-1/e} \approx 0.692
x1/xx^{1/x}x=ex = emaximum e1/e1.445e^{1/e} \approx 1.445

The pairing of the minimum at 1e\dfrac{1}{e} with the maximum at ee is a pleasant symmetry.