Enigma 1715

Spoiler for New Scientist Enigma 1715:

I started with a rectangular piece of card a whole number of centimetres long by a whole number of centimetres wide, one of those numbers being a prime. Then I cut out an identical small square from each corner of the card and discarded the four squares. I folded up the four “flaps” on the remaining piece of card to form an open-topped box, choosing the size of the cut squares so that the volume of this open box was the biggest possible. Having made the box, I found that the length of its rectangular base was four times its width.

What were the dimensions of the original piece of card?

Simple calculus problem this time. If the original card was L by W cm, and the cut off squares were X cm on a side, then the final box had dimensions (L–2X) by (W–2X) by X; its volume was V = (L–2X)(W–2X)X = 4X3–2(L+W)X2+LWX. The derivative is dV/dX = 12X2–4(L+W)X+LW.

But (L–2X) = 4(W–2X), so L = 4(W–2X)+2X = 4W–6X and dV/dX = 12X2–4(5W–6X)X+(4W–6X)W = 36X2–26WX+4W2.

(The one tricky thing is you have to make this substitution after doing the derivative, not before.)

Set this to zero and solve: X = 2W/9 or W/2. The latter gives the minimum volume as you can see by looking at the sign of the second derivative or just by noticing (W–2X) = 0 so the “box” has zero volume! The former gives the maximum volume. In that case L = 4W–6X = 8/3W. The only solution with one side prime is W = 3, L = 8.