Say you have a sheet of gold with dimensions $5$ units by $8$ units, and you want to cut out a square with side-length $z$ from each corner of the box so that you can subsequently fold the sides up in order to construct an open-topped box. What is the optimal value of $z$ if we want to maximize the volume of the resulting box?
Honestly I think the problem I am having is visualizing this. I've tried drawing pictures, and I still don't get it. I think this is like a calculus optimization question, so I tried setting up equations.
Volume = $40 \cdot z$.
But I don't know how to come up with the constraint function. Can someone please help?