The depend command tests whether an expression A depends on a variable X.
f = sin(x) + cos(y) + z; depend(f,x); 1 depend(f,w); 0