Define derivative of single-variable function