Optimization with Constraints Stated in Plain Language

Capítulo 8

Estimated reading time: 13 minutes

+ Exercise

Why “plain language” constraints matter

In many real optimization tasks, the objective function is already clear (maximize area, minimize cost, maximize profit), but the constraints arrive as everyday statements: “must fit,” “no more than,” “at least,” “leave room for a gate,” “can’t exceed capacity,” “only sold in whole boxes.” The mathematical work is to translate those statements into inequalities/equalities, determine what choices are actually allowed (the feasible set), and then ensure any candidate optimum is both mathematically optimal and practically permitted.

This chapter focuses on the constraint side: turning informal requirements into precise conditions, mapping feasible regions and realistic ranges, handling piecewise rules (fixed fees, tiered pricing, boundary conditions), and writing a final recommendation that explicitly references feasibility.

1) Converting phrases into math

Common phrases and their mathematical forms

Plain-language phraseMath translationNotes
“at least 10”x ≥ 10Includes 10.
“more than 10”x > 10Does not include 10; check if strictness matters in practice.
“no more than 10”x ≤ 10Includes 10.
“less than 10”x < 10Often becomes if rounding/measurement tolerance exists.
“between 2 and 5, inclusive”2 ≤ x ≤ 5Two constraints at once.
“must fit within a 30 cm width”width ≤ 30Sometimes also needs a clearance margin: width + 2c ≤ 30.
“at most 3 hours per day”t  3Be consistent with units.
“exactly 12 items”n = 12Often integer-valued.
“whole boxes only”n   Discrete feasibility; calculus gives a candidate, then you check nearby integers.

Practical translation checklist

  • Name variables with units (e.g., x = length in meters, n = number of boxes).
  • Write each requirement as a separate inequality/equality. If a sentence contains “and,” it usually means multiple constraints.
  • Add hidden constraints: nonnegativity (x  0), physical limits, integer requirements, safety margins, minimum clearances.
  • Watch for “must fit” language: it often means a sum of dimensions is bounded, e.g., 2x + 2y  P for fencing, or x + y  W for width limits.

2) Identifying feasible regions and realistic parameter ranges

Once constraints are written, the feasible region is the set of all variable values that satisfy them simultaneously. Optimization only makes sense on this set. Two common mistakes are (i) optimizing over values that violate a constraint, and (ii) forgetting realistic ranges (like minimum aisle width, maximum machine speed, or that a dimension can’t be negative).

Feasibility workflow (step-by-step)

  1. List constraints in a clean system (include nonnegativity and units).
  2. Simplify them into bounds for one variable when possible (e.g., solve for y in terms of x).
  3. Intersect the bounds to get an interval (1-variable) or region (2-variables).
  4. Check for emptiness: if bounds contradict, there is no feasible solution; the “problem” needs revised requirements.
  5. Record the domain explicitly (e.g., 0  x  12).

Example: packaging that must fit (with clearance)

Scenario. A rectangular product tray must fit inside a shipping sleeve that is 40 cm by 25 cm. You must leave 0.5 cm clearance on each side (so 1 cm total per dimension). Let tray dimensions be x by y (cm). You want to maximize tray area A = xy.

Translate constraints.

Continue in our app.
  • Listen to the audio with the screen off.
  • Earn a certificate upon completion.
  • Over 5000 courses for you to explore!
Or continue reading below...
Download App

Download the app

  • “Must fit within 40 by 25 with 0.5 cm clearance each side”  effective max tray dimensions are 39 by 24.
  • So x  39, y  24.
  • Physical: x  0, y  0.

Feasible region. A rectangle in the first quadrant: 0  x  39, 0  y  24.

Practical note. If the sleeve opening is tight, you might need extra clearance in one direction only (insertion direction). That changes the constraints and can change the optimum.

Realistic parameter ranges

Even if math allows a value, reality may not. Examples:

  • Manufacturing: thickness must be between tool limits: 0.8  t  2.0 mm.
  • Gardening: walkway must be at least 0.9 m wide: w  0.9.
  • Production: demand cap: q  500 units/week.

