Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Analysis and Approaches
  3. ›5 Calculus
  4. ›5.8 Maxima, minima and optimization

IB Mathematics: Analysis and Approaches · Topic 5 · Calculus

5.8 Maxima, minima and optimization

Find and classify local maxima and minima using the first and second derivative tests, and solve optimisation problems with calculus.

  • 5 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5Local maxima and minima occur where the gradient is zero
  1. 1Local maxima and minima occur where the gradient is zero
  2. 2The first derivative test checks the sign of the gradient
  3. 3The second derivative test is quicker when it applies
  4. 4An optimisation problem asks for the best feasible value
  5. 5A complete solution classifies the result and states units
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: Local maxima and minima occur where the gradient is zero

A ball thrown upwards stops rising at the top of its path. At that instant its height is greater than nearby heights. This is a local maximum.

Likewise, the lowest point of a valley is a local minimum. At both, the curve is momentarily flat, so f′(x)=0f'(x)=0f′(x)=0. We call such a point a stationary point. A function may have several of each. The word local matters, because a larger value may exist elsewhere on the graph.

Figure 1. The curve is momentarily flat at both marked points, where the gradient is zero.

Worked example

Finding stationary points

Find the stationary points of f(x)=x3−3xf(x)=x^3-3xf(x)=x3−3x.
  1. 1
    f′(x)=3x2−3f'(x)=3x^2-3f′(x)=3x2−3.
  2. 2
    Set f′(x)=0f'(x)=0f′(x)=0: 3x2−3=03x^2-3=03x2−3=0, so x2=1x^2=1x2=1 and x=±1x=\pm1x=±1.
  3. 3
    Find heights: f(1)=1−3=−2f(1)=1-3=-2f(1)=1−3=−2 and f(−1)=−1+3=2f(-1)=-1+3=2f(−1)=−1+3=2.

Answer: The stationary points are (−1,2)(-1,2)(−1,2) and (1,−2)(1,-2)(1,−2).

Common mistake

Not every stationary point is a maximum or minimum. For y=x3y=x^3y=x3, f′(0)=0f'(0)=0f′(0)=0, yet the curve keeps rising through the origin.

Key terms · tap one for its definition

local maximum

A local maximum is a function value at least as large as nearby function values.

local minimum

A local minimum is a function value at least as small as nearby function values.

stationary point

A stationary point is a point on a graph where f′(x)=0f'(x)=0f′(x)=0.

Part 1 done

2

Part 2 of 5: The first derivative test checks the sign of the gradient

Knowing a point is stationary does not tell you its type. Look at the gradient on each side instead. Use one value just left and one just right of the point.

This is the first derivative test. The table shows how the sign change of f′f'f′ as xxx increases gives the type of point. If the gradient keeps the same sign, the point is neither a maximum nor a minimum.

Classifying a stationary point

Sign of f′f'f′ beforeSign of f′f'f′ afterType
positivenegativelocal maximum
negativepositivelocal minimum
same signsame signneither
Sign of $f'$ before
positive
Sign of f′f'f′ after
negative
Type
local maximum
Sign of $f'$ before
negative
Sign of f′f'f′ after
positive
Type
local minimum
Sign of $f'$ before
same sign
Sign of f′f'f′ after
same sign
Type
neither

Exam tip

Show your test values and the sign of f′f'f′ at each. A bare statement that the sign changes earns little credit.

Worked example

Using the first derivative test

Classify the stationary points of f(x)=x3−3xf(x)=x^3-3xf(x)=x3−3x.
  1. 1
    f′(x)=3(x−1)(x+1)f'(x)=3(x-1)(x+1)f′(x)=3(x−1)(x+1), with zeros at x=−1x=-1x=−1 and x=1x=1x=1.
  2. 2
    f′(−2)=9>0f'(-2)=9>0f′(−2)=9>0, f′(0)=−3<0f'(0)=-3<0f′(0)=−3<0 and f′(2)=9>0f'(2)=9>0f′(2)=9>0.
  3. 3
    At x=−1x=-1x=−1 the sign goes positive to negative. At x=1x=1x=1 it goes negative to positive.

Answer: x=−1x=-1x=−1 is a local maximum and x=1x=1x=1 is a local minimum.

Key term

first derivative test

