M=2b^2+4bh, V=hb^2, V=512 so
hb^2=512
h=512/b^2 using this value of h in the material function...
M=2b^2+4b(512/b^2)
M=2b^2+(2048b/b^2)
M=2b^2+2048/b
M=(2b^3+2048)/b
dM/db=(6b^3-2b^3-2048)/b^2
dM/db=(4b^3-2048)/b^2
dM/db=0 when 4b^3=2048
b^3=512
b=8cm, and since h=512/b^2
h=512/64=8cm
Therefore the box that uses the least material is a perfect cube with sides of 8cm.