Differentiating (ln x) to the Power ln x
Let $$y = (\ln x)^{\ln x}, \qquad x > 1,$$ so that both the base and the exponent are $\ln x$ (the restriction $x > 1$ keeps the base positive).
Find $\dfrac{dy}{dx}$ in closed form.
Hints
- Neither the power rule (fixed exponent) nor the exponential rule (fixed base) applies directly, because the base and the exponent both move with $x$.
- Take natural logs of both sides first: $\ln y = \ln x \cdot \ln(\ln x)$. Now the right-hand side is an ordinary product.
- Differentiate implicitly. $\frac{y'}{y}$ equals the derivative of $\ln x \cdot \ln(\ln x)$ by the product and chain rules; then multiply back by $y$.
Worked Solution
How to Think About It: A function of the form $u(x)^{v(x)}$ is neither a pure power nor a pure exponential, so take logarithms to separate base and exponent, differentiate the resulting product, and then undo the log by multiplying by $y$.
Quick Estimate: At $x = e$ we have $\ln x = 1$, so $y = 1^1 = 1$. The formula below gives $y'(e) = \frac{1}{e}\,(\ln 1 + 1) = 1/e \approx 0.368$. A finite difference check, $\frac{y(e + 0.001) - y(e - 0.001)}{0.002} \approx 0.368$, agrees.
Formal Solution:
*Step 1 -- Take logs.* For $x > 1$, $\ln x > 0$ and $y > 0$, so $$\ln y = \ln x \cdot \ln(\ln x).$$
*Step 2 -- Differentiate both sides.* The left side gives $\dfrac{y'}{y}$. On the right, use the product rule with $u = \ln x$ and $v = \ln(\ln x)$, where $u' = 1/x$ and, by the chain rule, $v' = \dfrac{1}{\ln x}\cdot\dfrac{1}{x}$: $$\frac{y'}{y} = \frac{1}{x}\ln(\ln x) + \ln x \cdot \frac{1}{x \ln x} = \frac{\ln(\ln x) + 1}{x}.$$
*Step 3 -- Multiply back by $y$.* $$\frac{dy}{dx} = (\ln x)^{\ln x}\,\frac{\ln(\ln x) + 1}{x}.$$
*Step 4 -- Sanity check.* The derivative vanishes when $\ln(\ln x) = -1$, that is at $x = e^{1/e} \approx 1.44$, which is where $(\ln x)^{\ln x}$ attains its minimum value $(1/e)^{1/e} \approx 0.69$. That matches the shape of $t^t$ on $t > 0$, which bottoms out at $t = 1/e$.
Answer: $\dfrac{dy}{dx} = \dfrac{(\ln x)^{\ln x}}{x}\left(\ln(\ln x) + 1\right)$.
Intuition
Whenever a variable appears in both the base and the exponent, logarithmic differentiation turns the mess into a product that the ordinary rules handle. The same trick is how you differentiate likelihoods of the form $\prod p_i^{n_i}$ in MLE work, and how you get the derivative of things like $x^x$ or $S^{\alpha(S)}$ in payoff engineering: log first, differentiate, multiply back.