An open box has to be made by cutting squares from the sides of a piece of cardboard with dimensions 40 inches by 40 inches and folding up the sides. Let the length of the side of the squares cut be s.
After the squares are cut and the sides folded up, the base of the box has dimensions 40 - 2s by 40 - 2s. The height of the box is s.
This gives the volume of the box as (40 - 2s)^2*s
=> (1600 + 4s^2 - 160s)*s
=> 4s^3 - 160s^2 + 1600s
This has to be maximised.
Solve for s by equating the first derivative of 4s^3 - 160s^2 + 1600s with respect to s to 0
12s^2 - 320s + 1600 = 0
=> 12s^2 - 240s - 80s + 1600 = 0
=> 12s(s - 20) - 80(s - 20) = 0
=> (s - 20)(12s - 80) = 0
=> s = 20 and s = 20/3
The second derivative of 4s^3 - 160s^2 + 1600s is 24s - 320. This is equal to 160 for s = 20 and -160 for s = 20/3. The maximum value lies at s = 20/3
The sides of the squares that are cut should be 20/3 inches.
The dimensions of the box are (80/3) by (80/3) by (20/3)