Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Applications and Interpretation
  3. ›5 Calculus
  4. ›5.7 Optimization

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.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5An optimization problem seeks the best possible value
  1. 1An optimization problem seeks the best possible value
  2. 2A constraint lets us write the objective function in one variable
  3. 3Differentiating the objective function finds the best value
  4. 4The domain must be checked before accepting an answer
  5. 5Answers must be interpreted in the real situation
  6. Check your recall
  7. Practice: 10 questions
1

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 1 done

2

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.

Common mistake

Do not differentiate while two variables remain. Use the constraint to eliminate one first.

Key term

constraint

A constraint is a given condition that links the variables and restricts the values they may take.

Part 2 done

Quick check

One question on the part you just read

Easy

A farmer wants the largest pen possible from 60 m of fencing. Identify the role of the 60 m in the problem.
Show answer and explanation

Answer: A · Worked explanation

The fixed length of fencing is a condition that restricts the dimensions, so it is a constraint. The objective function is the area, which is the quantity being maximised. The domain is the set of allowed widths, which follows from the constraint rather than being the 60 m itself.
3

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 xxx.

Worked example

Largest pen

A farmer has 40 m of fencing for three sides of a rectangular pen. The fourth side is a wall. Find the width xxx that gives the greatest area.
  1. 1
    Let the width be xxx m. The length is 40−2x40-2x40−2x m.
  2. 2
    Area: A=x(40−2x)=40x−2x2A=x(40-2x)=40x-2x^2A=x(40−2x)=40x−2x2.
  3. 3
    Differentiate: dAdx=40−4x\frac{dA}{dx}=40-4xdxdA​=40−4x.
  4. 4
    Solve 40−4x=040-4x=040−4x=0, so x=10x=10x=10.
  5. 5
    Check: d2Adx2=−4\frac{d^2A}{dx^2}=-4dx2d2A​=−4, which is negative, so this is a maximum.
  6. 6
    Length =40−20=20=40-20=20=40−20=20 m, and area =10×20=200 m2=10\times20=200\,\mathrm{m^2}=10×20=200m2.

Answer: The greatest area is 200 m2200\,\mathrm{m^2}200m2, 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.

Figure 1. The area is greatest at a width of 10 m, where the curve peaks at 200.

Part 3 done

4

Part 4 of 5: The domain must be checked before accepting an answer

Not every solution of A′(x)=0A'(x)=0A′(x)=0 is usable. A length cannot be negative, so the variable has limits. The allowed values form the domain.

In the pen problem, x>0x>0x>0 and 40−2x>040-2x>040−2x>0. So 0<x<200<x<200<x<20. The solution x=10x=10x=10 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

A rectangle has area 50 m250\,\mathrm{m^2}50m2 and width xxx m. Find the width that minimises its perimeter.
  1. 1
    The length is 50x\frac{50}{x}x50​ m, so P=2x+100xP=2x+\frac{100}{x}P=2x+x100​.
  2. 2
    Write P=2x+100x−1P=2x+100x^{-1}P=2x+100x−1, so dPdx=2−100x2\frac{dP}{dx}=2-\frac{100}{x^2}dxdP​=2−x2100​.
  3. 3
    Set to zero: x2=50x^2=50x2=50, so x=50≈7.07x=\sqrt{50}\approx7.07x=50​≈7.07 since x>0x>0x>0.
  4. 4
    Check: d2Pdx2=200x3>0\frac{d^2P}{dx^2}=\frac{200}{x^3}>0dx2d2P​=x3200​>0 for x>0x>0x>0, so this is a minimum.
  5. 5
    Substitute: P=2(7.07)+1007.07≈28.3P=2(7.07)+\frac{100}{7.07}\approx28.3P=2(7.07)+7.07100​≈28.3.

Answer: The minimum perimeter is about 28.3 m28.3\,\mathrm{m}28.3m, when the width is about 7.07 m.

Exam tip

Show a check that your value is a maximum or a minimum, such as the sign of the second derivative.

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.

Part 4 done

Quick check

One question on the part you just read

Easy

Identify the equation that gives the candidate values of xxx for a maximum or minimum of A(x)A(x)A(x).
Show answer and explanation

Answer: D · Worked explanation

Candidates for a maximum or minimum are stationary points, where the gradient is zero, so A′(x)=0A'(x)=0A′(x)=0. Solving A(x)=0A(x)=0A(x)=0 finds where the quantity is zero, which is not the same thing. The second derivative is used afterwards to classify the points.
5

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.

