diff (or derive) takes two arguments : an expression and a variable
(resp a vector of the variable name) (see several variable functions in
1.50). If only one argument is provided, the derivative
is taken with respect to xdiff (or derive) returns the derivative (resp a vector of
derivative) of the expression with respect to the variable (resp with respect
to each variable) given as second argument.
Examples :

Compute :

Input :

diff(x*y ^2*z^3+x*y*z,z)

Output :

x*y^2*3*z^2+x*y

Compute the 3 first order partial derivatives of
x*y2*z3 + x*y*z.
Input :