In case you're wondering how to get differentials to act like operators in Mathematica, I stumbled across a package Carl Woll made to solve this issue in this question. There's a a more recent version of the package in his github than is linked in his comment. Here's how to write it using the package:

$\left(f\left(x\right)\frac{\partial}{\partial x}\right)^nf\left(x\right)$=Simplify[((Subscript[operator[DifferentialOperator[]], x] f[x])^n)[f[x]]]

What I want is a summation which can give the same result. I tried telling Mathematica to assume n was a positive integer but it didn't simplify any more. Can anyone help me?

Example for n=3:


  • 1
    $\begingroup$ Based on the comments below Bob's answer, I believe you are asking a Math question rather than a Mathematica question. The answer is likely related to the Faa Di Bruno formula. $\endgroup$
    – QuantumDot
    Commented Sep 17, 2019 at 23:07
  • $\begingroup$ Oh... when I was looking up how to use differentials as operators in Mathematica I was looking in this stackexchange. I guess I absent mindedly decided to use this stackexchange when I asked this question... My bad. Also, thanks for the help, I'll look into it. $\endgroup$
    – Laff70
    Commented Sep 18, 2019 at 4:43

1 Answer 1


You can use a recursive definition


d[0] = f[x];

d[n_Integer?Positive] := d[n] =
  f[x]*D[d[n - 1], x] // Simplify

Column[d /@ Range[0, 4], Dividers -> All]

enter image description here

  • $\begingroup$ While that is a simpler new way to do it which only requires vanilla Mathematica, it isn't quite what I'm looking for unfortunately. I appreciate it though. EDIT: I should clarify a bit, I'm going to be using this to find the value of these odd derivatives of f[x] at a specific value. So each $f^n(x)$ should simplify down to a single value rather than a full fledged function. The final value would then be inserted into a Taylor series expansion. Having to have my computer find the derivative at each step in the calculation might eat up too much time. I think a sum would work better. $\endgroup$
    – Laff70
    Commented Sep 17, 2019 at 0:18
  • 1
    $\begingroup$ @Laff70 Can you give an example what you are expecting. From what I can tell, 4th line of the table reproduces your formula. $\endgroup$
    – yarchik
    Commented Sep 17, 2019 at 0:36
  • $\begingroup$ I want something along the lines of:$$\sum_{a=0}^?c_a\prod_{b=0}^? f^b\left(x_0\right)$$I hope that's helpful enough. $\endgroup$
    – Laff70
    Commented Sep 17, 2019 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.