In this guide
← Maths AI guides

Calculus · AI SL & HL

Optimisation

Translate a word problem into one variable, find candidate extrema and prove that the chosen value is valid in context.

Course focus: AI SL & HL: use technology to support calculation, show the mathematical setup and interpret the result in its context. Additional HL methods are labelled below.

Before you start: Differentiation, areas, volumes and domain inequalities.

Start with a small example

Build it from the beginning

Optimisation asks for the largest or smallest feasible value. First identify what is being optimised, then express it using one variable and the constraint. A stationary value outside the allowed domain cannot solve the original problem.

A first walkthrough

A rectangle has perimeter 20. Find its largest area.

  1. Let its sides be x and \(10-x\), with \(0<x<10\).
  2. Area is \(A=x(10-x)=25-(x-5)^2\).
  3. A square is nonnegative, so the largest area is 25 at x=5; both sides are 5.
Try the practice ladder after learning the methods ↓

The foundations behind the method

Understand what the symbols mean

An optimisation problem chooses the best feasible value. First identify the quantity to maximise or minimise and the restrictions defining possible choices. A stationary algebraic candidate outside the physical domain is irrelevant. Boundary values may be optimal even when no derivative vanishes there.

How the ideas connect

Use a constraint to eliminate variables before differentiating. Then compare valid candidates and endpoints, or justify a global conclusion through the function's shape. A second-derivative test proves a local classification; the domain and other candidates determine whether it is the required overall optimum.

01

Start with the idea

Build your understanding

Optimisation combines modelling and calculus or algebra. A derivative cannot repair an incorrect objective or an impossible domain. Build the quantity to optimise from the constraints, then justify that the candidate is best among all feasible values.

Objective versus constraint

The objective is the quantity to maximise or minimise. A constraint relates variables and lets you reduce the objective to one independent variable.

Feasible domain

Lengths, capacities and other physical variables impose restrictions. A stationary solution outside those restrictions is irrelevant to the model.

Compare the approaches

Choose by the information in the question, rather than the formula you recognise first.

Quadratic vertex

When it helpsUse a quadratic objective when completing the square is direct.

Check before using itThe vertex must belong to the feasible domain.

Derivative and boundaries

When it helpsUse for a more general smooth objective.

Check before using itInclude valid endpoints and limiting behaviour.

Your method plan

  1. Define variables, the objective and the constraint.
  2. Eliminate a variable and state the feasible interval.
  3. Classify candidates, compare boundaries and give the requested physical dimensions.
02

Learn the methods

Learn step by step

1. Choose variables and objective

Draw a labelled diagram and identify what must be maximised or minimised. Do not differentiate a quantity that is not the objective. If the task asks for least cost, area or volume may only be an intermediate step.

2. Use the constraint

A fixed perimeter, surface area or volume relates variables. Rearrange it to eliminate all but one variable from the objective. State the allowed domain before calculus, using positivity and geometric limits. Differentiate the reduced expression, not an expression that still contains an unrelated variable.

The feasible domain matters

024568100510152025Width xArea AMaximum (5,25)
  • A = x(10 − x)
A rectangle of perimeter 20 has area A = x(10 − x), with 0 < x < 10. The graph peaks at width 5 and area 25. Endpoints give degenerate rectangles, outside the physical domain.

Constraint example

Why this formula works

The perimeter relation \(2x+2y=P\) gives \(y=P/2-x\). Substituting into xy produces a one-variable objective, allowing calculus without treating a dependent side as an independent constant. Positive side lengths impose the open domain zero to \(P/2\).

The formula

A rectangle with fixed perimeter P satisfies \(y=P/2-x\), so area \(A=x(P/2-x)\).

Quick example

For \(P=24\), \(A=x(12-x)\) on \(0<x<12\). Its maximum occurs at \(x=6\), producing a square of area 36.

Worked example: An open box

