Skip to content
GATEiit

GATE DA · Calculus and Optimization

Maxima and minima

Local and global maxima and minima of a function of one variable: critical points, the first, second and higher derivative tests, the closed interval method, concavity and points of inflection.

Before you start

  • Continuity and differentiability →

    Critical points include points where f′ does not exist, and a continuous function on a closed interval is guaranteed a maximum and a minimum.

  • Taylor series →

    The second derivative test comes from the quadratic term of the Taylor expansion at a critical point.

  • Factorising polynomials

    Solving f′(x)=0 for a cubic or quartic is most of the work in a GATE question.

This topic comes before: Optimization involving a single variable, Simple linear regression, multiple linear regression and ridge regression, Support vector machine

Concept notes

1. Local and global extrema, critical points

  • f has a local (relative) maximum at c if f(c)≥f(x) for all x near c; a local minimum if f(c)≤f(x) near c.
  • A global (absolute) maximum on a set D is a point where f(c)≥f(x) for every x∈D; similarly for a global minimum. A global extremum at an interior point is also local; one at an endpoint need not be.

Fermat's theorem: if f has a local extremum at an interior point c and f′(c) exists, then f′(c)=0.

So local extrema can occur only at critical points: interior points where f′(c)=0 (stationary points) or where f′(c) does not exist (e.g. ∣x∣ has a minimum at 0 with no derivative there).

The converse fails: f′(c)=0 does not guarantee an extremum. f(x)=x3 has f′(0)=0 but is increasing through 0, so 0 is a point of inflection, not an extremum. Every critical point must therefore be tested.

2. Tests for a local maximum or minimum

First derivative test (works even when f′′ is messy or f′ fails to exist at c): look at the sign of f′ just left and right of c.

Sign of f′: left → right Conclusion
+ → − local maximum
− → + local minimum
no change no extremum

A root of f′ of even multiplicity does not change the sign, so it is not an 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-order test.

Higher-order test: if f′(c)=f′′(c)=⋯=f(n−1)(c)=0 and f(n)(c)≠0, then for even n there is an extremum (maximum if f(n)(c)<0, minimum if >0); for odd n there is no extremum, it is a point of inflection. Example: x4 at 0 has f(4)(0)=24>0, a minimum; x3 at 0 has f′′′(0)=6 with n=3 odd, no extremum.

xylocal max (1, 5)local min (3, 1)inflection (2, 3)123f′ > 0f′ < 0f′ > 0
f(x) = x³ − 6x² + 9x + 1: f′ = 3(x − 1)(x − 3). Local maximum at x = 1 (f″ < 0), local minimum at x = 3 (f″ > 0), inflection at x = 2 where f″ changes sign

3. Global extrema: the closed interval method

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

Closed interval method:

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

No derivative test is needed: just compare values. Endpoints are often where the answer lies.

Open or unbounded domains: a global extremum may not exist. Check the limits at the ends. For example, ex on R has no maximum or minimum; 1x on (0,1) has neither. If a continuous f on an interval has exactly one critical point and it is a local minimum, it is the global minimum on that interval (same for maximum).

Useful inequality: for x>0, x+kx≥2k, with equality at x=k (AM–GM).

4. Concavity, inflection points and convexity

  • f is convex (concave up) on an interval if f′′≥0 there: the graph lies above its tangents and below its chords.
  • f is concave (concave down) if f′′≤0.
  • A point of inflection is where the concavity changes, i.e. f′′ changes sign. f′′(c)=0 is necessary (when f′′ exists) but not sufficient: x4 has f′′(0)=0 but is convex everywhere, so 0 is not an inflection point.
At a stationary point Shape nearby Result
f′′>0 cup local minimum
f′′<0 cap local maximum
f′′ changes sign S-bend inflection, no extremum

Why convexity matters in optimisation: for a convex function, every local minimum is a global minimum, and any stationary point is a global minimum. This is why loss functions such as squared error are easy to minimise. For a strictly convex function the global minimiser, if it exists, is unique.

For a cubic ax3+bx2+cx+d (a≠0): it has exactly one inflection point, at x=−b3a, and either two local extrema (if f′ has two distinct real roots) or none.

Formulas to remember

Stationary point
f′(c)=0
Second derivative test
f′(c)=0:f′′(c)<0⇒max,f′′(c)>0⇒min
Higher-order testn even: extremum (min if f(n)(c)>0); n odd: inflection, no extremum
f′(c)=⋯=f(n−1)(c)=0, f(n)(c)≠0
Global extrema on [a, b]ci are the critical points inside (a,b)
max⁡[a,b]f=max⁡{f(a), f(b), f(c1),…,f(ck)}
Inflection point of a cubicFor ax3+bx2+cx+d
x=−b3a
AM–GM minimum
x+kx≥2k,x>0, k>0

Common mistakes

  • Forgetting the endpoints when finding a global maximum or minimum on a closed interval.
  • Treating every point with f′(c)=0 as an extremum; x3 at 0 is not one.
  • Concluding "no extremum" when f′′(c)=0; the test only fails, so use the first derivative or higher-order test.
  • Missing critical points where f′ does not exist, such as the corner of ∣x∣.
  • Calling a point an inflection just because f′′(c)=0 without checking that f′′ changes sign (x4 at 0).
  • Answering with the location x when the question asks for the maximum or minimum value f(x), or the other way round.

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−6x2+9x+1 on [−1,4].

  1. Step 1: List the candidates.

    Try it on paper first.

Example 3: Maximum of x e^(−x)

numerical

Find the maximum value of f(x)=xe−x for x≥0.

  1. Step 1: Differentiate and solve f′(x) = 0.

    Try it on paper first.

Example 4: When the second derivative test fails

conceptual

At x=0, classify the stationary point of f(x)=x4, g(x)=x3 and h(x)=−x6.

  1. Step 1: Try the second derivative test first.

    Try it on paper first.

Previous year questions

5 official GATE DA questions on this topic, newest first.

Practise these 5 PYQs →

Topic test

10 questions: up to 4 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 DA syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.