You have to construct a square-based rectangular prism where the cost is 2 cents per square centimeter for the base and top, and 1 cent per square centimeter for the sides.
The height cannot be greater than 30cm and the Volume holds 2 Litres. Use the constraints on carton capacity to express cost as a single variable and find the range of this chosen variable, aiming to minimise cost.
Now I assume
$$C = 2(2l^2) + 1(4h)$$
with the constraints
$$h < 30\>\>\>\text{and}\>\>\>V = l^2*h = 2000$$
We could sub in $h = V/l^2$. But I'm really confused what to do after this point or if this is even correct.
Best Answer
The total cost equation is given by
$$ C = 2\times 2l^2 +1\times 4lh $$
with the volume $l^2h=2000$.
Substitute the height $h=2000/l^2$ in the cost with $l$ to express the cost with a single variable $l$,
$$ C(l) = 4l^2 + \frac{8000}{l} $$
Then, take the derivative and set it to zero $dC/dl=0$,
$$8l-\frac{8000}{l^2}=0$$
which gives
$$l = 10$$
The corresponding height is then
$$h=20$$
Thus, to minimize the cost, the dimension is 10cm wide for the square and 20cm in height.
Here are the plots for both $C(l)$ and $dC/dl$,