Optimization – Formulation
Optimization is one of the most powerful and practically useful applications of calculus. At its core, optimization asks: what is the largest or smallest value a quantity can take, given certain constraints? Whether a company wants to maximize profit, an engineer wants to minimize material costs, or a physicist wants to find the path of least time, the mathematical process of formulating and solving an optimization problem is the same. The first — and often most challenging — step in solving any optimization problem is the formulation stage: translating a real-world scenario into precise mathematical language. This means identifying the quantity you want to optimize (called the objective function), listing any restrictions on the variables (called constraints), and reducing the problem to a single-variable function so that derivatives can be applied. A poorly formulated model leads to incorrect or meaningless answers, so careful setup is essential. This article focuses exclusively on the formulation stage: how to read a problem, define variables with clear meanings and units, write the objective function, apply constraints to eliminate extra variables, and identify the domain over which you are optimizing. Mastering formulation is the foundation upon which all optimization techniques rest.
- Read Carefully and Draw a Diagram
- Identify and Define Variables
- Write the Objective Function
- Write the Constraint Equation(s)
- Substitute to Get a Single-Variable Objective Function
- State the Domain
Read Carefully and Draw a Diagram
Read the problem at least twice. Sketch a picture whenever geometry is involved. Label all relevant lengths, areas, angles, or quantities directly on the diagram. A clear diagram prevents confusion about what is changing and what is fixed.
Identify and Define Variables
Choose variable names that reflect the quantities that can change. For example, let x be the width and y be the height of a rectangle, measured in meters. Write down the units for each variable. Never mix up what is a variable (something that can change) with what is a constant (a fixed given number).
Write the Objective Function
The objective function Q is the quantity you want to maximize or minimize, expressed in terms of your variables. For instance, if you want to maximize the area of a rectangle, you write Q = A = x · y. Label it clearly: 'Maximize A = xy' or 'Minimize C = cost function'. This equation may initially involve more than one variable.
Write the Constraint Equation(s)
Constraints are relationships between the variables imposed by the problem. For example, a fixed perimeter P = 2x + 2y = 100 m is a constraint. Write each constraint as an equation. If there are two variables in the objective function and one constraint, you can use algebra to eliminate one variable, reducing the objective function to a single-variable function.
Substitute to Get a Single-Variable Objective Function
Solve the constraint equation for one variable and substitute into the objective function. For example, from 2x + 2y = 100 you get y = 50 - x, so A(x) = x(50 - x) = 50x - x². Now A is a function of one variable only, and calculus can be applied.
State the Domain
Determine the realistic values of x. Physical quantities like length, width, and volume cannot be negative or zero (in most cases). For the rectangle example, since x > 0 and y = 50 - x > 0, the domain is 0 < x < 50. The domain is critical: without it, you may find a mathematical maximum that has no real-world meaning.
The Key Equation
- Q — Objective Function Value (varies (e.g., m², $, J)): The quantity being maximized or minimized — area, cost, time, volume, etc.
- f(x) — Objective Function (same as Q): The mathematical expression for Q written as a function of a single variable x after applying the constraint.
- x — Decision Variable (varies (e.g., m, units)): The independent variable over which you optimize; represents a changeable quantity in the problem.
- [a, b] — Domain (same as x): The interval of physically or contextually valid values for x.
- g(x, y) = C — Constraint Equation (varies): A relationship between variables imposed by the problem context, such as a fixed perimeter, budget, or volume.
Worked Example
Problem. A farmer has 240 metres of fencing and wants to enclose a rectangular field that borders a straight river. No fencing is needed along the river. What dimensions should the field have to maximize the enclosed area? (Formulation only — do not yet optimize.)
Answer. Objective function: A(x) = 240x − 2x², Domain: 0 < x < 120
Origins · 1 minPierre de Fermat and how this was discovered
Fermat developed an early method for finding maxima and minima of algebraic expressions in the 1630s, decades before Newton and Leibniz formalized calculus. His technique of setting an 'adequality' between a function and a slightly perturbed version of itself is a direct precursor to setting the derivative equal to zero — the central tool of modern optimization. Fermat was a lawyer by profession and pursued mathematics only as a hobby. Despite this, he made foundational contributions to number theory, analytic geometry, probability, and the precursors to calculus — all in his spare time.
Related Concepts
- Critical Points — After formulating the objective function, you find its maximum or minimum by locating critical points where the derivative equals zero or is undefined.
- First Derivative Test — The first derivative test determines whether a critical point of the objective function is a maximum or minimum, completing the optimization process after formulation.
- Extreme Value Theorem and Closed Interval Method — When the domain you identify during formulation is a closed interval, the Extreme Value Theorem guarantees a maximum and minimum, found by the closed interval method.
- Domain and Range of Functions — Correctly stating the domain of the objective function is a required part of formulation; understanding domain and range is a prerequisite skill.
- Related Rates — Related rates problems also require setting up equations that link multiple variables — the same relationship-writing and substitution skills used in optimization formulation.