AP Calculus AB and BC
Derivative of x^x: Answer, Proof, and Mistakes
The derivative of x^x is x^x(ln x + 1), valid for x > 0. Because x^x has the variable in both the base and the exponent, neither the power rule nor the exponential rule works alone. Taking the natural log of both sides and differentiating implicitly (logarithmic differentiation) gives the result.
Why neither the power rule nor the exponential rule works
The function puts the variable in two places at once: it is both the base and the exponent. Every basic derivative rule assumes one of those two is a fixed number, so no single rule applies here.
The power rule needs the exponent to be constant, but in the exponent is the variable . The exponential rule needs the base to be constant, but in the base is also the variable . Each rule breaks on the part the other one handles.
The two wrong answers add up to the right one
Force the power rule and you get . Force the exponential rule and you get . The correct derivative is exactly the sum of those two wrong answers. That is a useful way to remember the result, and the proof below shows why it happens.
Proof by logarithmic differentiation
Since no single rule fits, take the natural log of both sides first. That turns the stubborn exponent into a product, which the product rule can handle. This technique is called logarithmic differentiation. Start by naming the function and applying to both sides.
Differentiate both sides with respect to . The left side needs the chain rule because is a function of , and the right side needs the product rule.
Solve for by multiplying both sides by , then replace with .
Domain: x must be positive
As a continuous real function, , and that forces . The same shows up in the proof step , so both the function and this method require positive . The derivative holds on that same domain, and there is no real derivative at .
Where this shows up on the AP exam
You rarely see named directly on the AP exam, but every move in its derivative is a tested skill. The derivative in the middle step is Topic 2.7 (Derivatives of , , , and ). Differentiating as a function of is implicit differentiation, Topic 3.2, and the factor it produces comes from the chain rule, Topic 3.1.
The larger skill is noticing that a standard rule does not fit and choosing a different route, which is exactly Topic 3.5, Selecting Procedures for Calculating Derivatives. A function with a variable in both the base and the exponent is the signal to reach for logarithmic differentiation instead of the power or exponential rule.
Common mistakes
- Using the power rule and writing . That treats the exponent as constant and drops the entire term.
- Using the exponential rule and writing . That treats the base as constant and drops the .
- Forgetting the chain rule on the left side: writing instead of . Without that factor you can never solve for the derivative.
- Reporting the answer for every . As a continuous real function, and its derivative exist only for .
- In a composite such as or , forgetting to multiply by the inner derivative .
Quick chain-rule composites
Once you have , it becomes the inner piece of any composite. Here are two.
Composite 1: differentiate . The outer function is with , so the chain rule gives times the derivative of the inside.
Composite 2: differentiate as a self-check. By the chain rule it is times the derivative of .
Because , differentiating directly with the product rule also gives . The two routes agree, which confirms the derivative of . As a numeric anchor, at the slope is , so passes through with slope .
Check yourself, not just the answer
Type derivatives and get graded on mathematical equivalence, with rule-level hints when you miss, in the Derivative Practice Checker.
Frequently asked questions
What is the derivative of x^x?
It is , valid for . You find it by logarithmic differentiation: set , take of both sides to get , differentiate implicitly to get , then multiply by .
Why can't I use the power rule on x^x?
The power rule only works when the exponent is a fixed number. In the exponent is the variable , so the rule does not apply. Forcing it gives , which is missing the term of the real answer.
What is the domain of the derivative of x^x?
As a continuous real function, , whose needs a positive input, so both and its derivative are defined only for . The proof step inherits the same restriction, and there is no real derivative at .
Is x^x the same as e^(x ln x)?
Yes. Rewriting gives a second valid method: differentiate the exponent to get , then multiply by , which returns the same .