Refer to problem 5 of this link: Applications of maximum and minimum values - An approach to calculus
It provides a framework to follow.
Refer to problem 5 of this link: Applications of maximum and minimum values - An approach to calculus
It provides a framework to follow.