The first derivative test classifies a stationary point as a maximum, a minimum or neither using the sign of f′f'f′ on either side.

Part 2 done

Quick check

One question on the part you just read

Easy

State the condition satisfied at a local maximum of a smooth function.
Show answer and explanation

Answer: B · Worked explanation

At a local maximum the curve is momentarily flat, so the gradient is zero and f′(x)=0f'(x)=0f′(x)=0. The condition f′′(x)=0f''(x)=0f′′(x)=0 does not define a maximum, because the second derivative is usually negative there. The condition f′(x)>0f'(x)>0f′(x)>0 describes a rising curve, not a peak.
3

Part 3 of 5: The second derivative test is quicker when it applies

Sometimes there is a faster check. A bowl shape near a stationary point means a minimum. An upside-down bowl means a maximum.

This gives the second derivative test. Find f′′(c)f''(c)f′′(c) at a stationary point x=cx=cx=c and read its sign. A positive value gives a minimum, and a negative value gives a maximum. It needs only one evaluation instead of two sign checks.

Common mistake

If f′′(c)=0f''(c)=0f′′(c)=0, the test gives no result. The point may still be a maximum or minimum, as for y=x4y=x^4y=x4 at x=0x=0x=0.

Worked example

Using the second derivative test

Classify the stationary points of f(x)=x4−4x3f(x)=x^4-4x^3f(x)=x4−4x3.
  1. 1
    f′(x)=4x3−12x2=4x2(x−3)f'(x)=4x^3-12x^2=4x^2(x-3)f′(x)=4x3−12x2=4x2(x−3), so x=0x=0x=0 or x=3x=3x=3.
  2. 2
    f′′(x)=12x2−24xf''(x)=12x^2-24xf′′(x)=12x2−24x.
  3. 3
    At x=3x=3x=3: f′′(3)=108−72=36>0f''(3)=108-72=36>0f′′(3)=108−72=36>0, so a local minimum, with f(3)=−27f(3)=-27f(3)=−27.
  4. 4
    At x=0x=0x=0: f′′(0)=0f''(0)=0f′′(0)=0, so the test fails.
  5. 5
    Check f′f'f′: f′(−1)=−16f'(-1)=-16f′(−1)=−16 and f′(1)=−8f'(1)=-8f′(1)=−8 are both negative, so there is no sign change.

Answer: There is a local minimum at (3,−27)(3,-27)(3,−27). The point at x=0x=0x=0 is neither a maximum nor a minimum.

Key term

second derivative test

At f′(c)=0f'(c)=0f′(c)=0, a positive f′′(c)f''(c)f′′(c) gives a local minimum, while a negative f′′(c)f''(c)f′′(c) gives a local maximum.

Part 3 done

4

Part 4 of 5: An optimisation problem asks for the best feasible value

Calculus can also find the greatest area or the least cost. An optimisation problem needs a quantity to maximise or minimise. That quantity usually depends on two variables. Only values that the problem allows are feasible, so the domain matters.

A constraint links those variables, such as a fixed length of fencing. Use it to write the quantity in one variable. Then differentiate as before.

  • Define the variables and draw a sketch.
  • Write the quantity to optimise.
  • Use the constraint to eliminate one variable.
  • Differentiate and solve for zero gradient.
  • Classify the result and check the domain.
  • State the answer in context, with units.

Key terms · tap one for its definition

optimisation problem

An optimisation problem seeks the greatest or least feasible value of a quantity.

constraint

A constraint is a condition that links the variables of an optimisation problem and limits their values.

Part 4 done

Quick check

One question on the part you just read

Easy

Identify the type of stationary point where f′f'f′ changes from positive to negative as xxx increases.
Show answer and explanation

Answer: D · Worked explanation

The gradient is positive, so the curve rises. It is zero at the point, then negative, so the curve falls. A curve that rises then falls peaks at the point, giving a local maximum. A local minimum needs the opposite change, from negative to positive.
5

Part 5 of 5: A complete solution classifies the result and states units

Here is the method applied to a typical problem. Notice the final check that the answer lies inside the allowed values.

Worked example

Maximising an area