These bounds often force the optimum to occur at an endpoint (a boundary), so they must be included from the start.

3) Handling fixed costs or boundary conditions that create piecewise behavior

Plain-language rules frequently create piecewise objective functions or constraints. Examples include setup fees, bulk discounts, overtime pay, minimum order quantities, and “if you exceed X, you must add Y.” The key is to identify the threshold and write separate formulas on each side.

Common piecewise triggers

  • Fixed cost: “$200 setup fee plus $3 per unit.” Cost: C(q) = 200 + 3q for q > 0, but possibly C(0)=0 if producing nothing is allowed.
  • Tiered pricing: “First 100 units at $5, additional at $4.” Revenue/cost changes at q=100.
  • Boundary condition: “If the garden touches the wall, you don’t need fencing on that side.” Perimeter formula changes depending on whether a side is along the wall.
  • Obstacle avoidance: “You can’t place the fence through the pond.” Feasible region becomes “all shapes/placements that avoid the obstacle,” often leading to multiple cases.

Example: production with a setup fee and a capacity cap

Scenario. A small shop can produce up to 300 units per week. Profit per unit (after variable costs) is modeled as p(q) = 50q - 0.1q^2 dollars (this is already a profit function, not revenue). If the shop produces any positive amount, it pays a fixed weekly setup cost of $1200. Let total weekly profit be P(q).

Translate constraints.

  • “Up to 300 units”  0  q  300.
  • “Setup cost if produce any”  piecewise definition.

Write piecewise objective.

P(q) = { 0,                         q = 0  
       { 50q - 0.1q^2 - 1200,      0 < q  300

Practical implication. Even if the smooth part has a maximum at some interior point, you must compare it to q=0 because the fixed cost can make “do nothing” the best feasible choice.

4) Checking candidates against feasibility and interpreting boundary optima

After you find candidate choices (from calculus on the relevant formula pieces), you must filter them through feasibility and compare objective values at all relevant candidates, including boundaries and case-split points.

Candidate checklist (use every time)

  1. List all pieces/cases created by constraints or rules.
  2. For each case, identify the allowed interval/region.
  3. Find interior candidates for that case (where the derivative-based condition holds) and ensure they lie inside the interval.
  4. Include boundary points of each feasible interval (endpoints) and any threshold points where the formula changes.
  5. Evaluate the objective at every feasible candidate and pick the best.
  6. State feasibility explicitly: “This choice satisfies  because .”

Example continued: production with setup fee

For 0 < q  300, the smooth part is 50q - 0.1q^2 - 1200. A natural interior candidate occurs where the derivative of 50q - 0.1q^2 is zero, which gives 50 - 0.2q = 0  q = 250. Now do feasibility and comparison:

  • Feasibility: 250 is within (0,300], so it is allowed.
  • Boundaries/thresholds: check q=0 (different formula) and q=300 (capacity boundary).

Compute profits:

  • P(0)=0.
  • P(250)=50(250)-0.1(250)^2-1200=12500-6250-1200=5050.
  • P(300)=15000-9000-1200=4800.

Interpretation. The best feasible choice is q=250. Note that the capacity boundary q=300 is feasible but not optimal, and producing nothing is feasible but worse because the interior optimum still clears the fixed cost.

When an optimum occurs at a boundary (and why that’s normal)

In constrained problems, boundaries are not “edge cases”; they are often where the best solution lives. Typical reasons:

  • Monotone objective over the feasible interval: if the objective increases throughout the feasible set, the maximum is at the largest allowed value.
  • Physical caps: maximum length of fencing, maximum capacity, maximum budget.
  • Minimum requirements: if cost increases with quality, the minimum acceptable quality may be optimal.

So you should expect to check endpoints and interpret them as “constraint is binding.” In plain language: you are “using all the budget,” “hitting capacity,” or “just meeting the minimum.”

5) Writing a final recommendation statement (what to choose and why)

