Improve #differentiate