Let's set up the following...
V=volume
L=length
W=width
H=height=x.....height of box, unknown
Per prob statement, cardboard dimensions are 18"x6" (LxW).
The sides (H=x at each end, unknown) are subtracted from overall
length and width to get...
L=18-2x
W=6-2x
V=L(W)(H)..................equation for volume
=(18-2x)(6-2x)(x)......Eq1, substitutes values
=(108-48x+4x2)(x)....expand
V=4x3-48x2+108x........Eq2, distribute, rewriten. This is a cubic
equation (degree 3).
Find "zeros" (points where curve crosses x-axis) of the Eq1 by setting
each term greater then zero (distance is always positive)...
18-2x>0........first term "L" length
-2x>-18....subtract 18 both sides
x<9.......divide by (-2) both sides, revise sign, meaning "x"
has to be less than 9 for L to be positive
6-2x>0.........second term "W" width
-2x>-6........subtract 6 both sides
x<3.........divide by (-2) both sides, reverse sign, meaning "x"
has to be less than 6 for W to be positive
x>0.........third term "H" height, meaning "x" has to be greater
than 0 volume to be positive, H to be positive.
Let's look at the graph of Eq2. See attached....
https://www.wyzant.com/resources/files/403250/graph_of_cubic_equation
We are graphing height "H" (along x-axis), volume "V" (along y-axis).
We only consider the portion of curve over the interval 0<x<3
(second and third term zero values above) as that will produce
positive values for V, L, W, H. We see that the point (1.35, 68.2)
is the vertex which will produce mamximum volume over the
interval 0<x<3.
Let's substitute (1.35, 68.2) into the above dimension equations and
use them to solve for the volume. The optimum dimensions of the
box are...
L=18-2(1.35)
=18-2.70
=15.30"
W=6-2(1.35)
=6-1.35
=3.30"
H=1.35"
V=15.30"(3.30")(1.35")
=68.16in3 maximum volume.
The bottom box dimensions are 15.3"x3.3".