###### Example 10.1.1

Suppose we want to create a rectangle that has an area of \(500 \; cm^2\text{.}\) Three sides will have one type of trim while the fourth side will have trim that is twice as expensive. What should be the dimensions of the rectange to minimize the cost of the trim?

Start by identifying the variables.

- \(h\) is the horizontal width of the rectangle
- \(v\) is the vertical length of the rectangle
- \(C\) is the cost of the trim around the rectangle

Once we have identified our variables, we need to find a formula for the cost because that is what we want to minimize. We will assume that the more expensive side is one of the horizontal lengths. Let \(p\) be the unit cost (per cm) of the less expensive trim so that \(2p\) is the unit cost of the more expensive trim. The total cost of the trim is given by

Our objective function \((h,v) \mapsto C\) involves two independent variables. This means we need an additional constraint. Reviewing the problem, we recall that the total area needs to be \(500 \; cm^2\text{.}\) The area is computed by \(A=h \cdot v = 500\) so that we can treat \(v\) as another dependent variable,

Substituting this formula into our objective function, we can rewrite it involving only a single independent variable \(h\text{:}\)

Because \(p\) is a constant multiple in this formula, the location of the minimum will not depend on \(p\text{.}\)

Finally, we need to consider the physical domain for the objective function. The natural domain for the map \(h \mapsto C\) is \(h \ne 0\text{.}\) However, negative values for \(h\) don't make physical sense. The physical domain for this problem will be \(h \in (0,\infty)\text{.}\) That is, the optimization problem will be answered by finding the global minimum of \(C\) on the interval \((0,\infty)\text{.}\)

A graph of this relation is shown below using \(p=1\text{.}\) The minimum value occurs somewhere near \(h=20\) with a cost \(C\) close to \(100p\text{.}\) We need to use calculus to find the exact value.