When the variable is in the base and the exponent at once, take logarithms first.
\[\frac{d}{dx}f^{g} = f^{g}\left(g'\ln f + \frac{gf'}{f}\right)\]
What it says
For \(x^{x}\) neither standard rule fits: the power rule needs a constant exponent, the exponential rule a constant base. Taking logarithms fixes it, because \(\ln\) turns an exponent into an ordinary factor.
Write \(y = f^{g}\). Then \(\ln y = g\ln f\); differentiating both sides gives \(\frac{y'}{y} = g'\ln f + \frac{gf'}{f}\), and multiplying by \(y = f^{g}\) gives the formula above. The two terms have a clear reading: the first is the change coming from the exponent, the second from the base.
The same trick is useful even when it is not required. A long product or quotient can be turned into a sum of logarithms, differentiated term by term, then multiplied back — often much less work than nested product rules.
When it applies
The variable appears in both the base and the exponent.
Towers such as \(x^{x}\), \(x^{\sin x}\) or \((\sin x)^{\cos x}\).
Optionally, to tame a product or quotient with many factors.
Five worked examples
Every line is the step the calculator would show, in the order it applies them. Each graph
is live: hover it to read both curves and see the tangent whose slope is the derivative,
drag to pan, scroll to zoom.
1
Example 1
\[\frac{d}{dx}\left[x^{x}\right]\]
Take logs: \(\ln y = x\ln x\).
\[\frac{y'}{y} = \frac{d}{dx}\left[x\ln x\right] = \ln x + 1\]
Multiply back by \(y = x^{x}\).
\[= x^{x}\left(\ln x + 1\right)\]
Answer
\[x^{x} \left(\ln\left(x\right) + 1\right)\]
Only for \(x > 0\). The curve dips into a shallow trough near the left edge, then rises so fast that the framing pulls in to keep it on screen. f′ climbs from below the axis, through zero at the trough, and away.
Zero at \(x = \frac{1}{e}\), which is where \(x^{x}\) reaches its minimum of about \(0.6922\).
Derivative Calculator would like your consent to use your data
Store and read cookies and similar identifiers on your device
Measure how the site is used, and — only if you allow it — personalise advertising
Learn more
How can I change my choice?
Open Privacy settings at the bottom of any page. Your answer can be changed or withdrawn at any time, and takes effect straight away.
What if I do not consent?
Everything still works. The calculator, the graph and every rule page run entirely in your browser, so refusing costs you nothing but the optional cookies.
Do I have to consent to everything?
No. Manage options lets you allow one category and refuse another, and nothing optional is switched on until you switch it on.
Necessary cookies keep the site working and are always on. Anything else — measurement and advertising — runs only with your permission, and no profile is built about you before you give it. Read the privacy policy
Data preferences
Choose what you allow
Each category is described below. Your choice is stored on this device and applies the moment you save it.
Strictly necessary
Keeps the site working: your light or dark theme, your recent expressions and the record of this consent choice. Nothing here identifies you, and it cannot be switched off.
Preferences
Remembers optional settings across visits, such as your language and the way you like results laid out.
Measurement
Counts visits and which rules people look up, so we know what to improve. Aggregated — never used to build a profile about you.
Advertising
Lets advertising partners use cookies to select and measure ads, including personalised ones. Refuse this and any ads shown stay non-personalised.