Quiz on Optimization


Information for Questions 1-3: A piece of letter paper 8.5x11 inches is made into an open-top box by first removing the corners and then by folding the sides up to the adjacent side. The starting sheet has height and width. The objective is to maximize the volume of the box by choosing an appropriate value of x (the height of the box).

Box Folding Template (PDF)


1. What is the width of the box in terms of the cut-out size (x)?

A. width=`8.5 - x^2`
Incorrect. The width of the paper (8.5 inches) is reduced by 2x because of the cut-out on each side
B. width=`8.5 - x `
Incorrect. The width of the paper (8.5 inches) is reduced by 2x because of the cut-out on each side
C. width=`8.5-2x`
Correct. The width of the paper (8.5 inches) is reduced by 2x because of the cut-out on each side
D. width=`8.5x`
Incorrect. The width of the paper (8.5 inches) is reduced by 2x because of the cut-out on each side

2. What is the volume of the box in terms of the cut-out size (x)?

A. `x(8.5-2x)(11-2x)`
Correct. Volume is the product of height (x), width (8.5-2x), and length (11-2x)
B. `x+(8.5-2x)+(11-2x)`
Incorrect. Volume is the product of height (x), width (8.5-2x), and length (11-2x)
C. `2x(8.5-2x)(11-2x)`
Incorrect. Volume is the product of height (x), width (8.5-2x), and length (11-2x)
D. `x^2(8.5-2x)(11-2x)`
Incorrect. Volume is the product of height (x), width (8.5-2x), and length (11-2x)

3. What is the cut-out size (x) that maximizes the volume?

A. 0.59 inches
Incorrect. The correct answer is 1.59
B. 1.59 inches
Correct. The solution can be calculated in a few different ways. One way is to set the differential of the volume equal to zero and solve for `x`

$$x(8.5-2x)(11-2x) = 4x^3 - 39x^2 + 93.5 x$$

$$\frac{d(4x^3 - 39x^2 + 93.5 x)}{dx} = 12x^2-78x+93.5 = 0$$

$$x = 1.59, 4.91$$

The cut-out length is never greater than 8.5/2 = 4.25, otherwise the remaining box width is negative. This is a solution that violates a constraint. The correct solution is 1.59 inches. A negative second derivative confirms that it is a maximum.

$$\frac{d^2(4x^3 - 39x^2 + 93.5 x)}{dx^2} = 24x-78 = 24(1.59)-78=-39.95$$

Another way to solve this problem is with an optimizer. Python Gekko solves this problem. Constraints eliminate any solutions that aren't physically realistic.
from gekko import GEKKO
m = GEKKO(remote=False)
paper_width = 8.5     # width of paper
paper_length = 11     # length of paper
x = m.Var(lb=0)       # cut out length
box_width  = m.Intermediate(paper_width - 2 * x)
box_length = m.Intermediate(paper_length - 2 * x)
box_height = m.Intermediate(x)
Volume = m.Intermediate(box_width * box_length * box_height)
# lower constraint for box width with tabs
m.Equations([box_width > 0,box_length > 0,Volume > 0.01])
m.Maximize(Volume)
m.solve(disp=False)
print('width = ' + str(box_width.value[0]))
print('length = ' + str(box_length.value[0]))
print('height = ' + str(box_height.value[0]))
print('volume = ' + str(Volume.value[0]))
Numerical optimizers are the best choice when the problem has more than just a couple variables because an analytic solution is rarely possible.
C. 2.59
Incorrect. The correct answer is 1.59
D. 4.91
Incorrect. The cut-out length is never greater than 8.5/2 = 4.25, otherwise the remaining box width is negative. This is one of the false solutions obtained by differentiating the volume.

Additional information on optimization methods is available in the Design Optimization Course.