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 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 in meters is
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 , the meters of fencing, or the factor in the falling distance 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 , the length and the area are variables, since different pens have different values. The total fencing and the number in the perimeter formula 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 meters of fencing. The same reasoning as before gives
Here is the variable and is a parameter. Setting gives the earlier model, and setting gives on . Each value of gives one member of a family of models, and within one calculation does not change. The letter does not decide the role. The 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, would become the variable.
Independent and dependent quantities
Definition In a model the independent quantity is the input , the one whose value is chosen. The dependent quantity is the output , whose value is determined by the input through the rule . 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 is independent and area is dependent.
| Width in meters | Length in meters | Area in square meters |
|---|---|---|
You could instead choose the area and ask for the width, but then two widths give the same area of , 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 and length , and the fencing gives the constraint
Solving for the length gives . The area has two variables, and substituting the constraint leaves one,
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 is defined for every real . A genuine rectangle has both sides strictly positive, so and . Together these give
At or the formula gives area , but the pen has collapsed into a segment, so those endpoints are excluded under the assumption of a nondegenerate rectangle. At the formula gives , 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 in meters, the length is in meters because is a length in meters. The area is meters times meters, square meters. For a delivery charge of dollars plus dollars per kilometer for kilometers,
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 dollars, then dollars per kilometer for the first kilometers and dollar per kilometer for each kilometer beyond that. Assume the distance is any nonnegative real number of kilometers, the 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
The second piece starts from because the first kilometers cost dollars. Both pieces give at , so the cost has no jump there. A ride of kilometers costs dollars and a ride of kilometers costs dollars.
A common slip is to write the second piece as , which charges the lower rate for the whole trip and makes the cost drop suddenly from to about just past kilometers. Checking the value at the breakpoint catches it.
Check yourself
- A rectangle has perimeter centimeters and width centimeters. Write its area as a function of and give the physical domain, assuming a nondegenerate rectangle.
Show the answer
The constraint gives length , so
Both sides must be strictly positive, so and .
- A garden along a straight river is fenced on three sides with meters of fencing, and the river side needs no fence. Let be the length of each side perpendicular to the river. Write the area in terms of and state the domain.
Show the answer
The fencing uses two sides of length and one side parallel to the river, so that side has length . The area is
Positive side lengths need and , which gives .
- Using the courier model above, what does a kilometer delivery cost, and which quantity is the parameter if the courier is thinking about changing its dollar fee to some value ?
Show the answer
Since , use the second piece. The cost is dollars. With a fee of dollars the model becomes
The fee is a parameter, fixed while you compute any one cost, and the distance is still the variable.