A good recommendation is not just a number; it is a decision that references constraints and practical meaning. Use a template like:

  • Decision: “Choose .”
  • Why it’s optimal: “It gives the largest/smallest  among all feasible options.”
  • Feasibility check: “It satisfies  because .”
  • Interpret boundary if relevant: “The optimum occurs at the boundary , meaning the  constraint is fully used.”

Example recommendation (from production problem). “Produce 250 units per week. This quantity yields the highest weekly profit ($5050) among all feasible production levels from 0 to 300 units, and it respects the capacity limit since 250  300. The setup fee is accounted for, and producing 0 units would yield $0, which is lower.”

Practice set A: Packaging constraints (explicit feasibility checks)

A1. Rectangular label on a jar (must fit, margins required)

Scenario. A rectangular label is placed on a flat panel that is 12 cm wide and 8 cm tall. You must leave a 0.5 cm margin on all sides. Let label width be w and height be h. Maximize label area A=wh.

Step 1: Convert phrases into math.

  • “Leave 0.5 cm margin on all sides”  usable width 12 - 2(0.5)=11, usable height 8 - 2(0.5)=7.
  • Constraints: 0  w  11, 0  h  7.

Step 2: Feasible region. Rectangle in the (w,h)-plane.

Step 3: Candidate check. Since A=wh increases as either variable increases (within the feasible region), the maximum occurs at the boundary corner (w,h)=(11,7).

Feasibility check. 11  11 and 7  7, so it fits with margins.

Recommendation statement. Choose a label of 11 cm by 7 cm because it uses the full allowable width and height and therefore maximizes area while respecting the required margins.

A2. Box face must fit within a printer bed (rotation not allowed)

Scenario. A rectangular box face of size x by y must be printed on a bed that is 30 cm by 20 cm. The printer cannot rotate the design. Additionally, the printer requires at least 2 cm of empty space on the right side for a clamp. Maximize printable area A=xy.

Translate constraints.

  • “Cannot rotate”  x must align with 30 cm direction, y with 20 cm direction.
  • “At least 2 cm empty on the right side”  x + 2  30 so x  28.
  • Also y  20, and x,y  0.

Feasible region. 0  x  28, 0  y  20.

Boundary optimum interpretation. Maximum area occurs at (28,20), meaning the clamp clearance constraint is binding and the height limit is binding.

Practice set B: Fencing/gardening layouts with obstacles

B1. Rectangular garden against a wall with a gate requirement

Scenario. You are building a rectangular garden that uses an existing straight wall as one side (so you fence only three sides). You have 60 m of fencing available, but you must leave a 2 m opening for a gate on one of the fenced sides. Let x be the side length perpendicular to the wall (there are two of these), and y be the side parallel to the wall that is fenced (the far side). Maximize area A=xy.

Step 1: Convert phrases into math.

  • Fenced length would be 2x + y, but “leave a 2 m opening” means the amount of fencing used is 2x + y - 2.
  • “Have 60 m of fencing available”  2x + y - 2  60. If you will use all fencing to maximize area, treat it as 2x + y - 2 = 60 (and later verify the result is feasible).
  • Nonnegativity: x  0, y  0.

Step 2: Solve constraint for a feasible interval. From 2x + y - 2 = 60, get y = 62 - 2x. Feasibility requires y  0 so 62 - 2x  0  x  31. Also x  0. So 0  x  31.

Step 3: Note practical boundary conditions. If the gate must be on the side of length y, then you also need y  2 (otherwise you can’t remove 2 m from that side). That adds: 62 - 2x  2  x  30. New feasible interval: 0  x  30.

Step 4: Candidate check and feasibility check. Use A(x)=x(62-2x) on the feasible interval and include endpoints x=0 and x=30. After finding the best candidate, verify it satisfies y  2 and uses no more than 60 m of fencing (accounting for the opening).

Interpretation if boundary wins. If the best feasible point occurs at x=30, that would mean the gate-length requirement is binding: you are forced to keep y at least 2 m, which can push the optimum to the edge of what’s allowed.

