Let's say that the rectangular shipping crate with a square base has the dimensions:

The volume of such a shipping crate is:

Additionally, the lateral sides have an area of:

For the base and the top:

The cost of the material is $7 per square foot for the base and $2 per square foot for the top and the sides. Then, the total cost C will be:

Because there are 4 sides, one base, and one top, and the areas of the base and the top are equal. We know that the volume is a fixed value, then:

Using this result in the expression of the cost:

Now, to find the minimum cost, we take the derivative of C with respect to a:

The minimum is obtained by solving the equation dC/da = 0:

Using this result, we can calculate b:

Finally, the dimensions of the crate that will minimize the total cost of material are:
