7.42 bug in D, Maple V to Maple 8 (6.8.02)

7.42.1 Paul E.S. Wormer

Here follows a transcript of a Maple 6 session on a PC:

> D[1](f); D[2](f); 
> D[1](exp@f); 
                           (exp@f) D[1](f) 
> D[2](exp@f); 
Error, (in D/exp) invalid arguments

My question is: what is wrong with the last statement?

7.42.2 Robert Israel(7.8.02)

It’s a bug, and still present in Maple 8. A work-around is

> g:= (s,t) -> exp(f(s,t)); 

7.42.3 Bill Whiten (8.8.02)

D[n] refers to nth argument, not nth derivative e.g.:

> D[1](exp); 
> D[1](x->x^2); 
                               x -> 2 x 
> D[2]](exp); 
Error, (in D/exp) invalid arguments 
> D[2](x->x^2); 
Error, (in D/procedure) index out of range: function takes only 1 arguments 
> D[1]((x,y)->x^2+y^2); 
                            (x, y) -> 2 x 
> D[2]((x,y)->x^2+y^2); 
                            (x, y) -> 2 y 
> D[1](D[1](exp)); 
> D[1](D[2]((x,y)->x^2*y^2)); 
                           (x, y) -> 4 x y

7.42.4 Stanley J Houghton (9.8.02)

It looks to me like a bug arising from

> D[2](f@g); 

Surely, by definition, it should deliver the result (D[1](f)@g)*D[2](g) when f is a function of one variable (as with exp in your case).

In addition, I see that the same error arises when the variables are explicitly shown in

> D[2]((x,y)->(exp@f)(x,y));