This is a follow-up question to Differentiate w.r.t. squared variable.
I want to be able to compute partial derivatives of the form $$\partial_{x^n}^m \, f(x) = \frac{\partial^m}{\partial^m x^n} \, f(x).$$ For instance, $\partial_{x^2}^2 \, x^4$ should give $2$, and $$\partial_{x^3}^2 \frac{x^5}{\sqrt{x^3+y^2}} = \frac{7 x^6+20 x^3 y^2+40 y^4}{36 x \left(x^3+y^2\right)^{5/2}}.$$
What I have so far is
myD[f_, x_^n_] := FullSimplify[D[f, x]/D[x^n, x]]
This works great for computing first-order partial derivatives with respect to quantities raised to some power, i.e. derivatives of the form $\partial_{x^n} \, f(x)$.
To compute higher-order derivatives $\partial_{x^n}^m \, f(x)$ for $m > 1$, I would somehow need to store intermediate results after each differentiation and divide by the factor $\partial x^n/\partial x$ from the chain rule, before applying the next partial derivative. I'm fairly new to Mathematica, and I have no idea how to do this. Any help would be great.
Nest
? $\endgroup$