Finding the value of labour that maximizes the profits from a production function