Finding the maximum or minimum of a function of one variable: critical points, first and second derivative tests, closed-interval method, convexity, word problems and one-variable gradient descent.
The second derivative test and Newton's method both come from the second-order Taylor expansion.
Concept notes
1. The optimisation problem and critical points
We want to minimise (or maximise) a function over a set of allowed values, usually all of , an open interval, or a closed interval . Maximising is the same as minimising .
A point is a critical point of if or does not exist. Fermat's theorem: if has a local extremum at an interior point and is differentiable there, then .
The converse is false. has but no extremum at . Critical points are only candidates.
Points where does not exist also count. has its minimum at , where there is no derivative.
Global vs local: a local minimum is the lowest value in some neighbourhood; a global minimum is the lowest value over the whole allowed set. A function on an open interval or on may have no global extremum at all (for example on ).
f(x) = x³ − 6x² + 9x + 1 on [0, 5]: the local maximum at x = 1 is not the global maximum; the endpoint x = 5 is.
2. First and second derivative tests
At a critical point :
First derivative test (works even when is messy):
changes from to at : local maximum.
changes from to at : local minimum.
No sign change: neither (a stationary point of inflection if ).
Second derivative test (when ):
: local minimum.
: local maximum.
: test fails; use the first derivative test or the higher-order test.
Higher-order test: let be the first non-zero derivative at . If is even, is a local minimum when and a local maximum when . If is odd, is not an extremum.
Example: at : first non-zero derivative is the 4th (), so a minimum. at : 5th derivative, odd, so neither.
The tests come from Taylor's theorem: near , , and keeps one sign only when is even.
3. Global extrema on a closed interval
Extreme value theorem: a function that is continuous on a closed, bounded interval attains both a global maximum and a global minimum there.
Closed-interval method:
Find all critical points of inside .
Evaluate at these critical points and at both endpoints and .
The largest value is the global maximum; the smallest is the global minimum.
No derivative test is needed: just compare values. Forgetting the endpoints is the most common mistake; in the figure the global maximum sits at the endpoint , not at the local maximum.
On an open interval or on : check the critical points and the behaviour at the ends (limits as or towards the open endpoints). If there is only one critical point and it is a local minimum, it is the global minimum for a continuous function on an interval.
Domain
Global extremum guaranteed?
What to check
, continuous
Yes, both
critical points + endpoints
or
Not always
critical points + limits at the ends
4. Convexity and concavity
A twice-differentiable is convex on an interval if there, and concave if . Equivalently, is convex if the chord between any two points lies on or above the graph:
Why it matters for optimisation:
For a convex function, every local minimum is a global minimum, and if then is a global minimiser.
If everywhere (strictly convex), the minimiser, if it exists, is unique.
For a concave function the same holds for maxima.
An inflection point is where concavity changes, i.e. changes sign. alone is not enough: has but is convex on both sides.
Useful facts: , , and (for ) are convex; a sum of convex functions is convex; a positive multiple of a convex function is convex. Squared-error loss in one parameter, , is a convex quadratic in , which is why its stationary point is the global minimum.
5. Word problems and one-variable gradient descent
Word problems. (1) Name the variable and its allowed range. (2) Write the objective as a function of that one variable, using the constraint to eliminate others. (3) Use the closed-interval method or a derivative test. (4) Answer exactly what is asked (the value of , or the optimum value of ).
Example: with a fixed perimeter, a rectangle of maximum area is a square; with a fence on three sides against a wall, the side parallel to the wall is twice each other side.
Gradient descent minimises numerically by stepping against the slope:
where is the learning rate (step size). At a minimiser , so the iterate stops moving.
For with , the update is . It converges to exactly when , i.e. ; at it lands on the minimum in one step; for it diverges with alternating sign.
Newton's method for optimisation uses curvature: . On a quadratic it reaches the minimiser in a single step.
Formulas to remember
Critical point
Second derivative test
Higher-order test
ConvexityThen any stationary point is a global minimum.
Gradient descent step
Newton step for optimisation
Gradient descent on a quadraticConverges iff .
AM–GM boundEquality at .
Common mistakes
Forgetting to evaluate the endpoints in the closed-interval method; the global extremum is often at an endpoint.
Treating every point with f'(c) = 0 as an extremum; x³ at 0 is the standard counter-example.
Concluding 'neither' when f''(c) = 0; the second derivative test is simply inconclusive there (x⁴ has a minimum at 0).
Ignoring points where the derivative does not exist, such as the corner of |x|.
Reporting the location x when the question asks for the optimum value f(x), or the other way round.
Assuming a larger learning rate always converges faster; beyond 2/a on a quadratic, gradient descent diverges.
Worked examples
Try each step yourself, then reveal the working.
Example 1: Closed-interval method on a cubic
numerical
Find the global maximum and global minimum of on .
Step 1: Find the critical points inside the interval.
Try it on paper first.
Example 2: Open-top box from a square sheet
numerical
Equal squares of side cm are cut from the corners of a cm sheet and the sides folded up to make an open box. Find the maximum volume.
Step 1: Write the volume as a function of x and give its range.
Try it on paper first.
Example 3: When the second derivative test fails
conceptual
Classify the critical points of .
Step 1: Find the critical points.
Try it on paper first.
Example 4: Three steps of gradient descent
numerical
Minimise by gradient descent from with learning rate . Find .
Step 1: Write the update rule for this f.
Try it on paper first.
Previous year questions
No official GATE DA question is tagged with this topic yet. The topic test below uses practice questions.
Topic test
8 questions: 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.