Mathematical modeling and selection of machining parameters for optimization of surface roughness in metal machining