If I evaluate D[f[g[x]],{x,5}]
, I'll get a result containing derivatives of f and g, explained here. But suppose that I have explicit formulae for the derivatives $g^{n}(x)$, for $n=1,2,\ldots$. How can I substitute these into my result, so that my result doesn't contain $g$ (or its derivatives), except for terms of the form $f^{n}(g(x))$? (Without copying and pasting manually.)
I've tried Solve
and Reduce
, but it doesn't actually substitute the function, and Replace
doesn't work on this type of problem. Any help would be greatly appreciated.