Trying to compute high order derivatives of a power of a function, WolframAlpha gives me this answer
$$\frac{d^n f(x)^N}{dx^n} = N \binom{n - N}{n} \sum_{k=0}^n \frac{(-1)^k}{N-k} \binom{n}{k} \frac{d^n f(x)^k}{dx^n} f(x)^{N-k}$$
What is $\binom{n-N}{n}$, for $N > n$ ?
If I define $F(N,n) = \frac{d^n f(x)^N}{dx^n}$ the recursion is
$$F(N,n) = N \binom{n - N}{n} \sum_{k=0}^n \frac{(-1)^k}{N-k} \binom{n}{k} F(k, n) f(x)^{N-k}$$
But how can I compute this?
if I take $F(n,n)$ it becomes
$$F(n,n) = n \binom{0}{n} \sum_{k=0}^n \frac{(-1)^k}{n-k} \binom{n}{k} F(k, n) f(x)^{n-k} $$
The term with $k=n$ is problematic, how should I handle, I can take it out of the summation and I get something like this.
$$\left(1 - \frac{n(-1)^n}{0}\right)F(n,n) = n \binom{0}{n} \sum_{k=0}^{n-1} \frac{(-1)^k}{n-k} \binom{n}{k} F(k, n) f(x)^{n-k}$$
The complexity $O(n^2)$ of this recurrence is interesting, but how could I compute this?
It would be preferable if it was an algorithm that could compute $F(N, k)$, one by one using the lower order derivatives of the same power.