A farmer has 60 m of fencing for three sides of a rectangular pen. The fourth side is a wall. Find the greatest possible area.
  1. 1
    Let the two equal sides have length xxx metres. The third side is 60−2x60-2x60−2x metres.
  2. 2
    Area: A=x(60−2x)=60x−2x2A=x(60-2x)=60x-2x^2A=x(60−2x)=60x−2x2, for 0<x<300<x<300<x<30.
  3. 3
    Differentiate: dAdx=60−4x\frac{dA}{dx}=60-4xdxdA​=60−4x. Set it to zero: x=15x=15x=15.
  4. 4
    Classify: d2Adx2=−4<0\frac{d^2A}{dx^2}=-4<0dx2d2A​=−4<0, so this is a maximum.
  5. 5
    The third side is 60−30=3060-30=3060−30=30 m, so A=15×30=450A=15\times30=450A=15×30=450.

Answer: The greatest area is 450 m2450\,\mathrm{m^2}450m2, with sides 15 m15\,\mathrm{m}15m, 15 m15\,\mathrm{m}15m and 30 m30\,\mathrm{m}30m.

A stationary value is not always the best feasible one. If the domain has limits, compare it with the values at the ends. Here both ends give an area of zero, so the stationary value wins. Always ask whether the answer makes sense for the situation.

Exam tip

End with a sentence in context. State the quantity, its value and its units, such as the greatest area.

Note read

Check your recall[16 marks]

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

  1. 1.State[1 mark]

    State the condition on f′(x)f'(x)f′(x) at a stationary point of y=f(x)y=f(x)y=f(x).

    Show mark schemeHide mark scheme

    Model answer

    f′(x)=0f'(x)=0f′(x)=0.

    • 1 mark for stating that f′(x)=0f'(x)=0f′(x)=0
  2. 2.Describe[2 marks]

    Describe how the first derivative test shows that a stationary point is a local minimum.

    Show mark schemeHide mark scheme

    Model answer

    Find the sign of f′f'f′ just before and just after the point. If f′f'f′ is negative before and positive after, the point is a local minimum.

    • 1 mark for checking the sign of f′f'f′ on either side of the point
    • 1 mark for stating negative before and positive after
  3. 3.Determine[4 marks]

    Determine the stationary points of f(x)=x3−12xf(x)=x^3-12xf(x)=x3−12x and classify each one.

    Show mark schemeHide mark scheme

    Model answer

    f′(x)=3x2−12=0f'(x)=3x^2-12=0f′(x)=3x2−12=0 gives x=±2x=\pm2x=±2. f′′(x)=6xf''(x)=6xf′′(x)=6x, so f′′(−2)=−12<0f''(-2)=-12<0f′′(−2)=−12<0 is a local maximum and f′′(2)=12>0f''(2)=12>0f′′(2)=12>0 is a local minimum. Heights: f(−2)=16f(-2)=16f(−2)=16 and f(2)=−16f(2)=-16f(2)=−16, so the points are (−2,16)(-2,16)(−2,16) and (2,−16)(2,-16)(2,−16).

    • 1 mark for solving f′(x)=3x2−12=0f'(x)=3x^2-12=0f′(x)=3x2−12=0 to obtain x=±2x=\pm2x=±2
    • 1 mark for finding f′′(x)=6xf''(x)=6xf′′(x)=6x and using its sign to classify
    • 1 mark for stating x=−2x=-2x=−2 is a local maximum and x=2x=2x=2 a local minimum
    • 1 mark for finding the yyy-coordinates 16 and -16
  4. 4.Explain[2 marks]

    Explain why the second derivative test cannot classify the stationary point of y=x4y=x^4y=x4 at x=0x=0x=0.

    Show mark schemeHide mark scheme

    Model answer

    Here f′′(x)=12x2f''(x)=12x^2f′′(x)=12x2, so f′′(0)=0f''(0)=0f′′(0)=0, and the test gives no result. The sign of f′f'f′ either side must be checked instead.

    • 1 mark for stating that f′′(0)=0f''(0)=0f′′(0)=0, so the test is inconclusive
    • 1 mark for stating that the first derivative test, using the sign of f′f'f′ either side, is needed
  5. 5.Calculate[4 marks]

    Two positive numbers have a sum of 12. Calculate the greatest possible value of their product.

    Show mark schemeHide mark scheme

    Model answer

    Let the numbers be xxx and 12−x12-x12−x. Then P=12x−x2P=12x-x^2P=12x−x2 and dPdx=12−2x=0\frac{dP}{dx}=12-2x=0dxdP​=12−2x=0 gives x=6x=6x=6. Since d2Pdx2=−2<0\frac{d^2P}{dx^2}=-2<0dx2d2P​=−2<0, this is a maximum, and P=6×6=36P=6\times6=36P=6×6=36.

    • 1 mark for writing P=x(12−x)P=x(12-x)P=x(12−x) in one variable
    • 1 mark for solving dPdx=12−2x=0\frac{dP}{dx}=12-2x=0dxdP​=12−2x=0 to obtain x=6x=6x=6
    • 1 mark for justifying a maximum, for example with d2Pdx2=−2<0\frac{d^2P}{dx^2}=-2<0dx2d2P​=−2<0
    • 1 mark for obtaining P=36P=36P=36
  6. 6.Outline[3 marks]

    Outline the steps for solving an optimisation problem using calculus.

    Show mark schemeHide mark scheme

    Model answer

    Write the quantity to optimise in terms of one variable, using the constraint. Differentiate and solve for zero gradient. Classify the result and check it lies within the domain, then state the answer with units.

    • 1 mark for writing the quantity in one variable using the constraint
    • 1 mark for differentiating and setting the derivative equal to zero
    • 1 mark for classifying the result, checking the domain and stating the answer in context

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·Determine[1 mark]

