It is now necessary to express the three variables b, l, and h, in terms of one of them. From the relation Q = 2blh it is possible to rewrite the expression for the total cost as:

C = (3Q
2bh + 4b)qh2 + pQ
h + P.

C = (3l + 2Q
lh)qh2 + pQ
h + P.

Holding h constant and differentiating with regard to b in the first expression and with regard to l in the second expression, equating to zero and solving we get:

b = √3Q
8h and l = √2Q
3h.

The economical relation between b and l is therefore

b = 0.75l

regardless of the value of h.

Substituting these values of l and b in the original expression for the total cost, it becomes

C = (3√2Q
3h + 4√3Q
8h)qh2 + pQ
h + P.