Solution
Alex Y
Here's how to get to the correct answer:
Let the card have dimensions L and W, and cut out squares that are H on a side.
Condition 1: The resulting box has a base that is 4:1
L-2H = 4*(W-2H)
L-2H = 4W - 8H
6H = 4W -L
Condition 2: The resulting box is the largest that can be made from the given card
First get a formula for Volume:
V = H * (L-2H) * (W-2H)
V = 4*H^3 -2*(L+W)*H^2+L*W*H
Then to find the H that gives you the largest volume (independent of condition 1--where I went wrong), differentiate wrt to H
DV/DH = 12*H^2 - 4*(L+W)*H + L*W
Setting that equal to zero and solving the quadratic gives us
H = (4*(L+W) +/- sqrt(16*(L+W)^2-48*L*W))/24
removing 4 from the numerator and denominator:
H = ((L+W) +/- sqrt((L+W)^2-3*L*W))/6
or
6H = (L+W) +/- sqrt((L+W)^2-3*L*W)
Combining conditions 1 and 2, get
4W-L = (L+W) +/- sqrt((L+W)^2-3*L*W)
3W - 2L = +/- sqrt((L+W)^2-3*L*W)
Squaring both sides,
9W^2 - 12WL + 4L^2 = (L+W)^2-3LW
9W^2 - 12WL + 4L^2 = L^2+2WL+W^2-3WL
Combining terms:
8W^2 - 11WL + 3L^2 = 0
Factoring:
(8W-3L)*(W-L) = 0
So either L=W (a square, obviously not the answer) or L=8/3 * W
And from the integer and prime conditions, we get W=3, L=8
Whew! It's been 40 years since I did so much calculus and algebra!