Businesses want the most profit, engineers the least material, farmers the most land from a roll of fence. Each of these is a search for an absolute maximum or minimum, which you already know how to find. What is new in optimization is the first step: turning a paragraph of words into a function you can differentiate.
The objective function
The objective function is the quantity you want to make as large or as small as possible, written as a function of one variable. Writing it takes three moves:
- Name the quantity. What does the question want largest or smallest? Area, revenue, cost, distance.
- Write a formula for it. Often it starts with two variables, like .
- Use the given facts to reduce it to one variable. A fixed amount of fence, a fixed product, a price rule: solve it for one variable and substitute.
Then find the domain: the values of the variable that make physical sense. Lengths, prices and amounts are not negative.
Worked example 1. A farmer has 600 feet of fence for a rectangular pen against a straight river, split in two by a middle fence parallel to the ends. No fence goes along the river. Find the largest area.
Quantity: area, , with the length of each end (and of the divider) and the side opposite the river.
Reduce: the fence is , so and
Domain: and , so .
Critical point: at .
Justify: candidates , , . The largest is .
Answer in context: ends of 100 feet and a long side of 300 feet give the largest area, 30,000 square feet.
Justifying the answer
Setting finds a candidate, not an answer. You must show it is the absolute extremum you want. Two ways work:
| Situation | Argument |
|---|---|
| Closed domain | Candidates Test: compare at the endpoints and the critical points. |
| Any interval, one critical point | The only critical point is a relative maximum (or minimum), by the First or Second Derivative Test, so it is the absolute one. |
Watch for the critical point being the wrong kind. For a shipping cost on , the critical point gives the smallest cost, 8. If the question asks for the largest cost, the answer is at an endpoint: .
Revenue, a second model
Worked example 2. At a price of dollars, a theater sells tickets, . What price maximizes revenue?
Objective: revenue = price times tickets,
at . Candidates: , , .
A price of 15 dollars gives the most revenue, 9000 dollars.
The derivative also has a meaning on its own. dollars per dollar: at a price of 10 dollars, raising the price by 1 dollar raises revenue by about 400 dollars. A positive says the best price is higher still.
Numbers and distances
Pure-number problems use the same steps. If two positive numbers add to 20, their product is ; it is largest at , giving 100. For a distance, minimize the squared distance instead: it is smallest at the same point and has no square root to differentiate. For the point of nearest , minimize : at , and the distance is . Remember to take the square root at the end.
Answer the question asked
The final line should answer in the problem's words and units: "100 feet by 300 feet, for 30,000 square feet," not "." If the question asks for dimensions, give all of them; if it asks for the maximum value, give the value, not where it happens.