Question: Bug in the D operator?

In the following, the diff operator calcuates the derivative correctly, but the D operator doesn't.  A bug?

restart;

f := x -> a[1][2]*x;    # the double index on a[][] is intended

proc (x) options operator, arrow; a[1][2]*x end proc

 

diff(f(x), x);

a[1][2]

 

D(f)(x);

(D(f))(x)

 


Here is a worksheet containing the commands above in case you want to try it yourself: mw.mw

Please Wait...