In two dimensions, consider the following standard problem: Show that the area of a rectangle of given perimeter is maximised when the sides all have length , i.e. we have a square.

This is easy to solve, we simply write and substitute into , which simplifies to a quadratic function; then we simply complete the square to find the vertex of the parabolic graph.

In three dimensions, something a little more interesting happens. I wish to frame the problem as follows:

Find , , and , such that a rectangular prism with perimeter (sum of all sixteen sides) and surface area has maximal volume.

In other words, we want to maximise with the constraints and . Substituting:

hence is a cubic function of . This is interesting, because it suggests that as , ; a very different behaviour to the 2D case. However, as we vary to large values, we notice that and become non-real; so we’ve lost some information somewhere: namely, the largest value of that `makes sense’ to form a cube with the given perimeter; we have , so for , at least one of and must be negative – which is absurd.

Taking the case and , we find that the graph of versus is a cubic with a single point of inflection (the parabola graphed here is ):

The only critical point is , but the constraint we identified above tells us that the values of which might make sense are ; for , we obtain , and thus we have the system of equations which again give us non-real values for and ; thus our constraint is not good enough to solve the problem!

By symmetry, I guess in this case that the optimal solution is a cube (); but how to prove this?

Well, if we solve for in terms of alone by substituting our original constraints together, we end up with a quadratic equation and the following:

.

Hence is real if and only if (and the formula for the perimeter tells us that is real precisely when is).

In our concrete example, we need to find the maximal such that ; this will be the larger root, which is , precisely as predicted. (In fact, is the only root; hence we can say that the *only* set of dimensions which produce the given perimeter and area are , which is a much stronger statement than we can say in the 2D case!)

In fact, one might conjecture based on our calculations so far that the allowable values of are precisely those between the turning points of ; this is almost true!

Indeed, ; and and are defined between the roots of , which are the same as the roots of (after dividing through by ) . These are so close to being the same polynomial; they simply differ by a constant term! We see that:

- in the case that , the permissible values for lie within the turning points of ;
- in the case that , the range of permissible values lies strictly between the turning points; and
- in the case that , the range of permissible values includes more than the range between the turning points.

The case that suggests another interesting line of enquiry is the final one: is it possible for there to be a permissible value of that gives a larger value of than the local maximum? (At first glance, yes: simply take a really large value for the perimeter and a small value for the surface area. But does a large perimeter force us to pick a large surface area? I don’t think so, but I haven’t checked.)

Anyway, we have answered our original question: we simply find the values of at the endpoints of the range of permissible values of , and the local maximum of the cubic, and take the largest value of that we get in this way (and find the dimensions corresponding to it by solving the system of equations given by the constraints).