Common mistake

Do not stop at the value of xxx. The question usually asks for the maximum or minimum value of the objective function.

Note read

Check your recall[15 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 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. 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. 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 xxx m, so the length is 30−x30-x30−x m. Then A=30x−x2A=30x-x^2A=30x−x2 and dAdx=30−2x=0\frac{dA}{dx}=30-2x=0dxdA​=30−2x=0, so x=15x=15x=15. The area is 15×15=225 m215\times15=225\,\mathrm{m^2}15×15=225m2.

    • 1 mark for writing A=x(30−x)A=x(30-x)A=x(30−x)
    • 1 mark for differentiating to obtain 30−2x30-2x30−2x
    • 1 mark for solving to obtain a width of 15 m
    • 1 mark for stating the area as 225 m2225\,\mathrm{m^2}225m2
  4. 4.Explain[2 marks]

    Explain why the second derivative is used after solving A′(x)=0A'(x)=0A′(x)=0.

    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. 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. 6.Calculate[3 marks]

    Calculate the output that minimises the cost, and the minimum cost, for C(x)=x2−8x+30C(x)=x^2-8x+30C(x)=x2−8x+30, where CCC is in thousands of pounds and xxx is in thousands of items.

    Show mark schemeHide mark scheme

    Model answer

    C′(x)=2x−8=0C'(x)=2x-8=0C′(x)=2x−8=0, so x=4x=4x=4. Then C(4)=16−32+30=14C(4)=16-32+30=14C(4)=16−32+30=14. The output is 4 thousand items and the minimum cost is 14 thousand pounds.

    • 1 mark for differentiating and solving 2x−8=02x-8=02x−8=0 to obtain x=4x=4x=4
    • 1 mark for substituting to obtain C(4)=14C(4)=14C(4)=14
    • 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.

3.

Easy·State[1 mark]

State what the objective function is in an optimization problem.
Show answer and explanation

Answer: A · Worked explanation

The objective function is the quantity to be maximised or minimised, written in one variable. The equation that restricts the variables is the constraint. The set of allowed values is the domain, and the derivative is used to find stationary points of the objective function.
4.

Medium·Calculate[2 marks]

Two positive numbers have a sum of 10. Calculate the greatest possible value of their product.
Show answer and explanation

Answer: C · Worked explanation

Let the numbers be xxx and 10−x10-x10−x. The product is P=10x−x2P=10x-x^2P=10x−x2, and P′=10−2x=0P'=10-2x=0P′=10−2x=0 gives x=5x=5x=5. Then P=5×5=25P=5\times5=25P=5×5=25. The value 5 is the number that gives the maximum, not the product itself. A quick check is that 4×6=244\times6=244×6=24 is below 25, so the product is largest when the numbers are equal.
5.

Medium·Calculate[2 marks]

A pen uses 24 m of fencing on three sides, with a wall on the fourth side. Calculate the greatest possible area.
Show answer and explanation

Answer: C · Worked explanation

With width xxx, the length is 24−2x24-2x24−2x, so A=24x−2x2A=24x-2x^2A=24x−2x2. Then A′=24−4x=0A'=24-4x=0A′=24−4x=0 gives x=6x=6x=6, and the length is 12 m, so A=6×12=72 m2A=6\times12=72\,\mathrm{m^2}A=6×12=72m2. The values 6 and 12 are dimensions in metres, not an area. The second derivative A′′=−4A''=-4A′′=−4 is negative, so this is a maximum.
6.

Medium·Calculate[2 marks]

A cost is modelled by C(x)=x2−10x+40C(x)=x^2-10x+40C(x)=x2−10x+40. Calculate the minimum cost.
Show answer and explanation

Answer: D · Worked explanation

Here C′(x)=2x−10=0C'(x)=2x-10=0C′(x)=2x−10=0 gives x=5x=5x=5, and C′′=2>0C''=2>0C′′=2>0 confirms a minimum. Then C(5)=25−50+40=15C(5)=25-50+40=15C(5)=25−50+40=15. The value 5 is the input that gives the minimum, not the cost. The value 115 comes from a sign slip, 25+50+4025+50+4025+50+40. The question asks for the cost, so the final step must be substituting into the function.
7.

Medium·Calculate[2 marks]

A rectangle has area 32 m232\,\mathrm{m^2}32m2. Calculate its smallest possible perimeter, to 3 significant figures.
Show answer and explanation

Answer: B · Worked explanation

With width xxx, the length is 32x\frac{32}{x}x32​, so P=2x+64xP=2x+\frac{64}{x}P=2x+x64​. Then P′=2−64x2=0P'=2-\frac{64}{x^2}=0P′=2−x264​=0 gives x2=32x^2=32x2=32, so x≈5.657x\approx5.657x≈5.657. Then P≈11.31+11.31=22.6 mP\approx11.31+11.31=22.6\,\mathrm{m}P≈11.31+11.31=22.6m. The value 5.66 m is only the width, and 45.3 m is twice the correct perimeter. The second derivative is positive for x>0x>0x>0, so this is a minimum.
8.

Hard·Calculate[2 marks]

A shop’s revenue is R(x)=−4x2+60xR(x)=-4x^2+60xR(x)=−4x2+60x pounds when it sells xxx items. Only whole numbers of items can be sold. Calculate the greatest possible revenue.
Show answer and explanation

Answer: A · Worked explanation

Solving R′(x)=−8x+60=0R'(x)=-8x+60=0R′(x)=−8x+60=0 gives x=7.5x=7.5x=7.5, which is not a whole number. Then R(7)=−196+420=224R(7)=-196+420=224R(7)=−196+420=224 and R(8)=−256+480=224R(8)=-256+480=224R(8)=−256+480=224, so the greatest revenue is £224. The value £225 is R(7.5)R(7.5)R(7.5), which would need half an item to be sold. Compare the two whole numbers either side of 7.5, and both give the same revenue here.
9.

Hard·Calculate[2 marks]

A square sheet of side 12 cm has a square of side xxx cm cut from each corner. The sides fold up to make an open box. Calculate the greatest volume of the box.
Show answer and explanation

Answer: D · Worked explanation

The volume is V=x(12−2x)2=4x3−48x2+144xV=x(12-2x)^2=4x^3-48x^2+144xV=x(12−2x)2=4x3−48x2+144x, so V′=12x2−96x+144=12(x−2)(x−6)V'=12x^2-96x+144=12(x-2)(x-6)V′=12x2−96x+144=12(x−2)(x−6). The domain is 0<x<60<x<60<x<6, so x=6x=6x=6 is rejected; there the volume is zero. At x=2x=2x=2, V=2×82=128 cm3V=2\times8^2=128\,\mathrm{cm^3}V=2×82=128cm3, and V′′=−48<0V''=-48<0V′′=−48<0. The value 2 is the cut size, not the volume. Always check the domain before accepting a stationary value.
10.

Hard[2 marks]

A model gives profit PPP in thousands of pounds, with xxx in hundreds of items and 0≤x≤100\le x\le100≤x≤10. The derivative P′(x)=0P'(x)=0P′(x)=0 only at x=4x=4x=4, and P′′(4)=−3P''(4)=-3P′′(4)=−3. Also P(0)=−5P(0)=-5P(0)=−5, P(4)=7P(4)=7P(4)=7 and P(10)=−20P(10)=-20P(10)=−20. Which statement is correct?
Show answer and explanation

Answer: A · Worked explanation

The point x=4x=4x=4 is a maximum, since P′′(4)<0P''(4)<0P′′(4)<0, and its value is greater than the values at both ends. So the greatest profit is P(4)=7P(4)=7P(4)=7 thousand pounds. Since xxx is in hundreds, x=4x=4x=4 means 400 items. Saying 4 items ignores the units of xxx.

Keep going

Next topic5.8 Trapezoidal rulePrevious topic5.6 Stationary points

More in Topic 5 · Calculus

  1. 5.3Derivatives of polynomialsNotes · 10 questions
  2. 5.4Tangents and normalsNotes · 10 questions
  3. 5.5Introduction to integrationNotes · 10 questions
  4. 5.6Stationary pointsNotes · 10 questions
  5. 5.7OptimizationNotes · 10 questions
  6. 5.8Trapezoidal ruleNotes · 10 questions
  7. 5.9Differentiation rules and related ratesNotes · 9 questions· HL only
  8. 5.10Second derivativesNotes · 10 questions· HL only
  9. 5.11Further integrationNotes · 10 questions· HL only

All IB Mathematics: Applications and Interpretation topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1An optimization problem seeks the best possible value
  2. 2A constraint lets us write the objective function in one variable
  3. 3Differentiating the objective function finds the best value
  4. 4The domain must be checked before accepting an answer
  5. 5Answers must be interpreted in the real situation
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe

Area of the pen against width

Area A (m²)05101520050100150200Width x (m)
  • A = 40x − 2x²
  • Maximum (10, 200)