Determine the xxx-coordinate of the stationary point of y=x2−6x+5y=x^2-6x+5y=x2−6x+5.
Show answer and explanation

Answer: A · Worked explanation

Differentiate to get dydx=2x−6\frac{dy}{dx}=2x-6dxdy​=2x−6. Setting this to zero gives x=3x=3x=3. Check by substituting: the gradient is 0 at x=3x=3x=3. The value x=−3x=-3x=−3 is a sign error. The value x=6x=6x=6 uses the size of the coefficient of xxx, which is -6, instead of solving for zero gradient. Solving 2x−6=02x-6=02x−6=0 is the correct step.
4.

Medium·Determine[2 marks]

Determine the nature of the stationary point of f(x)=x3−3x2f(x)=x^3-3x^2f(x)=x3−3x2 at x=2x=2x=2.
Show answer and explanation

Answer: C · Worked explanation

The first derivative is f′(x)=3x2−6xf'(x)=3x^2-6xf′(x)=3x2−6x, which is zero at x=2x=2x=2. The second derivative is f′′(x)=6x−6f''(x)=6x-6f′′(x)=6x−6, so f′′(2)=6>0f''(2)=6>0f′′(2)=6>0 and the point is a local minimum. A local maximum would need a negative second derivative. The value f(2)=−4f(2)=-4f(2)=−4 being negative does not affect the type.
5.

Medium·Determine[2 marks]

Two positive numbers have a sum of 20. Determine the greatest possible product.
Show answer and explanation

Answer: C · Worked explanation

Let the numbers be xxx and 20−x20-x20−x. Then P=20x−x2P=20x-x^2P=20x−x2 and dPdx=20−2x=0\frac{dP}{dx}=20-2x=0dxdP​=20−2x=0 gives x=10x=10x=10. So P=10×10=100P=10\times10=100P=10×10=100, a maximum because d2Pdx2=−2<0\frac{d^2P}{dx^2}=-2<0dx2d2P​=−2<0. The value 10 is a number, not the product. The value 99 comes from 9×119\times119×11, a valid product that is not the greatest.
6.

Medium·Determine[2 marks]

Determine the minimum value of y=x2−8x+3y=x^2-8x+3y=x2−8x+3.
Show answer and explanation

Answer: A · Worked explanation

The derivative dydx=2x−8\frac{dy}{dx}=2x-8dxdy​=2x−8 is zero at x=4x=4x=4. Then y=16−32+3=−13y=16-32+3=-13y=16−32+3=−13, and d2ydx2=2>0\frac{d^2y}{dx^2}=2>0dx2d2y​=2>0 confirms a minimum. The value 4 is the position of the minimum, not its value. The value 3 is the value of yyy at x=0x=0x=0. The value 13 comes from a sign error in the final substitution.
7.

Medium·Calculate[2 marks]

