Cardboard box optimization exercises

 Abstract

We study what integer dimensions of a rectangular piece of cardboard provide integer solutions to a standard optimization problem in introductory calculus.

Setup

We have a rectangular piece of cardboard, of length 𝐿 and width π‘Š. Four equal-sized squares of sidelength π‘₯ are cut out of each corner, and the resulting flaps are folded up to produce a box. The quantity to be optimized is the volume 𝑉 of the resulting box.

Objective function & feasible domain

Once the squares are cut out, the dimensions of the base are 𝐿 - 2π‘₯ and π‘Š - 2π‘₯, making our volume function

𝑉 = 𝑉(π‘₯)

= π‘₯(𝐿 - 2π‘₯)(π‘Š - 2π‘₯)

= 4π‘₯³ - 2π‘₯²(𝐿 + π‘Š) + π‘₯πΏπ‘Š.

The feasible domain for π‘₯ is

0 ≤ π‘₯ ≤ min(𝐿, π‘Š)/2.

Solution for π‘₯

We differentiate our objective function to find its stationary points:

d𝑉/dπ‘₯ = 12π‘₯² - 4π‘₯(𝐿 + π‘Š) + πΏπ‘Š,

and plugging directly into the Quadratic Formula, the stationary points occur at

π‘₯ = [4(𝐿 + π‘Š) ±{16(𝐿 + π‘Š)² - 48πΏπ‘Š}]/24

π‘₯ = [(𝐿 + π‘Š) ±{(𝐿 + π‘Š)² - 3πΏπ‘Š}]/6

π‘₯ = [(𝐿 + π‘Š) ±{𝐿² - πΏπ‘Š + π‘Š²}]/6

Notice that the stationary points are homogeneous in 𝐿 and π‘Š, i.e. if we scale the box up by a factor Ξ», the stationary points

π‘₯ = [(𝐿 + π‘Š) -{𝐿² - πΏπ‘Š + π‘Š²}]/6

π‘₯ = [(𝐿 + π‘Š) +{𝐿² - πΏπ‘Š + π‘Š²}]/6

also scale by a factor Ξ». Therefore, if some particular values of 𝐿 and π‘Š give rational but not integral values of π‘₯₋ and π‘₯₊, it's always possible to scale them so that π‘₯₋ and π‘₯₊ become whole numbers.

If L W, the stationary point x₊ is outside the feasible domain

Although the quadratic formula gives us two distinct stationary points π‘₯₋, π‘₯₊ when 𝐿 π‘Š, only one of them is feasible in the real-world context. Since {𝐿² - πΏπ‘Š + π‘Š²} > min(𝐿, π‘Š), it follows that

π‘₯ = [(𝐿 + π‘Š) +{𝐿² - πΏπ‘Š + π‘Š²}]/6

> [3min(𝐿, π‘Š)]/6 = min(𝐿, π‘Š)/2

is never in the feasible domain, and can be omitted as a possible extremum.

Another way of seeing this: since our objective function 𝑉(π‘₯) has zeroes at π‘₯ = 0, π‘₯ = 𝐿/2, and π‘₯ = π‘Š/2, then if 𝐿 ≠ π‘Š, by Rolle's theorem 𝑉(π‘₯) must have a horizontal tangent in the open interval between π‘₯ = 𝐿/2 and π‘₯ = π‘Š/2. See Cardboard Box OptimizationVisualizer (desmos.com)

Getting "nice" rational answers

If we hope to get a rational answer for π‘₯₋, we need 𝐿² - πΏπ‘Š + π‘Š² to be a perfect square. This is equivalent to specifying that we need 𝐿, π‘Š to be two sides of a 60° triangle which has 3 integer sides, i.e. (𝐿, π‘Š, {𝐿² - πΏπ‘Š + π‘Š²}) form an Eisenstein triple. Wikipedia gives the following list of primitive Eisenstein triples for small values of 𝐿 and π‘Š:

Length, 𝐿

Width, π‘Š

{𝐿² - πΏπ‘Š + π‘Š²}

3

8

7

5

8

7

5

21

19

7

15

13

7

40

37

8

15

13

9

24

21

Plugging these values into the Quadratic Formula given above, we find the following values for π‘₯₋:

Length, 𝐿

Width, π‘Š

{𝐿² - πΏπ‘Š + π‘Š²}

π‘₯₋

3

8

7

(3+8-7)/6 = 2/3

5

8

7

(5+8-7)/6 = 1

5

21

19

(5+21-19)/6 = 7/6

7

15

13

(7+15-13)/6 =3/2

7

40

37

(7+40-37)/6 = 5/3

8

15

13

(8+15-13)/6 = 5/3

9

24

21

(9+24-21)/6 =2

Wikipedia also gives the following recipe for generating other Eisenstein triples, which can be used to create other starting dimensions for the cardboard box problem with "nice" solutions for π‘₯₋.

Comments