> 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.
Let l be the length of the card; let w be the width.
Let d be the depth of the box.
Then the volume of the box as a function of d is
v(d) = (l-2d)(w-2d)(d)
= 4d^3 - 2(l+w)d^2 + lwd
Its derivative is
v'(d) = 12d^2 - 4(l+w)d + lw
The maximum volume of the box is attained when the derivative equals
zero, and the quadratic formula gives us:
d = ( 4(l+w) +- sqrt(16(l+w)^2 - 48lw) ) / 24
= ( 4(l+w) +- 4 * sqrt((l+w)^2 - 3lw) ) / 24
= ( l + w +- sqrt(l^2 - lw + w^2) ) / 6
Did someone say that I did some handwaving about whether this is a
minimum or maximum? And about whether either of the two values for d
is reasonable when compared to l and w? Nobody? Great. So let's
stop here for now.
> Having made the box, I found that the length of its rectangular base
> was four times its width.
We notice that
l - 2d = 4(w - 2d)
l - 2d = 4w - 8d
4w - l = 6d
Hey, we have a nice formula for 6d!
4w - l = l + w +- sqrt(l^2 - lw + w^2)
3w - 2l = +- sqrt(l^2 - lw + w^2)
(3w - 2l)^2 = l^2 - lw + w^2
9w^2 - 12wl + 4l^2 = l^2 - lw + w^2
8w^2 - 11wl + 3l^2 = 0
(w - l) (8w - 3l) = 0
> What were the dimensions of the original piece of card?
If w == l, then the original card is a square, but that doesn't work.
So 8w == 3l. Since the card's dimensions (in cm) are integers and one
is prime, our answer must be "3cm by 8cm".
--brian