Tutorials › Calculus I › Choosing Decision Variables And Tracking Units

Optimization and Newton's Method · Tutorial 861 of 1495

Choosing Decision Variables And Tracking Units

Learn to identify the actual choices in a model, choose variables that describe them efficiently, and use units to check equations and calculations.

Advanced 9 min read

What You'll Learn

  • Distinguish decision variables from fixed parameters and derived quantities.
  • Choose variables that describe the available choices without unnecessary duplication.
  • Attach consistent units to variables, parameters, constraints, and measured outcomes.
  • Check that additions, products, and equations have compatible units.
  • Use dimensional checks to identify errors without mistaking them for proof that a model is correct.

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.

Definition: A decision variable represents a quantity the problem allows us to choose. A parameter is a fixed quantity supplied by the problem. A derived quantity is calculated from the decisions and parameters.

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

$$ 2x+2y=40\ \mathrm{m}. $$

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:

$$ A=xy. $$

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

$$ 2(8\ \mathrm{m})+2(12\ \mathrm{m}) =16\ \mathrm{m}+24\ \mathrm{m} =40\ \mathrm{m}. $$

Thus this candidate satisfies the fencing constraint. Its area is

$$ A=(8\ \mathrm{m})(12\ \mathrm{m})=96\ \mathrm{m}^2. $$

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.

Dimensional check: Every term in an addition or subtraction must have the same units. The two sides of an equation must also have compatible units. Products and quotients carry the products and quotients of their factors’ units.

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:

$$ \text{base length}=L-2x, \qquad \text{base width}=W-2x, \qquad \text{height}=x. $$

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:

$$ V=x(L-2x)(W-2x). $$

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

$$ 30\ \mathrm{cm}-2(3\ \mathrm{cm}) =30\ \mathrm{cm}-6\ \mathrm{cm} =24\ \mathrm{cm}, $$

and the base width is

$$ 20\ \mathrm{cm}-2(3\ \mathrm{cm}) =20\ \mathrm{cm}-6\ \mathrm{cm} =14\ \mathrm{cm}. $$

The candidate box has height \(3\ \mathrm{cm}\), so its volume is

$$ V=(3\ \mathrm{cm})(24\ \mathrm{cm})(14\ \mathrm{cm}) =72\ \mathrm{cm}^2\cdot14\ \mathrm{cm} =1008\ \mathrm{cm}^3. $$

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.

1
Write each quantity with its unit.
Identify whether it is a length, area, volume, time, cost, or another measured quantity.
2
Check additions and subtractions.
Convert units where necessary and confirm that the quantities being combined have matching units.
3
Check products, quotients, and equations.
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

$$ \pi r^2h=C. $$

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:

$$ 500\ \mathrm{L} \left(\frac{1000\ \mathrm{cm}^3}{1\ \mathrm{L}}\right) =500{,}000\ \mathrm{cm}^3. $$

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

$$ \pi(50\ \mathrm{cm})^2 \left(\frac{200}{\pi}\ \mathrm{cm}\right) =\pi(2500\ \mathrm{cm}^2) \left(\frac{200}{\pi}\ \mathrm{cm}\right) =500{,}000\ \mathrm{cm}^3. $$

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

$$ 30\ \mathrm{cm}-2(0.03)=29.94\ \mathrm{cm}. $$

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

$$ 30\ \mathrm{cm}-2(3\ \mathrm{cm})=24\ \mathrm{cm}. $$

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}\).

Common pitfall: A bare number does not carry its unit with it. Before adding or subtracting measurements, express them in compatible units and keep the units visible through the calculation.

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.

  1. A rectangle’s length and width are selected, while its available perimeter is specified. Which quantities are decision variables, and which is a parameter?
  2. 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?
  3. What units should result from multiplying a length, a length, and a height?
  4. Why must measurements be converted to compatible units before they are added or subtracted?
  5. 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?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon