Question: differentiate a function with respect to a vector (number of parameters)

f:=x+y+y;

diff(f,x);
diff(f,y);
diff(f,z);

What I hope to get is a vector with i-th entry being the dervative of f, differentiated w.r.s.t the i-th parameter, like this

Vector([1,1,1]);

 

Is there a more efficient (built-in) command to do this?

 

VectorCalculus[diff] does not do what I want.

 

Thanks,

 

casper

 

Please Wait...