b) Solution using the first derivative: