# General form of the $n^{\text{th}}$ derivative of $x^x$

Can someone help me to confirm this identity that I have established, I really have no idea how I would go about proving that this is true.

By the way, this is not a homework assignment, I am just genuinely curious. Thank you!

If $$f(x)=x^x$$, then

$$f^{(n+1)}(x)=f^{(n)}(x)(\ln(x)+1)+\sum_{k=1}^n (-1)^{k+1}\frac{n!}{k(n-k)!}f^{(n-k)}(x)$$ $$\text{ for } n\in\mathbb{N}$$

where $$f^{(n)}(x)$$ is the $$n^{\text{th}}$$ derivative of $$f(x)$$

For $$n = 1$$,

\begin{align*} f(x) &= x^x\\ & = e^{x\ln x}\\ f'(x) &= \frac{d}{dx} e^{x\ln x}\\ &= e^{x\ln x} \left(\ln x + 1\right)\\ &= x^x\left(\ln x + 1\right)\\ \end{align*}

Let $$g(x) = \ln x + 1$$. Then for $$k \ge 1$$, $$g^{(k)}(x) = (-1)^{k-1}(k-1)!\ x^{-k}$$

From the second derivative onwards, i.e. $$n \ge 1$$, using the general Leibniz rule,

\begin{align*} f^{(n+1)}(x) &= \frac{d^n}{dx^n}f'(x)\\ &= \frac{d^n}{dx^n}\left[f(x)\ g(x)\right]\\ &=\sum_{k=0}^{n}\binom{n}{k}\ f^{(n-k)}(x)\ g^{(n)}(x)\\ &= f^{(n)}(x)\ g^{(0)}(x) + \sum_{k=1}^{n}\binom{n}{k}\ f^{(n-k)}(x)\ g^{(n)}(x)\\ &= f^{(n)}(x) \left(\ln x + 1\right) + \sum_{k=1}^{n}\binom{n}{k}\ f^{(n-k)}(x)\left[(-1)^{k-1}(k-1)!\ x^{-k}\right]\\ &= f^{(n)}(x) \left(\ln x + 1\right) + \sum_{k=1}^{n}(-1)^{k+1}\frac{n!}{k(n-k)!}\ f^{(n-k)}(x)\ \color{red}{x^{-k}}\\ \end{align*}

The red $$x^{-k}$$ is what I think the question may be missing, but I could be wrong.

• You are right! When I originally did this on paper, I did include an x^k in the denominator. I simply forgot to insert it into my question when I typed it. – Brothersquid Oct 6 '18 at 21:57
• Oh yeah there we go! I like it. – clathratus Oct 6 '18 at 21:58
• Also in the last two lines, your n seems to have changed to a Zero – Brothersquid Oct 6 '18 at 21:58
• @Brothersquid fixed, thanks. – peterwhy Oct 6 '18 at 22:01

I recently found something related. Given that $$f(x)$$ and $$g(x)$$ are continuous and $$n$$-times differentiable on some interval $$I\subseteq \Bbb R$$, and $$u(x)=f(x)g(x)$$, then $$u^{(n)}(x)=\sum_{k=0}^{n}{n\choose k}f^{(n-k)}(x)g^{(k)}(x).$$

If you can find $$n$$-times differentiable $$f(x)$$ and $$g(x)$$ such that $$x^x=f(x)g(x)$$, then you have your theorem.

• I thought of that, though be careful that the fraction inside the summation has denominator $k$, not $k!$. Wikipedia call this the general Leibniz rule. – peterwhy Oct 6 '18 at 21:24
• @peterwhy what fraction in the summation? – clathratus Oct 6 '18 at 21:59
• That $k$ in the $\frac{n!}{k(n-k)!}$ in the question. But after I worked out my answer, that $k$ instead of $k!$ actually makes sense. – peterwhy Oct 6 '18 at 22:03
• @peterwhy I didn't catch that. But I'm sure that the method that I suggested would yield the same result. – clathratus Oct 6 '18 at 22:06