Let's dimension the horizontal length with the name X and the vertical dimensions as Y.
In this way the total volume will be given under the function

The cost for the bottom is given by

While the cost for performing the top by

The cost for performing the sides would be given by

Therefore the total cost would be

The total volume is equivalent to


Replacing in our cost function


Obtaining the first derivative and equalizing to zero we will obtain the ideal measure, therefore





Then,




In this way the measures of the base should be 6.3947ft (width and length) and the height of 19.17ft.