The sufrace area, S, of the box will = b^2 + 4bh where b is the side of the base and h is the height and this will = 12ft^2
The volume, V = b^2 *h
So .... we have the two equations
12 = b^2 + 4bh
V = b^2* h
We can solve for the height in the first equation and sub this into the second
12- b^2 = 4bh
h = [12 - b^2] / 4b
So....the volume is given by
V(b) = b^2 [12 - b^2] / 4b = b[12 - b^2]/4 = 3b - (1/4)b^3
Taking the derivative of this we have
V ' (b) = 3 - (3/4)b^2 set this to 0
3 - (3/4)b^2 = 0
3 = (3/4)b^2 divide through by 3
1 = (1/4)b^2 multiply both sides by 4
4 = b^2 take the positive root
2 feet = b
And h = [12 - 2^2] / 4(2) = [8] / [8] = 1 ft
So a box with a square base of 2 ft on each side and 1 ft high will produce the max volume = b^2*h = (2)^2* (1) = 4ft^3
Here's a graph of the volume where h is in terms of b : https://www.desmos.com/calculator/27nqcjdoy7
Note that the max volume occurs when b = 2 ft [ and, by implication, h = 1 ft ]
