IB Mathematics: Applications and Interpretation · Topic 5 · Calculus
5.7 Optimization
Set up an objective function using a constraint, use derivatives to find its greatest or least value, and interpret the result in context.
1/5An optimization problem seeks the best possible value
- An optimization problem seeks the best possible value
- A constraint lets us write the objective function in one variable
- Differentiating the objective function finds the best value
- The domain must be checked before accepting an answer
- Answers must be interpreted in the real situation
- Check your recall
- Practice: 10 questions
Part 1 of 5: An optimization problem seeks the best possible value
A farmer has a fixed length of fencing and wants the largest possible pen. A company wants the lowest cost for a set output. Each is an optimization problem.
Every such problem has one quantity to make as large or as small as possible. When we write it as a function of one variable, that function is the objective function. Its greatest or least value is the answer we need.
Stationary points can locate these values. That is why the topic builds directly on derivatives. The new skill is turning a description in words into a function.
Key terms · tap one for its definition
optimization problem
An optimization problem seeks the greatest or least feasible value of a quantity.
objective function
The objective function is the quantity to be maximised or minimised, written as a function of a single variable.
Part 2 of 5: A constraint lets us write the objective function in one variable
Consider the farmer’s pen in detail. The area depends on both length and width. But the fencing is limited, and that limit links the two.
A constraint is a given condition that restricts the variables. Use it to eliminate one variable. The objective function then depends on a single variable that we can differentiate.
- Name the quantity to be maximised or minimised.
- Use the constraint to write it in one variable.
- Differentiate and solve for the stationary values.
- Confirm whether each value is a maximum or minimum.
- Answer in context, with units.
Key term
constraint
A constraint is a given condition that links the variables and restricts the values they may take.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 3 of 5: Differentiating the objective function finds the best value
Once the objective function is written, solve its derivative equal to zero. The solutions are only candidates. The second derivative then shows whether each one is a maximum, a minimum or neither.
Here is the farmer’s problem solved. The fencing is 40 m long and covers three sides of a rectangle. The fourth side is a wall, so it needs no fence. Let the width of the pen be .
Worked example
Largest pen
- Let the width be m. The length is m.
- Area: .
- Differentiate: .
- Solve , so .
- Check: , which is negative, so this is a maximum.
- Length m, and area .
Answer: The greatest area is , with width 10 m and length 20 m.
The graph plots the area against the width. It rises to a single peak and then falls, which matches the negative second derivative.
Part 4 of 5: The domain must be checked before accepting an answer
Not every solution of is usable. A length cannot be negative, so the variable has limits. The allowed values form the domain.
In the pen problem, and . So . The solution lies inside it.
Sometimes the best value occurs at an end of the domain instead of at a stationary point. Compare the objective function at each candidate and at each end.
Worked example
Smallest perimeter
- The length is m, so .
- Write , so .
- Set to zero: , so since .
- Check: for , so this is a minimum.
- Substitute: .
Answer: The minimum perimeter is about , when the width is about 7.07 m.
Key term
domain
The domain is the set of input values that a function accepts, which in a model are the values that make sense.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: D · Worked explanation
Part 5 of 5: Answers must be interpreted in the real situation
The mathematics ends with numbers. The task ends with a statement about the situation. Say what the numbers mean, and include units.
Sometimes the exact value is not allowed. Suppose only whole items can be made. Compare the objective function at the whole numbers either side of the stationary value. Choose the better one.
A model is also a simplification. A result outside the range where the model is reasonable should not be trusted.
Check your recall[15 marks]
6 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Define[1 mark]
Define the term objective function.
Show mark schemeHide mark scheme
Model answer
The objective function is the quantity to be maximised or minimised, written as a function of a single variable.
- 1 mark for stating that it is the quantity to be maximised or minimised, written as a function of one variable
- 2.Outline[3 marks]
Outline the steps used to solve an optimization problem with a derivative.
Show mark schemeHide mark scheme
Model answer
Write the quantity to be optimised in one variable, using the constraint. Differentiate it and solve the derivative equal to zero. Confirm the type of stationary point and state the answer in context, with units.
- 1 mark for using the constraint to write the objective function in one variable
- 1 mark for differentiating and setting the derivative equal to zero
- 1 mark for confirming a maximum or minimum and answering in context with units
- 3.Determine[4 marks]
Determine the width that gives the greatest area for a rectangular pen made from 60 m of fencing on all four sides, and state that area.
Show mark schemeHide mark scheme
Model answer
Let the width be m, so the length is m. Then and , so . The area is .
- 1 mark for writing
- 1 mark for differentiating to obtain
- 1 mark for solving to obtain a width of 15 m
- 1 mark for stating the area as
- 4.Explain[2 marks]
Explain why the second derivative is used after solving .
Show mark schemeHide mark scheme
Model answer
Setting the derivative to zero finds stationary points only. The second derivative shows whether each one is a maximum, a minimum or neither.
- 1 mark for stating that solving the derivative equal to zero only finds stationary points
- 1 mark for stating that the second derivative shows whether a point is a maximum or a minimum
- 5.Distinguish[2 marks]
Distinguish between a constraint and an objective function.
Show mark schemeHide mark scheme
Model answer
A constraint is a condition that links and restricts the variables. The objective function is the quantity to be maximised or minimised.
- 1 mark for stating that a constraint restricts or links the variables
- 1 mark for stating that the objective function is the quantity to be maximised or minimised
- 6.Calculate[3 marks]
Calculate the output that minimises the cost, and the minimum cost, for , where is in thousands of pounds and is in thousands of items.
Show mark schemeHide mark scheme
Model answer
, so . Then . The output is 4 thousand items and the minimum cost is 14 thousand pounds.
- 1 mark for differentiating and solving to obtain
- 1 mark for substituting to obtain
- 1 mark for stating the output and the cost with units

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyState[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: C · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: C · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: D · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: B · Worked explanation
HardCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardCalculate[2 marks]
Show answer and explanation
Answer: D · Worked explanation
Hard[2 marks]
Show answer and explanation
Answer: A · Worked explanation