Why Units and Sensitivity Matter
An optimization answer is more useful when it says not only what choice is best, but also what the best outcome means and how it responds to changing conditions. Units help keep the model meaningful: adding a length to an area is not a valid operation. Sensitivity describes how quickly an optimal value changes as a parameter changes.
In a model with a parameter \(a\), write the objective as \(F(x;a)\), where \(x\) is the decision variable. If an optimal choice is \(x^*(a)\), the corresponding optimal value is
The function \(V\) answers a different question from \(x^*\): \(x^*(a)\) describes the best decision, while \(V(a)\) describes the objective achieved by that decision. Its derivative \(V'(a)\), when it exists, measures the local rate of change in the optimal value as \(a\) changes.
Units in an Optimization Model
A dimensional model assigns units to variables and constants. Every term that is added or subtracted must have the same units, and both sides of an equation must have matching units. Products and quotients combine units in the usual way. For instance, length multiplied by length has units of area.
A derivative’s units are a useful check on its interpretation. If an objective is measured in square meters and the parameter in meters, the derivative of the optimal value with respect to that parameter has units of meters. For a small parameter change \(\Delta a\), the change in optimal value is approximately
The units on the right multiply to the units of \(V\). This approximation is local: it is most reliable when \(\Delta a\) is small and \(V\) is differentiable near the starting value.
Worked Example: A Rectangle with Fixed Perimeter
Worked Example: Sensitivity of Maximum Area to Perimeter
A rectangle has perimeter \(P\) meters. Let one side have length \(x\) meters, so the other side is \(P/2-x\) meters. Find the maximum area as a function of \(P\), and interpret its sensitivity.
The feasible interval is \(0\le x\le P/2\), where \(P>0\). The area objective and its derivative with respect to the decision variable are
An interior critical point satisfies \(P/2-2x=0\), so \(x=P/4\). The other side is \(P/2-P/4=P/4\). At either endpoint the area is zero, while at this interior point it is positive, so the critical point gives the absolute maximum:
The units are consistent: \(P^2\) has units of square meters, so \(A_{\max}\) is an area. Differentiating with respect to \(P\) gives
This derivative has units \(\mathrm{m^2/m}=\mathrm{m}\). For example, at \(P=20\,\mathrm{m}\), the optimal rectangle is \(5\,\mathrm{m}\) by \(5\,\mathrm{m}\), and its area is \(25\,\mathrm{m^2}\). The sensitivity there is
A small increase of \(0.2\,\mathrm{m}\) in perimeter therefore predicts an area increase of approximately \((2.5\,\mathrm{m})(0.2\,\mathrm{m})=0.5\,\mathrm{m^2}\). As a check, at \(P=20.2\,\mathrm{m}\) the formula gives \(20.2^2/16=25.5025\,\mathrm{m^2}\), an actual increase of \(0.5025\,\mathrm{m^2}\), close to the local estimate.
Why the Optimizer’s Rate of Change Often Drops Out
When the optimal decision changes with a parameter, the chain rule has two contributions: the objective can change directly with the parameter, and it can change because the optimal decision moves. At a smooth interior optimum, the first derivative of the objective with respect to the decision variable is zero. That makes the second contribution vanish in the derivative of the optimal value.
To justify the result, differentiate the defining expression for \(V\). The chain rule gives the full calculation:
\(V(a)=F(x^*(a);a)\), so the decision \(x^*\) can vary with \(a\).
\(V'(a)=F_x(x^*(a);a)\,x^{*\,\prime}(a)+F_a(x^*(a);a)\).
At a differentiable interior optimum, \(F_x(x^*(a);a)=0\). Therefore the first term is zero and \(V'(a)=F_a(x^*(a);a)\).
This is a local result about a smooth interior optimum. If a constraint is active, a boundary is moving, or the optimal choice switches between cases, the assumptions may fail. In those situations, first determine the applicable feasible region and optimal case; then differentiate the resulting value formula where it is differentiable. Do not discard terms solely because a point is called an optimum.
Worked Example: Production Cost and Maximum Profit
Worked Example: How Unit Cost Changes Maximum Profit
Let \(q\) be the quantity produced, measured in items. Suppose the selling price per item is
The parameter \(c\) is the constant production cost per item, measured in dollars per item, with \(0\le c<30\,\mathrm{dollars/item}\). Revenue minus production cost gives the profit
Both terms have units of dollars: a dollars-per-item quantity times \(q\) has units of dollars, and dollars per item squared times \(q^2\) also has units of dollars. Set the derivative with respect to \(q\) equal to zero:
Solving gives
The numerator divided by the denominator has units of items. Since \(c<30\,\mathrm{dollars/item}\), this choice is positive and at most \(15\,\mathrm{items}\), so it lies in the feasible interval. The second derivative is \(-2\,\mathrm{dollars/item^2}<0\), and the profit is a concave quadratic; thus this critical point is the absolute maximum on the interval.
Substitution, or completing the square, gives the maximum-profit function
Differentiate with respect to \(c\):
The units of \(V'(c)\) are dollars divided by dollars per item, or items. To check the formula numerically, take \(c=10\,\mathrm{dollars/item}\). Then \(q^*=20/2=10\,\mathrm{items}\), and
At \(q=10\,\mathrm{items}\), the price is \(20\,\mathrm{dollars/item}\), revenue is \(200\,\mathrm{dollars}\), and production cost is \(100\,\mathrm{dollars}\), confirming the \(100\)-dollar profit. The sensitivity is \(V'(10)=-10\,\mathrm{items}\): a small increase of \(1\,\mathrm{dollar/item}\) in unit cost predicts a profit decrease of about \(10\,\mathrm{dollars}\). This interpretation follows from multiplying the derivative’s units by the parameter change’s units.
Worked Example: Minimum Perimeter for a Required Area
Worked Example: Sensitivity to Required Area
A rectangular enclosure must have area \(A>0\) square meters. If one side is \(x>0\) meters, the other side is \(A/x\) meters. Find the least possible perimeter and its sensitivity to \(A\).
The perimeter as a function of \(x\) is
The units of \(A/x\) are \(\mathrm{m^2/m}=\mathrm{m}\), as required for a length. Differentiate with respect to \(x\):
Setting this equal to zero gives \(x^2=A\), so the positive solution is \(x=\sqrt A\). The second derivative is \(4A/x^3>0\). Also, \(P(x;A)\) tends to infinity as \(x\) approaches zero from above or as \(x\) grows without bound, so this critical point is the absolute minimum. The other side is \(A/\sqrt A=\sqrt A\). Therefore,
The derivative has units \(\mathrm{m/m^2}=1/\mathrm{m}\). For \(A=9\,\mathrm{m^2}\), the optimal sides are both \(3\,\mathrm{m}\), the minimum perimeter is \(12\,\mathrm{m}\), and the sensitivity is \(2/3\,\mathrm{m^{-1}}\). An increase of \(0.1\,\mathrm{m^2}\) near this area predicts a perimeter increase of about \((2/3\,\mathrm{m^{-1}})(0.1\,\mathrm{m^2})=0.0667\,\mathrm{m}\), to four decimal places. The optimal-value formula checks this estimate: \(4\sqrt{9.1}-12\approx0.0665\,\mathrm{m}\).
A Common Modeling Mistake
A formula can look familiar and still be invalid if its units do not match. For example, writing \(p(q)=30-q\) dollars per item when \(q\) is measured in items subtracts a quantity in items from a quantity in dollars per item. The subtraction has no consistent physical meaning, so the resulting revenue and profit model are not dimensionally valid.
The correction is to include a slope with units, as in \(p(q)=30\,\mathrm{dollars/item}-(1\,\mathrm{dollars/item^2})q\). Then each term in the price has units of dollars per item, and multiplying price by quantity gives revenue in dollars. A related mistake is to report a sensitivity without its units: the number alone does not say whether it measures dollars per item, meters per square meter, or something else.
Using Sensitivity Carefully
Before interpreting a derivative of an optimal value, check the following:
- Does each term in the objective and each constraint have consistent units?
- What are the units of the objective and the parameter, and therefore of their derivative?
- Is the optimal choice interior and differentiable as the parameter changes?
- Does the feasible region or active boundary change with the parameter?
- Is the change small enough for a local linear approximation to be appropriate?
These checks distinguish a mathematically computed derivative from a meaningful model interpretation. They also help identify when a parameter change alters the optimization problem enough that a single smooth sensitivity formula cannot be used across the whole range.
Check Your Understanding
Use units and the conditions for differentiating an optimal-value function to answer these questions.
- If an optimal value is measured in cubic meters and a parameter in meters, what are the units of the derivative of the optimal value with respect to that parameter?
- For the rectangle with fixed perimeter \(P\), what does \(dA_{\max}/dP=P/8\) mean at \(P=16\,\mathrm{m}\), including its units?
- In the production model, why must the coefficient multiplying \(q\) in the price function have units of dollars per item squared?
- State the interior-optimum condition that makes the term involving \(x^{*\,\prime}(a)\) vanish when differentiating \(V(a)=F(x^*(a);a)\).
- Why might the chain-rule sensitivity formula require extra care when an optimum lies on a parameter-dependent boundary?