B2. Garden rectangle must avoid a pond (obstacle creates cases)

Scenario. You want a rectangular fenced garden inside a 20 m by 14 m yard. There is a circular pond that occupies a 4 m by 4 m square region in the lower-left corner (treat it as an “avoid” square for planning). The garden must be placed so it does not overlap that 4-by-4 corner region. You want the largest possible rectangular garden aligned with the yard edges.

Translate constraints (case-based).

  • Let the garden’s lower-left corner be at (a,b) with a,b  0, and let its width and height be w,h.
  • “Must be inside yard”  a+w  20, b+h  14.
  • “Must not overlap the 4-by-4 corner obstacle” can be enforced by requiring the rectangle to be entirely to the right of it or entirely above it (since the obstacle is in the corner): either a  4 (shift right) or b  4 (shift up). This creates two feasible cases.

Feasible cases.

  • Case 1 (shift right): a  4, a+w  20, b  0, b+h  14.
  • Case 2 (shift up): b  4, a  0, a+w  20, b+h  14.

Objective. Maximize A=wh.

Practical step. In each case, the best choice is to push the rectangle to the yard boundaries to maximize w and h (since there is no penalty for location). Then compare the best area from Case 1 vs Case 2, and confirm the chosen placement truly avoids the obstacle region.

Practice set C: Production limits and discrete feasibility

C1. Minimum batch size and maximum demand

Scenario. A bakery sells cupcakes in batches. If it produces at all, it must bake at least 5 batches (oven setup). Demand is at most 40 batches per day. Let n be the number of batches (an integer). Daily profit (in dollars) before setup is R(n)=30n-0.5n^2. Setup cost is $100 if n>0. Choose n to maximize profit.

Translate constraints.

  • “At least 5 batches if producing”  either n=0 or n  5.
  • “At most 40 batches”  n  40.
  • “Batches are whole”  n integer.

Piecewise objective.

P(n) = { 0,                    n = 0
       { 30n - 0.5n^2 - 100,   5  n  40, n integer

Feasibility check step. If calculus suggests an optimal real number n*, you must check the nearest feasible integers (and also check n=0 because of the setup fee). Explicitly verify n meets n=0 or n  5 and n  40.

C2. “No more than” plus a hard resource cap

Scenario. A workshop makes two products: A and B. Each unit of A uses 2 hours of labor; each unit of B uses 3 hours. You have no more than 120 labor-hours. You must make at least 10 units of A to satisfy a contract. Let x=units of A, y=units of B. Profit is P=40x+55y. Choose (x,y) to maximize profit.

Translate constraints.

  • “No more than 120 hours”  2x+3y  120.
  • “At least 10 units of A”  x  10.
  • Nonnegativity: y  0.
  • If whole units are required: x,y integers (state whether that is assumed).

Feasible region. A polygon in the first quadrant cut by 2x+3y=120 and x=10.

Boundary optimum interpretation. Because the objective is linear, the optimum occurs on a boundary corner of the feasible region. The practical meaning is that the best plan uses all available labor-hours (binding resource constraint) and meets the minimum contract requirement exactly or with slack, depending on which corner wins.

Now answer the exercise about the content:

A shop’s profit includes a fixed setup cost that is charged only if it produces a positive quantity. When finding the best production level, which comparison is essential even if calculus gives an interior maximum for the positive-quantity formula?

You are right! Congratulations, now go to the next page

You missed! Try again.

With a setup fee, profit is piecewise: one formula at q=0 and another for q>0. So you must compare the interior critical point to q=0 and to relevant boundaries/thresholds to ensure the choice is feasible and truly best.

Next chapter

Interpreting Results: Units, Sensitivity, and Reasonableness Checks

Arrow Right Icon
Free Ebook cover Applications of Derivatives: Optimization, Motion, and Curve Sketching
80%

Applications of Derivatives: Optimization, Motion, and Curve Sketching

New course

10 pages

Download the app to earn free Certification and listen to the courses in the background, even with the screen off.