Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IB Maths AI › Notes

IB Maths AI · Topic 5 · 5.2 · SL and HL

Optimisation in context

This note covers optimisation: using the derivative to find the greatest or least value of a quantity in a real situation, such as the largest volume of a box, the smallest amount of material for a can, or the price that gives the greatest profit. It builds on stationary points and on turning a worded problem into a function of one variable.

Key ideas

A stationary point of a function is a point where \(f'(x)=0\). Local maximum and minimum points of a smooth curve occur at stationary points. In optimisation we want the largest or smallest value of a quantity, so we look for these points.

A reliable method for a worded problem:

  • 1. Draw and define. Sketch a diagram if there is a shape. Name the variables and give units.
  • 2. Write the quantity to optimise (volume, area, cost, profit) as a formula. It may have two variables at first.
  • 3. Use the constraint. The question gives a condition, such as a fixed perimeter or volume. Use it to eliminate one variable, so the quantity depends on one variable only.
  • 4. State the domain. Which values of the variable are possible in context? Lengths must be positive, and a length cut from a card cannot exceed what is available.
  • 5. Differentiate and solve \(f'(x)=0\). Rewrite fractions as negative powers first.
  • 6. Show it is a maximum or minimum. Check the sign of the derivative on each side of the stationary point. If \(f'\) changes from positive to negative it is a maximum. If it changes from negative to positive it is a minimum. (At HL, another method is the sign of the second derivative: negative for a maximum, positive for a minimum.)
  • 7. Answer the question. Find the other quantities asked for, and give the answer with units and in context.

If the domain is a closed interval, also compare the value at the endpoints, because the greatest or least value can occur there rather than at a stationary point.

Using your GDC. Plot the function and use the maximum or minimum feature of the graph tool to confirm the result, or to solve the problem when the equation \(f'(x)=0\) is hard to solve by hand. Set a window that matches the domain. Unless the question asks you to use calculus, a graph can be an efficient check, but written working with a derivative is expected where calculus is requested.

Typical situations include:

  • Geometry. Rectangle with fixed perimeter, open box from a sheet, can of fixed volume with least material.
  • Business. Revenue or profit as a function of price or quantity, where raising the price lowers demand.
  • Motion and engineering. Maximum height of a projectile, or the time when the distance between two objects is least.

Definitions and formulae

Term or formulaMeaning / when to use
Stationary pointA point where \(f'(x)=0\); the tangent is horizontal.
Local maximum\(f'\) changes from positive to negative (or \(f''\lt 0\) at HL).
Local minimum\(f'\) changes from negative to positive (or \(f''\gt 0\) at HL).
ConstraintA fixed condition used to eliminate a variable.
DomainThe set of values of the variable that make sense in context.
Cylinder: \(V=\pi r^{2}h\)Volume of a cylinder with radius \(r\) and height \(h\).
Cylinder: \(A=2\pi r^{2}+2\pi rh\)Total surface area of a closed cylinder.
Profit \(=\) revenue \(-\) costUsed in business problems.

Worked examples

Example 1 An open box is made from a square sheet of card of side 30 cm by cutting a square of side \(x\) cm from each corner and folding up the sides. Find the value of \(x\) that gives the greatest volume, and find that volume.

The base is a square of side \(30-2x\) and the height is \(x\), so \(V=x(30-2x)^{2}\).

Expand: \(V=x(900-120x+4x^{2})=900x-120x^{2}+4x^{3}\).

Domain: \(0\lt x\lt 15\), since the base must have a positive side.

\(\frac{dV}{dx}=900-240x+12x^{2}=12(x^{2}-20x+75)=12(x-5)(x-15)\).

Setting \(\frac{dV}{dx}=0\) gives \(x=5\) or \(x=15\). Only \(x=5\) is inside the domain.

Check the nature: for \(x\lt 5\) (say \(x=1\)), \(\frac{dV}{dx}=12(-4)(-14)\gt 0\). For \(5\lt x\lt 15\) (say \(x=10\)), \(\frac{dV}{dx}=12(5)(-5)\lt 0\). The derivative changes from positive to negative, so \(x=5\) is a maximum.

\(V=5\times(30-10)^{2}=5\times 400=2000\).

Answer: \(x=5\) cm, giving a maximum volume of 2000 cm\(^3\).

Example 2 A closed cylindrical can must hold 500 cm\(^3\). Find the radius that makes the surface area as small as possible, and the minimum surface area.

Constraint: \(\pi r^{2}h=500\), so \(h=\frac{500}{\pi r^{2}}\).

Surface area: \(A=2\pi r^{2}+2\pi rh=2\pi r^{2}+2\pi r\times\frac{500}{\pi r^{2}}=2\pi r^{2}+\frac{1000}{r}\).

Write \(A=2\pi r^{2}+1000r^{-1}\). Then \(\frac{dA}{dr}=4\pi r-1000r^{-2}\).

Set to zero: \(4\pi r=\frac{1000}{r^{2}}\), so \(r^{3}=\frac{250}{\pi}\approx 79.58\) and \(r\approx 4.30\) cm.

Nature: at \(r=4\), \(\frac{dA}{dr}=50.27-62.5\lt 0\). At \(r=5\), \(\frac{dA}{dr}=62.83-40\gt 0\). The sign changes from negative to positive, so this is a minimum.

\(h=\frac{500}{\pi(4.301)^{2}}\approx 8.60\) cm, and \(A=2\pi(4.301)^{2}+\frac{1000}{4.301}\approx 116.2+232.5\approx 349\) cm\(^2\).

Answer: \(r\approx 4.30\) cm (with \(h\approx 8.60\) cm); minimum surface area \(\approx 349\) cm\(^2\).

Example 3 A concert organiser sells tickets at £\(p\) each. The attendance is modelled by \(N=600-15p\) for \(0\le p\le 40\). Each person who attends costs the organiser £4 in refreshments. Find the ticket price that gives the greatest profit, and that profit.

Profit per person is \(p-4\), so \(P=(p-4)(600-15p)=-15p^{2}+660p-2400\).

\(\frac{dP}{dp}=-30p+660\). Setting this to zero gives \(p=22\).

Nature: \(\frac{dP}{dp}\gt 0\) for \(p\lt 22\) and \(\lt 0\) for \(p\gt 22\), so \(p=22\) is a maximum.

Attendance: \(N=600-15(22)=270\). Profit: \(P=(22-4)\times 270=18\times 270=4860\).

Check the endpoints: at \(p=0\), \(P=-2400\), and at \(p=40\), \(N=0\) so \(P=0\). Both are lower than 4860. A graph of \(P\) on the GDC, with the maximum feature, also gives \((22,\,4860)\).

Answer: ticket price £22, giving a maximum profit of £4860.

Common errors

  • Differentiating a formula that still has two variables. Use the constraint to eliminate one first.
  • Not showing that the stationary point is a maximum or a minimum, or not checking it lies within the domain.
  • Answering with the value of the variable only (\(x=5\)) when the question asks for the maximum volume, price or area.
  • Ignoring the endpoints of the domain when the interval is closed.
  • Leaving out units, or giving an answer that is impossible in context, such as a negative length.

Exam tip: Write one line stating the function in a single variable, then one line for its derivative. Then show the sign of the derivative either side of the stationary point to justify maximum or minimum.

Check yourself

  1. Two positive numbers add to 20. Find the greatest possible product.
    Answer\(P=x(20-x)=20x-x^{2}\). \(P'=20-2x=0\) gives \(x=10\). \(P'\) is positive before and negative after, so it is a maximum: \(P=10\times 10=100\).
  2. A farmer has 120 m of fencing for three sides of a rectangular field next to a straight river (no fence needed along the river). Find the greatest possible area.
    AnswerLet the two sides perpendicular to the river be \(x\) m. The side parallel is \(120-2x\). \(A=x(120-2x)=120x-2x^{2}\). \(A'=120-4x=0\) gives \(x=30\). The maximum area is \(30\times 60=1800\) m\(^2\).
  3. Find the minimum value of \(f(x)=x+\dfrac{16}{x}\) for \(x\gt 0\).
    Answer\(f(x)=x+16x^{-1}\), \(f'(x)=1-16x^{-2}=0\) gives \(x^{2}=16\), so \(x=4\). \(f'\) is negative for \(x\lt 4\) and positive for \(x\gt 4\), so it is a minimum: \(f(4)=4+4=8\).
  4. Find the greatest and least values of \(f(x)=x^{3}-12x\) for \(0\le x\le 3\).
    Answer\(f'(x)=3x^{2}-12=0\) gives \(x=2\) in the interval. Compare \(f(0)=0\), \(f(2)=8-24=-16\), \(f(3)=27-36=-9\). The greatest value is 0 (at \(x=0\)) and the least is \(-16\) (at \(x=2\)).