Some textbooks breeze past this question. Every rule you have learned for exponents — product, power-of-a-power, power-of-a-product, quotient — quietly assumes that either the base or the exponent is a constant. The derivative rules you may meet later follow the same split. But what happens when both base and exponent change together, and change with the same variable?

Consider x^x. Or x^{x+1}. Or (2x)^{x^2}. The base moves, the exponent moves. None of your usual rules directly applies. You need a different trick.

Why the standard rules don't apply directly

In calculus, two rules govern exponents. The power rule says

\frac{d}{dx}\left(x^n\right) = n \cdot x^{n-1}

whenever n is a constant. The exponential rule says

\frac{d}{dx}\left(a^x\right) = (\ln a) \cdot a^x

whenever a is a constant. These two rules cover a lot of ground — but they both demand that one piece stays fixed.

Now look at x^x. The base is a variable, and so is the exponent. It is neither a power function with a constant exponent nor an exponential with a constant base. It is a hybrid, and a hybrid does not fit either template.

Force the power rule onto it, pretending the exponent is a constant, and you get x \cdot x^{x-1} = x^x. Wrong. Try the exponential rule, pretending the base is a constant, and you get (\ln x) \cdot x^x. Also wrong. The actual correct answer (derivable with the trick below) is

\frac{d}{dx}\left(x^x\right) = x^x \cdot (\ln x + 1).

Notice that neither wrong answer appears alone; the true answer has both pieces and an extra +1 that comes from the base moving. Each half-rule contributes; neither half-rule, by itself, is complete.

The log trick

The technique that unlocks every expression of this form is the logarithmic rewrite. For any f(x)^{g(x)} with f(x) > 0,

f(x)^{g(x)} = e^{\,g(x) \cdot \ln f(x)}.

Why does it work? Because for any positive a, a = e^{\ln a} — that is the defining property of the natural log. Raising both sides to the b,

a^b = \left(e^{\ln a}\right)^b = e^{\,b \cdot \ln a}.

Read the right-hand side. It is an exponential with a constant base — the number e — and a complicated exponent. The mess has moved out of the base and into the exponent, where the chain rule handles it. The hybrid has become a standard composition of familiar functions.

For x^x specifically,

x^x = e^{\,x \ln x}.

That is the identity you reach for whenever both base and exponent carry the variable.

Evaluating x^x at specific values

Before worrying about calculus, just compute x^x at a few points. No tricks; only arithmetic:

Two features stand out. For large x, the values grow violently — x^x outruns any polynomial x^{100} and even any fixed-base exponential 2^x, eventually. For small positive x, the values first decrease below 1 and then rise again. So x^x on the positive reals has a minimum somewhere in (0, 1). A bit of calculus (take the log, differentiate, set to zero) locates it at x = 1/e \approx 0.368, with value (1/e)^{1/e} \approx 0.692. From there it climbs through (1, 1) and rockets upward.

Domain considerations

Where is x^x even defined? For x > 0, no trouble — e^{x \ln x} is defined for every positive x.

For x < 0, the function runs into the same wall that fractional exponents of negatives hit (see What Does a^(1/2) Mean If I Can't Multiply 'Half a Time'?). At most negative reals, x^x is not a real number — (-0.5)^{-0.5}, for instance, involves the reciprocal of the square root of a negative. Isolated negative integers give real values ((-2)^{-2} = 1/4), but between them the function has no real value, so no continuous curve. For the real-valued story, take the domain to be x > 0.

At x = 0 you hit the 0^0 question. Algebra conventionally sets 0^0 = 1 because that makes power series and the binomial theorem work. Analysis calls it indeterminate, because different limits approaching 0 can give different answers. For this specific function, \lim_{x \to 0^+} x^x = 1, so setting 0^0 = 1 keeps x^x continuous on [0, \infty).

Expressions mixing base and exponent variables

A few examples:

In every case the log rewrite is the skeleton key: any hybrid f(x)^{g(x)} becomes e^{g(x) \ln f(x)}, and then every calculus tool you know applies.

Why this matters beyond school

Mixed base-and-exponent expressions are not a curiosity. Information theory uses -p \log p terms, and (1-p)^{(1-p)} appears in distribution calculations. The Boltzmann distribution in physics is e^{-E/kT}; when E and T both depend on a common parameter, you are back to a hybrid. In probability, the chance that a random permutation has no fixed point involves \lim_{n \to \infty}(1 - 1/n)^n — same structure, same tool.

Knowing that such expressions need a different approach — the log rewrite — prevents you from reflexively applying the wrong rule and believing the wrong answer.

Graphing x^x briefly

Sketch y = x^x for x > 0. Near x = 0^+ the curve approaches height 1. As x increases through (0, 1/e) the curve decreases, reaching a minimum of about 0.692 at x = 1/e \approx 0.368. It then turns around, rises through (1, 1), and climbs faster and faster, passing (2, 4), (3, 27), (4, 256), and taking off vertically.

Not a polynomial. Not a fixed-base exponential. It dips, recovers, and outgrows everything you know — a shape unique to the hybrid.

Rules that do hold

Here is the part that rescues the algebra. The exponent laws still work symbolically when the exponent is a symbolic expression — the laws never cared whether the exponent was a constant. For any x > 0 and any expressions p and q:

x^p \cdot x^q = x^{p + q}, \qquad (x^p)^q = x^{pq}, \qquad \frac{x^p}{x^q} = x^{p - q}.

So x^x \cdot x^y = x^{x + y} is perfectly valid for positive x. The sleight is that rules like the power rule for derivatives require a constant exponent; at the level of manipulating symbols, the algebra of exponents keeps working.

In other words: the algebra survives. What changes is which calculus template you pull off the shelf.

Common confusion — x^x vs x·x

Because of how compact the notation is, x^x and x \cdot x look superficially similar. They are not. x \cdot x = x^2 grows polynomially — double the input, the output multiplies by 4. x^x grows super-exponentially — double the input from 5 to 10 and the output leaps from 3125 to 10^{10}. One is a parabola. The other leaves the page. Check the position of the second x: if it is inline (x \cdot x), it is a product; if it sits upstairs (x^x), it is the hybrid.

Closing

When both the base and the exponent change together, the rules you grew up with — product, power-of-a-power, the derivative templates — do not quite fit. Reach for the log trick:

f(x)^{g(x)} = e^{\,g(x) \ln f(x)}.

It converts something unfamiliar into a standard composition of \exp and \ln and polynomial-style pieces, and from there every calculus rule you know applies. The expressions x^x, x^{1/x}, (1 + 1/x)^x, and all their relatives stop being puzzles and start being exercises. The algebra of exponents never broke; it just needed one more identity to bridge the gap.