A table is to be constructed by gluing together 68 cubes of dimension $1\times 1\times 1$. All four legs and the rectangular top will be formed by the cubes. The four legs must be the same length and must be one cube thick, and the top is one cube thick, as well. What is the maximum possible volume of the space between the table's top and the floor, excluding the space taken up by the table's legs?
My solution:
Let $a$ be the area of the top and $c$ be the length of a leg.
$$ \begin{align} a + 4c &= 68 \cr a &= 68 - 4c \end{align} $$ We try to find the maximum value of ac, and then subtract 4c:
$$ac = (68 - 4c)c = -4c^2 + 68c$$
Completing the square gets $-4(c - 17/2)^2 + 289$.
The lowest value of $ac$ is when $c= 17/2$, and the lowest value is $289$. Then we subtract $289 - 4c = 289 - 34 = 255$.
Therefore, the maximum volume when excluding the volume of the legs is $255$.
However, the actual answer is $256$ as the maximum volume when excluding the legs. Where did I go wrong?
You want to maximise the volume excluding the legs, which is $ac-4c$. You maximised $ac$ instead.
We have that $ac-4c=-4c^2+64c$.
Now complete the square:
$$ -4c^2+64c=256-(16-2c)^2$$
The maximum of $256$ is at $c=8$.