Mathwords logoMathwords

Optimization — Definition, Formula & Examples

Optimization is the process of finding the maximum or minimum value of a function, typically subject to some constraint. In calculus, you do this by taking the derivative, setting it equal to zero, and testing the resulting critical points.

Given a differentiable function ff defined on a domain DD, an optimization problem seeks the absolute (global) extrema of ff on DD. By the Extreme Value Theorem, if DD is a closed interval [a,b][a, b], the absolute maximum and minimum exist and occur either at critical numbers where f(x)=0f'(x) = 0 or f(x)f'(x) is undefined, or at the endpoints aa and bb.

How It Works

Start by identifying the quantity you want to maximize or minimize and writing it as a function of one variable. If the problem gives a constraint, use it to eliminate a second variable. Take the derivative and set it equal to zero to find critical numbers. Evaluate the function at each critical number and at the endpoints of the domain (if they exist). The largest value is the absolute maximum; the smallest is the absolute minimum. Use the first or second derivative test to confirm whether a critical point is a max or min when there is no closed interval.

Worked Example

Problem: A farmer has 120 meters of fencing and wants to enclose the largest possible rectangular area. What dimensions maximize the area?
Set up the function: Let the rectangle have length ll and width ww. The perimeter constraint is 2l+2w=1202l + 2w = 120, so w=60lw = 60 - l. The area is:
A(l)=l(60l)=60ll2,0l60A(l) = l(60 - l) = 60l - l^2, \quad 0 \le l \le 60
Find the critical number: Take the derivative and set it equal to zero.
A(l)=602l=0    l=30A'(l) = 60 - 2l = 0 \implies l = 30
Verify and compute: Check the endpoints and critical number: A(0)=0A(0) = 0, A(60)=0A(60) = 0, and A(30)=30(30)=900A(30) = 30(30) = 900. The maximum area occurs at l=30l = 30.
A(30)=900 m2A(30) = 900 \text{ m}^2
Answer: The maximum area is 900 m², achieved with a 30 m × 30 m square.

Why It Matters

Optimization problems appear throughout AP Calculus AB/BC exams and are a staple of college-level calculus. Engineers use optimization to minimize material costs or maximize structural strength, and economists use it to maximize profit or minimize cost functions.

Common Mistakes

Mistake: Forgetting to check endpoints of the domain
Correction: On a closed interval, the absolute max or min can occur at an endpoint, not just at a critical number. Always evaluate the function at every critical number and both endpoints.