Skip to content
GATEiit

GATE CSE · Engineering Mathematics

Maxima and minima

Finding local and global maxima and minima of a function of one variable: critical points, the first and second derivative tests, closed-interval extrema, concavity and simple optimisation problems.

Before you start

  • Derivatives →

    Every test here uses f′ and f′′, and points where f′ does not exist are also candidates.

  • Factorising polynomials

    Critical points come from solving f′(x)=0, usually a quadratic or cubic.

This topic comes before: Mean value theorem

Concept notes

1. Local and global extrema, critical points

f has a local maximum at c if f(c)≥f(x) for all x near c, and a local minimum if f(c)≤f(x) near c. A global (absolute) maximum or minimum compares f(c) with every x in the domain.

A critical point is an interior point c where f′(c)=0 or f′(c) does not exist. Fermat's theorem: if f has a local extremum at an interior point c and f′(c) exists, then f′(c)=0.

The converse is false. f(x)=x3 has f′(0)=0 but no extremum at 0. And ∣x∣ has a minimum at 0 where f′ does not exist. So:

  • every interior extremum is a critical point,
  • not every critical point is an extremum.

Points where f′=0 are also called stationary points. A function can have many local maxima; the global maximum is the largest of them (or an endpoint value).

Increasing and decreasing: if f′>0 on an interval, f is strictly increasing there; if f′<0, strictly decreasing. A strictly increasing function on an interval has no interior extremum.

2. The first, second and higher derivative tests

First derivative test at a critical point c (works even where f′′ is awkward):

Sign of f′ left of c → right of c Result
+ → − local maximum
− → + local minimum
no change no extremum

Second derivative test at a stationary point (f′(c)=0):

  • f′′(c)<0: local maximum.
  • f′′(c)>0: local minimum.
  • f′′(c)=0: the test fails. Use the first derivative test or the higher test.

Higher derivative test: suppose f′(c)=f′′(c)=⋯=f(n−1)(c)=0 and f(n)(c)≠0.

  • n even: extremum, a maximum if f(n)(c)<0 and a minimum if f(n)(c)>0.
  • n odd: no extremum (a point of inflection).

Example: x4 at 0 has first non-zero derivative f(4)=24>0 (even order), so it is a minimum. x5 at 0 has first non-zero derivative of order 5 (odd), so there is no extremum.

3. Global extrema on a closed interval

Extreme value theorem: a function continuous on a closed interval [a,b] attains both a global maximum and a global minimum on it.

Method (closed interval):

  1. Find the critical points of f that lie inside (a,b). Drop those outside.
  2. Evaluate f at these points and at the endpoints a and b.
  3. The largest value is the global maximum; the smallest is the global minimum.

No second derivative test is needed: just compare values. The extremum is often at an endpoint, where f′ need not be zero, so never skip the endpoints.

On an open interval or on all of R a global extremum may not exist. For example x3−3x has a local maximum at x=−1, but no global maximum on R because x3→∞. Check the behaviour as x→±∞ (or at the open ends) before calling a local extremum global.

If f has only one critical point in an interval and it is a local minimum, it is also the global minimum on that interval (and likewise for a maximum).

4. Concavity and points of inflection

f is concave up (convex) where f′′>0: the graph bends upward and lies above its tangents. It is concave down where f′′<0.

A point of inflection is where the concavity changes, that is, where f′′ changes sign. f′′(c)=0 is needed (when f′′ exists) but is not enough: x4 has f′′(0)=0 and no inflection, since f′′=12x2 does not change sign.

For a cubic ax3+bx2+cx+d the single point of inflection is at x=−b3a, exactly midway between the local maximum and minimum when they exist.

The picture links all the tests: at a local maximum the curve is concave down, at a local minimum it is concave up, and the inflection point separates the two.

Optimisation recipe for word problems:

  1. Name the quantity to optimise and write it in terms of one variable, using the constraint to remove the others.
  2. Note the allowed range of the variable (lengths positive, and so on).
  3. Set the derivative to zero, then confirm max or min with f′′ or by comparing endpoint values.

A useful shortcut: for positive x,y with fixed sum x+y=S, the product xy is largest at x=y=S2 (AM–GM).

local max (1, 5) local min (3, 1) inflection (2, 3) f'' < 0: concave down f'' > 0: concave up x
$f(x) = x^3 - 6x^2 + 9x + 1$: local maximum at $x = 1$, local minimum at $x = 3$, inflection at $x = 2$.

Formulas to remember

Critical point
f′(c)=0 or f′(c) undefined
Second derivative test
f′(c)=0, f′′(c)<0⇒max⁡;f′′(c)>0⇒min⁡
Inflection of a cubicFor ax3+bx2+cx+d
x=−b3a
Vertex of a quadraticMinimum if a>0, maximum if a<0
x=−b2a,fext=c−b24a
Bound on a sinusoid
−a2+b2≤asin⁡x+bcos⁡x≤a2+b2
AM–GMFor x,y≥0; equality when x=y
x+y2≥xy

Common mistakes

  • Forgetting the endpoints when asked for the global maximum or minimum on a closed interval.
  • Calling every point with f'(x) = 0 an extremum; x^3 at 0 is the standard counter-example.
  • Stopping when f''(c) = 0 instead of using the first derivative test or the first non-zero higher derivative.
  • Missing critical points where f' does not exist, such as the corner of |x|.
  • Including critical points that lie outside the given interval.
  • Reporting the x-value when the question asks for the maximum value of f, or the reverse.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Local extrema of a cubic

numerical

Find the local maximum and minimum values of f(x)=x3−6x2+9x+1.

  1. Step 1: Find the critical points.

    Try it on paper first.

Example 2: Global extrema on a closed interval

numerical

Find the global maximum and minimum of f(x)=x3−3x on [0,2].

  1. Step 1: Find critical points inside the interval.

    Try it on paper first.

Example 3: An open box of largest volume

numerical

Equal squares of side x are cut from the corners of a 12×12 sheet and the sides folded up to make an open box. Find x for maximum volume and that volume.

  1. Step 1: Write the volume in one variable and note its range.

    Try it on paper first.

Example 4: When the second derivative test fails

conceptual

Classify the stationary point at x=0 for f(x)=x4 and for g(x)=x3.

  1. Step 1: Try the second derivative test.

    Try it on paper first.

Previous year questions

2 official GATE CSE questions on this topic, newest first.

Practise these 2 PYQs →

Topic test

10 questions: up to 2 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE CSE syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.