added vdiff function to calculate the derivative of an expression about a vector