
We start with a rectangular piece of cardboard with the
dimensions (L x W).   The thickness of the cardboard is
ignored as negligible.

L = Length of rectangular piece of cardboard.
W = Width  of rectangular piece of cardboard.
D = Depth of box  created from the cardboard.

V = Volume of a box created from the rectangular cardboard.
  = (Length - 2*D) * (Width - 2*D) * Depth
  = (L - 2*D) * (W - 2*D) * D

What optimum value of (D) will produce the maximum possible
volume box from a cardboard rectangle of the given dimensions?

Solution:
D = Optimum depth of box created from a piece of cardboard with
    dimensions (L x W) that will produce a box with the maximum
    possible volume.

D = (L + W - SqRt((L+W)^2 - 3*L*W)) / 6

V = Maximum possible box volume.
  = (L - 2*D) * (W - 2*D) * D





