Unit 7, lesson 61

Variables, Parameters, and Building a Model

How to name the quantities in a situation, use a constraint to reduce them to one input, and write a formula with units and an honest domain.

  • Theory part 121
  • Practice part 122
  • Geometry and Models

A farmer has 24 meters of fencing and wants a rectangular pen. Every choice of width gives a different area, and before anyone can ask which width is best, the situation has to become a function of one input. Most optimization and related rates problems in calculus fail or succeed at exactly this step, long before any derivative appears.

Key terms

Model

Definition A mathematical model of a situation is a function, equation or set of equations that describes how the quantities in the situation are related, together with the assumptions under which that description is meant to hold. A one-variable model is a function y=f(x)y = f(x) of a single input together with a stated domain of allowed inputs.

In plain words A model is a formula plus the fine print. The formula says how the numbers are connected, and the assumptions say when you are allowed to trust it.

Example For the rectangular pen with 24 meters of fencing, a model for the area in terms of the width xx in meters is

A(x)=x(12−x),0<x<12.A(x) = x(12 - x), \qquad 0 < x < 12.

The assumptions are that all 24 meters are used, that the pen is a genuine rectangle, and that the fence has no gate or gap. The rest of this page explains where each piece comes from.

Variables and constants

Definition A variable is a symbol that stands for a quantity allowed to take different values within the situation, usually any value in some set. A constant is a quantity whose value is fixed by the situation or by mathematics and does not change, such as π\pi, the 2424 meters of fencing, or the factor 4.94.9 in the falling distance 4.9t24.9t^2 near the surface of the earth.

In plain words Variables are the things that can move. Constants are the numbers that stay put no matter which case you look at.

Example In the pen, the width xx, the length yy and the area AA are variables, since different pens have different values. The total fencing 2424 and the number 22 in the perimeter formula 2x+2y2x + 2y are constants.

Parameters

Definition A parameter is a quantity that is held fixed during a particular calculation with a model but may be given different values to compare one model with another. Whether a letter is a parameter or a variable depends on its role in the calculation, not on which letter is used.

In plain words A parameter is a setting on the model. You choose it, keep it fixed while you work, and may change it later to see what happens.

Example Let the pen use PP meters of fencing. The same reasoning as before gives

A(x)=x(P2−x),0<x<P2.\begin{gathered} A(x) = x\left(\frac{P}{2} - x\right), \\[0.6em] 0 < x < \frac{P}{2}. \end{gathered}

Here xx is the variable and PP is a parameter. Setting P=24P = 24 gives the earlier model, and setting P=40P = 40 gives A(x)=x(20−x)A(x) = x(20 - x) on 0<x<200 < x < 20. Each value of PP gives one member of a family of models, and within one calculation PP does not change. The letter does not decide the role. The 2424 was a constant in the first model and plays the part of a parameter here, and if you fixed the width and let the fencing vary, PP would become the variable.

Independent and dependent quantities

Definition In a model y=f(x)y = f(x) the independent quantity is the input xx, the one whose value is chosen. The dependent quantity is the output yy, whose value is determined by the input through the rule ff. Which quantity is independent is a modeling choice, made so that the output is a function of the input.

In plain words You pick the independent quantity. The dependent quantity then follows from the formula.

Example If you choose the width of the pen, the area follows. Width xx is independent and area AA is dependent.

Width xx in metersLength 12−x12 - x in metersArea A(x)A(x) in square meters
2210102020
44883232
66663636
1010222020

You could instead choose the area and ask for the width, but then two widths give the same area of 2020, so width would not be a function of area.

Constraint

Definition A constraint is an equation or inequality that the variables of a situation must satisfy because of a condition in the problem. An equation constraint can often be solved for one variable and substituted into the quantity of interest, which reduces the number of variables by one.

In plain words A constraint is the rule that ties the variables together. Using it lets you trade two unknowns for one.

Example The pen has width xx and length yy, and the fencing gives the constraint

2x+2y=24.2x + 2y = 24.

Solving for the length gives y=12−xy = 12 - x. The area A=xyA = xy has two variables, and substituting the constraint leaves one,

A(x)=x(12−x).A(x) = x(12 - x).

This is the step calculus needs, because the tools of single-variable calculus work with functions of one input.

Physical domain

Definition The physical domain of a model is the set of inputs that make sense in the situation being modeled. It is the part of the formula’s natural domain that also satisfies every assumption of the situation, such as positive lengths, nonnegative times or amounts that cannot exceed a fixed total. Strict and non-strict inequalities must match the assumptions exactly.

In plain words The formula may accept every real number, but the situation usually does not. The physical domain keeps only the inputs that describe something real.

Example The formula x(12−x)x(12 - x) is defined for every real xx. A genuine rectangle has both sides strictly positive, so x>0x > 0 and 12−x>012 - x > 0. Together these give

0<x<12.0 < x < 12.

