Question: Calculating n times the differential Operator

Is it possible to use the diff(f,x) operator together with @@ ??

So as in

((x*D)@@2)(f)(x)

-> (x*diff(f,x))@@2 which is of course wrong, but I guess you know what I mean.

In the first case maple evaluates ((x*D)@@1)(x) to x(x)*D(x), but of course x(x) is nonsense here, as x is the variable, so x(anything)=x and D(x) should also be reduced to 1. Is it not possible to tell D that x is the differentiation variable?

 

Probably I could make rules like

applyrule(x(a::anything)=x,expression)

but that seems rather cumbersome.

Much simpler would it be to tell maple in the first place how D and x precisely act.

Please Wait...