Start by Asking What Can Actually Be Chosen
Before applying calculus to an optimization problem, it is important to decide what the model’s variables represent. A variable should describe a quantity that can be chosen or varied in the problem. A number supplied as fixed information is a parameter, not a decision variable. A quantity determined from the choices is derived, and need not be introduced as a separate independent choice.
This distinction affects how compact and clear a model is. If a problem asks a designer to choose the dimensions of a rectangle, its side lengths are natural decision variables. If the problem instead gives the dimensions of a box and asks for its volume, those dimensions are fixed inputs for that calculation. The same letter can represent a decision in one problem and a fixed input in another; its role depends on the description.
For a numerical candidate design, a decision variable may be assigned a particular value to test the design. That does not change the variable’s role in the model: it was still a decision variable before the candidate was selected. Conversely, fixed dimensions in a calculation do not become decisions merely because they are written with variable symbols.
Choose Variables That Describe the Choices Directly
A good set of decision variables should represent the independent choices in the description, with as little unnecessary duplication as possible. For example, if two side lengths can be chosen, naming those two lengths is usually more direct than introducing several additional variables for quantities that can be calculated from them.
“Compact” does not mean “use the fewest symbols at any cost.” A variable is useful when it makes the choices and their meaning clear. A symbol that obscures what is being chosen, or makes units ambiguous, can make a model harder to check even if there are fewer symbols.
When deciding whether a quantity deserves its own variable, ask:
- Is this quantity an independent choice in the problem?
- Is it fixed information, such as a supplied length or capacity?
- Is it determined once the choices are made?
- What unit does it have, and will that unit remain clear in the equations?
These questions help organize a model before one tries to use any calculus. They do not determine an optimal design; they clarify what the model is describing.
Worked Example: Choosing Two Garden Dimensions
Worked Example: Choosing Two Garden Dimensions
A rectangular garden is to be enclosed using 40 metres of fencing, with fencing along all four sides. The gardener chooses the two side lengths. Define \(x\) and \(y\) to be those chosen side lengths, measured in metres. The fixed parameter is the available fencing length, \(P=40\ \mathrm{m}\).
The choices are \(x\) and \(y\), so they are the decision variables. The supplied fencing length is fixed, so \(P\) is a parameter. The perimeter constraint is
Each term on the left has units of metres: \(2\) is a pure number, while \(x\) and \(y\) are lengths. The garden’s area is a quantity determined by the chosen lengths:
Since length multiplied by length has units of square metres, \(A\) is measured in \(\mathrm{m}^2\). It is a derived quantity here, rather than an additional independent decision variable.
Check the candidate choice \(x=8\ \mathrm{m}\), \(y=12\ \mathrm{m}\). The fencing used is
Thus this candidate satisfies the fencing constraint. Its area is
Substituting the candidate dimensions back into the perimeter equation gives \(40\ \mathrm{m}=40\ \mathrm{m}\), and multiplying the dimensions gives an area with the required square-metre unit. This checks the model calculations for this candidate; it does not establish that the candidate is optimal.
Units Belong to Quantities, Not Just Their Numerical Values
A measurement combines a numerical value with a unit. The statement \(x=3\ \mathrm{cm}\) says more than \(x=3\): it identifies the measured quantity as a length and gives its scale. In a model, keep the units visible when substituting values and when comparing terms.
Units constrain which operations make sense. Quantities can be added or subtracted only when they have compatible units. For instance, \(30\ \mathrm{cm}-6\ \mathrm{cm}\) is a length, but \(30\ \mathrm{cm}-6\ \mathrm{cm}^2\) is not a meaningful subtraction of measurements. Multiplication combines units: \(\mathrm{cm}\) times \(\mathrm{cm}\) gives \(\mathrm{cm}^2\), and \(\mathrm{cm}^2\) times \(\mathrm{cm}\) gives \(\mathrm{cm}^3\).
Unit conversions must be made before adding or subtracting quantities expressed in different units. For example, \(1\ \mathrm{m}=100\ \mathrm{cm}\). A length of \(0.2\ \mathrm{m}\) is \(20\ \mathrm{cm}\), so it may be combined with another length in centimetres after that conversion.
Worked Example: One Cut Size Determines Several Dimensions
Worked Example: One Cut Size Determines Several Dimensions
A rectangular sheet measures \(30\ \mathrm{cm}\) by \(20\ \mathrm{cm}\). Equal squares of side length \(x\) are cut from its four corners, and the remaining sides are folded up to form an open box. The sheet dimensions are fixed parameters: \(L=30\ \mathrm{cm}\) and \(W=20\ \mathrm{cm}\). The chosen cut size \(x\), measured in centimetres, is the decision variable.
After cutting and folding, the base dimensions are derived from the choice:
Each subtraction is between lengths. The factor \(2\) accounts for one cut square at each end of the corresponding sheet dimension. The box volume is therefore a derived quantity:
Its units are \(\mathrm{cm}\cdot\mathrm{cm}\cdot\mathrm{cm}=\mathrm{cm}^3\), as required for volume. For the candidate cut \(x=3\ \mathrm{cm}\), the base length is
and the base width is
The candidate box has height \(3\ \mathrm{cm}\), so its volume is
Checking the defining dimensions gives \(24+2(3)=30\ \mathrm{cm}\) and \(14+2(3)=20\ \mathrm{cm}\), recovering the original sheet measurements. The volume calculation multiplies the three box dimensions, so its result has cubic-centimetre units. The cut size is the sole decision variable in this description; the base dimensions are consequences of that choice, not separate choices.
Why Dimensional Checks Work
A dimensional check is useful because the units of a quantity follow the operations used to define it. A length multiplied by another length is an area, while an area multiplied by a length is a volume. If a proposed formula for a volume contains only a product of two lengths, its units are area, so something is wrong with the formula or with the quantity it claims to represent.
The underlying reasoning is short. Addition combines quantities of the same kind, so its terms must have matching units. Multiplication combines the units of its factors. Therefore, if an equation describes a valid equality of measured quantities, both sides must have compatible units. This is why comparing units can disqualify a proposed equation.
Identify whether it is a length, area, volume, time, cost, or another measured quantity.
Convert units where necessary and confirm that the quantities being combined have matching units.
Combine units through multiplication or division, then compare the resulting units with the quantity the formula is meant to describe.
A dimensional check is a diagnostic, not a proof that a model correctly represents the situation. Two expressions can have matching units while using the wrong geometry, omitting a factor, or misrepresenting the constraints. Units can identify some errors; they cannot confirm every modeling assumption.
Worked Example: Checking a Capacity Constraint
Worked Example: Checking a Capacity Constraint
A cylindrical tank must hold \(500\ \mathrm{L}\). Suppose its radius \(r\) and height \(h\) are the dimensions a designer can choose. They are both decision variables, measured in centimetres. The required capacity is fixed information, represented by the parameter \(C=500\ \mathrm{L}\).
Using the cylinder volume formula, the capacity condition is
The constant \(\pi\) is dimensionless. The left side has units \(\mathrm{cm}^2\cdot\mathrm{cm}=\mathrm{cm}^3\), while the right side is initially given in litres. Convert the fixed capacity before comparing the two sides:
Thus the constraint can be written with consistent units as \(\pi r^2h=500{,}000\ \mathrm{cm}^3\). To check a candidate, take \(r=50\ \mathrm{cm}\) and \(h=\frac{200}{\pi}\ \mathrm{cm}\). Substitution gives
Converting back, \(500{,}000\ \mathrm{cm}^3=500\ \mathrm{L}\), so this candidate meets the stated capacity. Both \(r\) and \(h\) remain decision variables in the model, even though particular values were chosen to check this candidate. The specified capacity is a parameter, not a decision. This example checks unit consistency and the capacity equation; it does not compare designs or select an optimum.
A Common Unit-Conversion Mistake
Suppose the sheet-cutting example uses \(x=0.03\ \mathrm{m}\), while the sheet length is written as \(30\ \mathrm{cm}\). A tempting but incorrect calculation is
This treats the numerical value \(0.03\) as though it were in centimetres, even though the stated cut size is in metres. The subtraction mixed units and produced an invalid result. Convert first: \(0.03\ \mathrm{m}=3\ \mathrm{cm}\). Then the correct calculation is
Alternatively, convert the sheet length to metres and calculate \(0.30\ \mathrm{m}-2(0.03\ \mathrm{m})=0.24\ \mathrm{m}\). Both consistent calculations give the same length. The numerical answers differ because the units differ, but \(24\ \mathrm{cm}=0.24\ \mathrm{m}\).
What Units Can and Cannot Tell You
Units are also useful when a model has a measured outcome. For instance, if an area \(A\) depends on a length \(x\), then a rate of change of area with respect to length has units \(\mathrm{m}^2/\mathrm{m}=\mathrm{m}\), when area is measured in square metres and length in metres. More generally, a derivative’s units are the output units divided by the input units. This gives a useful check on an interpreted rate.
That check does not determine whether a derivative has been calculated correctly, nor whether the original model is appropriate. It supplies one independent consistency test. Throughout an optimization model, keep the roles of quantities clear: identify what is chosen, what is fixed, what is calculated from the choices, and what units each quantity carries.
Check Your Understanding
Answer these questions by identifying the roles and units of the quantities before doing any optimization.
- A rectangle’s length and width are selected, while its available perimeter is specified. Which quantities are decision variables, and which is a parameter?
- A box is made by cutting squares of side \(x\) from a fixed sheet. Why are the resulting base dimensions derived quantities rather than additional independent decisions?
- What units should result from multiplying a length, a length, and a height?
- Why must measurements be converted to compatible units before they are added or subtracted?
- If a proposed formula equates an area to a volume, what does a dimensional check reveal? Does matching units prove the formula models the situation correctly?