At x=0x = 0 or x=12x = 12 the formula gives area 00, but the pen has collapsed into a segment, so those endpoints are excluded under the assumption of a nondegenerate rectangle. At x=13x = 13 the formula gives −13-13, a negative area, which is a clear sign the input is outside the model.

Units

Definition Every quantity in a model carries a unit, and every equation in the model must be consistent in units. Terms that are added or subtracted must have the same unit, both sides of an equation must have the same unit, and units multiply and divide along with the numbers. A rate is measured in output units per input unit.

In plain words If you add meters to square meters, something has gone wrong. Checking units is a fast test that catches many modeling mistakes.

Example With xx in meters, the length 12−x12 - x is in meters because 1212 is a length in meters. The area x(12−x)x(12 - x) is meters times meters, square meters. For a delivery charge of 44 dollars plus 1.501.50 dollars per kilometer for dd kilometers,

4 dollars+1.5 dollarskm⋅d km=(4+1.5d) dollars.\begin{gathered} 4 \text{ dollars} + 1.5 \, \frac{\text{dollars}}{\text{km}} \cdot d \text{ km} \\[0.6em] = (4 + 1.5d) \text{ dollars.} \end{gathered}

The kilometers cancel, so both terms are in dollars and the sum makes sense.

Piecewise rule

Definition A piecewise rule defines a function by different formulas on different parts of its domain. The parts must not overlap, together they must cover the whole domain, and each breakpoint belongs to exactly one piece. A model built this way is continuous at a breakpoint exactly when the neighboring pieces give the same value there.

In plain words When the pricing or the physics changes partway along, use one formula before the change and another after it. Then check that the two formulas agree where they meet, if the situation says there should be no jump.

Example A courier charges a fixed initial fee of 44 dollars, then 1.501.50 dollars per kilometer for the first 1010 kilometers and 11 dollar per kilometer for each kilometer beyond that. Assume the distance dd is any nonnegative real number of kilometers, the 44 dollar fee is charged once on every delivery, and within each band the charge grows in proportion to the distance, with no rounding up to whole kilometers. The cost in dollars is

C(d)={4+1.5d,0≤d≤10,19+(d−10),d>10.\begin{gathered} C(d) = \\[0.4em] \begin{cases} 4 + 1.5d, & 0 \le d \le 10, \\ 19 + (d - 10), & d > 10. \end{cases} \end{gathered}

The second piece starts from 1919 because the first 1010 kilometers cost 4+1.5⋅10=194 + 1.5 \cdot 10 = 19 dollars. Both pieces give 1919 at d=10d = 10, so the cost has no jump there. A ride of 66 kilometers costs C(6)=13C(6) = 13 dollars and a ride of 1414 kilometers costs C(14)=23C(14) = 23 dollars.

A common slip is to write the second piece as 4+1⋅d4 + 1 \cdot d, which charges the lower rate for the whole trip and makes the cost drop suddenly from 1919 to about 1414 just past 1010 kilometers. Checking the value at the breakpoint catches it.

Check yourself

  1. A rectangle has perimeter 4040 centimeters and width xx centimeters. Write its area as a function of xx and give the physical domain, assuming a nondegenerate rectangle.
Show the answer

The constraint 2x+2y=402x + 2y = 40 gives length y=20−xy = 20 - x, so

A(x)=x(20−x)square centimeters,0<x<20.\begin{gathered} A(x) = x(20 - x) \\[0.4em] \text{square centimeters}, \\[0.4em] 0 < x < 20. \end{gathered}

Both sides must be strictly positive, so x>0x > 0 and 20−x>020 - x > 0.

  1. A garden along a straight river is fenced on three sides with 6060 meters of fencing, and the river side needs no fence. Let xx be the length of each side perpendicular to the river. Write the area in terms of xx and state the domain.
Show the answer

The fencing uses two sides of length xx and one side parallel to the river, so that side has length 60−2x60 - 2x. The area is

A(x)=x(60−2x)square meters,0<x<30.\begin{gathered} A(x) = x(60 - 2x) \\[0.4em] \text{square meters}, \\[0.4em] 0 < x < 30. \end{gathered}

Positive side lengths need x>0x > 0 and 60−2x>060 - 2x > 0, which gives x<30x < 30.

  1. Using the courier model above, what does a 2525 kilometer delivery cost, and which quantity is the parameter if the courier is thinking about changing its 44 dollar fee to some value FF?
Show the answer

Since 25>1025 > 10, use the second piece. The cost is C(25)=19+15=34C(25) = 19 + 15 = 34 dollars. With a fee of FF dollars the model becomes

C(d)={F+1.5d,0≤d≤10,F+15+(d−10),d>10.\begin{gathered} C(d) = \\[0.4em] \begin{cases} F + 1.5d, & 0 \le d \le 10, \\ F + 15 + (d - 10), & d > 10. \end{cases} \end{gathered}

The fee FF is a parameter, fixed while you compute any one cost, and the distance dd is still the variable.

How this lesson connects