Let
and
be the base side length and height of the box, respectively (both in metres).
The volume of the box is
cubic metres.
The cost of the box base is
per square metre; since the area of the base is
square metres, the cost of the box base is
dollars. The cost of the box sides is
per square metre; since there are four sides to the open top box, each with area
square metres, the cost of the box sides is
dollars. We are given that the total cost of the box is
so our full optimization problem is

Solving for
in the constraint equation, we obtain

Now substituting this into into the objective function, we have

If we let
we can maximize
over
by setting
and finding critical points:

But since we must have
(i.e., the side length of the box must be positive), it is
which maximizes the volume of the box. We verify that this is indeed a maximum by taking the second derivative of
and evaluating it at

Hence by the second derivative test,
attains a local maximum when
Since the height of the box is
when
we have
Therefore the dimensions of the box of maximal volume are