Optimization

Write the quantity to optimise as a function of one variable, find its critical points, and check the ends and the context.

From Calculus 1.