Squares of side x are cut from corners of a 12-by-12 sheet to make an open box. Maximise volume.

  1. Dimensions are x by \((12-2x)\) by \((12-2x)\), with \(0<x<6\).
  2. \(V=x(12-2x)^{2}\) and \(V'=(12-2x)(12-6x)\). The interior stationary point is \(x=2\).
  3. V′ is positive before 2 and negative after; volume tends to zero at both boundaries. Maximum volume is \(2\times 8^{2}=128\).

3. Find and classify candidates

Solve the derivative equation within the physical domain. Use a sign change or second-derivative test to classify a stationary point. On a closed domain compare endpoints. On an open or unbounded domain examine limiting behaviour to establish the global result.

Stationary candidate

Why this formula works

At a smooth interior maximum or minimum, a nonzero slope would let you improve the objective by moving a little in one direction. Therefore a zero derivative is a candidate condition, while endpoints and nonsmooth points need separate consideration.

The formula

Solve \(F'(x)=0\) within the feasible domain.

Quick example

For area \(A=x(10-x)\) with \(0<x<10\), \(A'=10-2x\) gives the candidate \(x=5\).

Classification

Why this formula works

The second derivative reveals whether the local curve bends upward or downward at the stationary input. A global conclusion additionally requires checking the feasible boundaries and any other candidate points.

The formula

\(F\prime\prime <0\) at a stationary point gives a local maximum; \(F\prime\prime >0\) gives a local minimum. Compare all relevant boundaries for a global claim.

Quick example

\(A\prime\prime =-2\) for \(A=x(10-x)\), so the parabola bends downward everywhere. Together with endpoint areas tending to zero, \(x=5\) gives the global maximum 25.

Worked example: Fixed perimeter

A rectangle has perimeter 20. Find the largest possible area.

  1. Let sides be x and y. The constraint gives \(y=10-x\) and \(0<x<10\).
  2. Area \(A=x(10-x)\), so \(A'=10-2x=0\) at \(x=5\).
  3. \(A\prime\prime=-2<0\) and the quadratic is concave down throughout; the maximum is 25 at \(x=y=5\).

4. Interpret the answer

Recover every requested dimension from the constraint, calculate the maximum/minimum quantity, and include units. A negative root is not a physical length. If dimensions must be integers, test neighbouring feasible choices rather than automatically rounding a continuous optimum.

5. Numerical optimisation

A graph or solver can help on a calculator paper, but set a sensible window and show the defining function and domain. A visible local maximum is not automatically the global maximum. Algebraic reasoning gives a more reliable check.

6. Use a quadratic vertex without assuming calculus is required

Some maximum/minimum models reduce directly to a quadratic. Complete the square, locate the vertex, and apply the physical domain. The sign of the squared coefficient proves the extremum without differentiating. A quantity such as area cannot take negative values even if the polynomial does outside its model domain. Show how the constraint creates the one-variable expression, then recover all requested dimensions.

Use a quadratic vertex without assuming calculus is required

Why this formula works

Completing the square expresses the objective as a constant plus a signed nonnegative squared distance from the candidate. This establishes a bound and the equality condition within the feasible set.

The formula

\(ax^2+bx+c=a(x+b/(2a))^2+c-b^2/(4a)\) \(a\ne 0\).

Quick example

\(A=-x^{2}+12x=36-(x-6)^{2}\) cannot exceed 36 when \(x=6\) is permitted.

Worked example: An area maximum by algebra

A rectangle has perimeter 24. Prove algebraically that its greatest area is 36.

  1. If one side is x, the other is \(12-x\), with \(0<x<12\).
  2. \(A=x(12-x)=36-(x-6)^{2}\le 36\) because a square is nonnegative.
  3. Equality occurs at \(x=6\), giving both sides 6. The result is feasible and the area is 36 square units.
Quick formula reference

For revision once you understand the methods above. Check the conditions before using a formula.

Stationary candidate

Solve \(F'(x)=0\) within the feasible domain.

Return to the explanation →

Classification

\(F\prime\prime <0\) at a stationary point gives a local maximum; \(F\prime\prime >0\) gives a local minimum. Compare all relevant boundaries for a global claim.

Return to the explanation →

Constraint example

A rectangle with fixed perimeter P satisfies \(y=P/2-x\), so area \(A=x(P/2-x)\).

Return to the explanation →

Use a quadratic vertex without assuming calculus is required

\(ax^2+bx+c=a(x+b/(2a))^2+c-b^2/(4a)\), \(a\ne 0\).

Return to the explanation →

Learn to diagnose an error

Spot the mistake

The statement below is incorrect. Identify the missing condition or reasoning before opening the explanation.

Incorrect reasoning

A rectangle with perimeter 20 has maximum area when its width is 10.

Explain and repair the mistake

Let width be x and length \(10-x\), with \(0<x<10\). Area is \(10x-x^2\), maximised at x=5, giving a square of area 25. At width 10 the other side is zero.

03

Connect and apply

Put the ideas together

A more demanding application of this guide’s methods. This is a learning stage; any additional HL content is labelled separately.

Worked application

A wall changes the fencing constraint

Twenty metres of fencing enclose three sides of a rectangular garden against a wall. Find the greatest area.

  1. Let x be each side perpendicular to the wall and y the fenced parallel side. The constraint is \(2x+y=20\), with \(0<x<10\).
  2. Area is \(A=x(20-2x)=50-2(x-5)^2\), which is at most 50.
  3. The maximum occurs at \(x=5\), giving \(y=10\). Both dimensions are feasible and the area is 50 square metres.
  4. The expression tends to zero at the limiting degenerate rectangles, confirming the interior maximum. Using four fenced sides would solve a different model.
Pause and explain

If x must be at most 4, does the same vertex remain the answer?

Check your reasoning

No. The vertex is excluded. The area increases up to 5, so on the restricted domain its greatest attainable value occurs at x=4, giving area 48.

Common mistakes and how to avoid them

  • Use the constraint to reduce to one variable before differentiating.
  • Reject stationary values outside the physical domain.
  • State the dimensions as well as the optimum quantity.
04

Practise independently

Build confidence, then apply it

Try each question before opening its hint or solution. If a method is new, return to the walkthrough, then try again. These learning stages describe the practice sequence; additional HL content is labelled separately.

  1. 1

    Build confidence

    Find the maximum of \(A(x)=12x-x^2\).

    Need a starting point?

    Complete the square or differentiate.

    Show the worked solution
    1. \(A=36-(x-6)^2\).
    2. The maximum is 36 at x=6 if that input is feasible.
  2. 2

    Apply and explain

    If the same function is restricted to \(0\le x\le4\), is 36 still attainable?

    Need a starting point?

    Check whether x=6 is allowed.

    Show the worked solution
    1. No: 6 lies outside the domain.
    2. The function rises throughout [0,4], so the maximum is \(A(4)=32\).
  3. 3

    Check your understanding

    Why state the feasible interval before solving \(A'(x)=0\)?

    Show the worked solution

    It rules out impossible dimensions, identifies boundary cases and determines whether a candidate is an admissible optimum.

  4. 4

    Use the method

    Why is \(x=6\) rejected in the open-box example?

    Show the worked solution

    It makes the base dimensions zero, so no positive-volume box remains; it is a boundary, not an interior feasible optimum.

  5. 5

    Combine the skills

    Use a quadratic vertex without assuming calculus is required

    Find the greatest value of −\(2x^{2}+8x+1\) on all real x.

    Show the worked solution

    Complete the square: \(9-2(x-2)^{2}\le 9\), attained at \(x=2\).

Finished? Use the linked question bank below to practise selecting the method without a guide telling you which rule to use.

Using these methods in exam questions

AI Paper 1

GDC required

Short-response questions still need mathematical setup and interpretation. Choose the correct tool, enter the model or data carefully, and check units and rounding.

AI Paper 2

GDC required

Extended-response questions connect several steps. Keep intermediate values at full precision and explain how each result answers the context.

For this topic: Distinguish a function value from a derivative value. For a tangent give both the point and slope; for an integral show the integrand and limits, then interpret the sign and units.

HL only · GDC required

Paper 3: build a connected argument

Both AA HL and AI HL Paper 3 contain two extended problem-solving questions. A question develops a theme, so keep useful earlier results, test small cases and explain any proposed general rule. A calculator pattern can suggest a result; your mathematical reasoning must support it.

  1. Identify what the first part establishes and record the conditions under which it holds.
  2. When a later part introduces a new definition or model, connect it to methods you already know rather than assuming a new formula must have been memorised.
  3. Check the conclusion against an earlier numerical case and explain its meaning or limitation.

For the first-assessment-2021 courses. IB assessment reference ↗

Find a specific method or formula

Now practise the method

If you opened this guide from a question, return to that tab and try the method without looking at the example. Your answer stays in the question tab.

Practise this subtopic →

Want a broader practice session? Explore IB Maths AI SL practice questions →Explore IB Maths AI HL practice questions →Try free IB Maths exam-style questions and worked solutions →

Original Arc Practice teaching notes for Maths AI. Core and HL sections are distinguished above. These notes follow the first-assessment-2021 course and are not an official IB publication or a complete syllabus checklist. IB course reference. Report a correction.