Is it possible to differentiate symbolically w.r.t. some squared quantity in Mathematica? Evaluating something like
D[x^4 + 2 x^2 + 6, x^2]
gives the error message
General::ivar: x^2 is not a valid variable.
Is there some way around this without defining a new variable $y = x^2$?
D[x^4 + 2 x^2 + 6, x] / D[x^2,x]
? $\endgroup$