Added differentiate in routines.cpp
Added differentiate to routines.cpp