A rectangle has area 36 cm236\,\mathrm{cm^2}36cm2. Calculate its least possible perimeter.
Show answer and explanation

Answer: D · Worked explanation

Let the sides be xxx and 36x\frac{36}{x}x36​. Then P=2x+72xP=2x+\frac{72}{x}P=2x+x72​ and dPdx=2−72x2=0\frac{dP}{dx}=2-\frac{72}{x^2}=0dxdP​=2−x272​=0 gives x=6x=6x=6. Since d2Pdx2=144x3>0\frac{d^2P}{dx^2}=\frac{144}{x^3}>0dx2d2P​=x3144​>0, this is a minimum, and P=4×6=24 cmP=4\times6=24\,\mathrm{cm}P=4×6=24cm. The value 12 is the length of only two of the four sides. The optimal rectangle is a square.
8.

Hard·Deduce[2 marks]

A function has f′(0)=0f'(0)=0f′(0)=0 and f′′(0)=0f''(0)=0f′′(0)=0. Deduce which conclusion is justified.
Show answer and explanation

Answer: B · Worked explanation

When f′′(c)=0f''(c)=0f′′(c)=0, the second derivative test is inconclusive. The functions x3x^3x3, x4x^4x4 and −x4-x^4−x4 all have f′(0)=0f'(0)=0f′(0)=0 and f′′(0)=0f''(0)=0f′′(0)=0, yet give neither, a minimum and a maximum respectively. So no single type follows, and the sign of f′f'f′ either side must be checked.
9.

Hard·Determine[2 marks]

An open-topped box has a square base of side x cmx\,\mathrm{cm}xcm and a volume of 32 cm332\,\mathrm{cm^3}32cm3. Determine its least possible surface area.
Show answer and explanation

Answer: C · Worked explanation

The height is h=32x2h=\frac{32}{x^2}h=x232​, so the surface area is S=x2+4xh=x2+128xS=x^2+4xh=x^2+\frac{128}{x}S=x2+4xh=x2+x128​. Then dSdx=2x−128x2=0\frac{dS}{dx}=2x-\frac{128}{x^2}=0dxdS​=2x−x2128​=0 gives x3=64x^3=64x3=64, so x=4x=4x=4 and S=16+32=48 cm2S=16+32=48\,\mathrm{cm^2}S=16+32=48cm2. The value 4 is the side length, and 64 is x3x^3x3, an intermediate value. Neither is the surface area, which the question asks for.
10.

Hard·Determine[2 marks]

Determine the greatest value of f(x)=x3−3xf(x)=x^3-3xf(x)=x3−3x for 0≤x≤30\le x\le30≤x≤3.
Show answer and explanation

Answer: A · Worked explanation

The stationary points are at x=±1x=\pm1x=±1, but only x=1x=1x=1 lies in the domain, with f(1)=−2f(1)=-2f(1)=−2. Compare the end values: f(0)=0f(0)=0f(0)=0 and f(3)=27−9=18f(3)=27-9=18f(3)=27−9=18. The greatest value is 18, at the end of the domain. The value 2 is the local maximum at x=−1x=-1x=−1, which lies outside the domain.

Keep going

Next topic5.9 KinematicsPrevious topic5.7 The second derivative

More in Topic 5 · Calculus

  1. 5.4Tangents and normalsNotes · 10 questions
  2. 5.5Introduction to integrationNotes · 9 questions
  3. 5.6Differentiation rulesNotes · 10 questions
  4. 5.7The second derivativeNotes · 9 questions
  5. 5.8Maxima, minima and optimizationNotes · 10 questions
  6. 5.9KinematicsNotes · 10 questions
  7. 5.10Indefinite integrals and substitutionNotes · 10 questions
  8. 5.11Definite integrals and areasNotes · 10 questions
  9. 5.12First principles and continuityNotes · 9 questions· HL only

All IB Mathematics: Analysis and Approaches 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. 1Local maxima and minima occur where the gradient is zero
  2. 2The first derivative test checks the sign of the gradient
  3. 3The second derivative test is quicker when it applies
  4. 4An optimisation problem asks for the best feasible value
  5. 5A complete solution classifies the result and states units
  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

A curve with a local maximum and minimum

y-2-1012-3-2-10123x
  • y = x³ − 3x
  • Local maximum
  • Local minimum