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)$
 A: 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.
A: 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.
