Maxima and Minima: First vs Second Derivative Test
Choose the right derivative test for maxima and minima, handle zero second derivatives, and solve endpoint and profit problems with worked examples.
- 12th
- Study Advice
You differentiate a function, put the derivative equal to zero, and get x = 2. The calculation looks finished. But have you found a maximum, a minimum, or simply a place where the graph pauses before continuing in the same direction?
That is the question derivative tests answer.
The first derivative test checks whether the function changes from increasing to decreasing, or the other way round. The second derivative test classifies a stationary point using the sign of the second derivative. If that second derivative is zero, you need another argument.
Think of a ribbon shaped into a hill and a bowl. Walking along the ribbon tells you whether you climb and then descend. Looking at its bend near a level point gives you another clue. Both observations can identify a turning point, but they do not work under exactly the same conditions.
Let’s turn that picture into a method you can actually use in a written answer.
First decide what the question wants
A local maximum is a value at least as large as nearby function values. A local minimum is at least as small as nearby values. An absolute maximum or minimum is the greatest or least value over the entire specified domain.
A local hill need not be the highest hill on the whole route. Likewise, a local minimum can have a positive value, and a local maximum can have a negative value. The labels describe comparisons, not whether the answer is above or below zero.
OpenStax’s discussion of maxima and minima distinguishes these concepts and explains why a continuous function on a closed, bounded interval attains both absolute extremes. For such an interval, compare the function values at interior critical numbers and both endpoints.
Also separate three things in your final answer:
- Location: x = c.
- Extreme value: f(c).
- Point on the graph: (c, f(c)).
For example, if a minimum occurs at x = 4 and f(4) = 9, the minimum value is 9, not 4.
What does setting f’(x) = 0 really give you?
A stationary point has a zero first derivative. It is a candidate for a local extremum, not a guaranteed turning point.
More broadly, an interior critical number is a number in the domain where the derivative is zero or does not exist. That last part matters for corners such as a modulus graph. A number outside the domain cannot become a critical number just because a denominator vanishes there.
Use this opening routine:
- Write down the domain or permitted interval.
- Find f’(x).
- Solve f’(x) = 0 without cancelling factors that could be zero.
- Check for in-domain points where f’ does not exist.
- Classify the candidates using an appropriate test.
The first derivative test: read the signs from left to right
Suppose f is continuous at an interior point c and differentiable just to either side. Check the sign of f’ throughout small intervals on the left and right of c.
| Sign of f’ on the left | Sign of f’ on the right | What f does | Conclusion at c |
|---|---|---|---|
| Positive | Negative | Increases, then decreases | Local maximum |
| Negative | Positive | Decreases, then increases | Local minimum |
| Positive | Positive | Increases on both sides | Neither |
| Negative | Negative | Decreases on both sides | Neither |
These are the standard sign-change rules in NCERT’s Applications of Derivatives chapter, Section 6.5. The same chapter states the second derivative test: at a stationary point, a negative second derivative gives a local maximum, a positive one gives a local minimum, and zero leaves the test inconclusive.
You are testing f’, not f. A negative function value does not mean that a function is decreasing.
If sign charts feel unfamiliar, revisit increasing and strictly increasing functions before working through the examples.
Example 1: two stationary points, one complete sign chart
Find the local extremes of:
f(x) = x³ - 6x² + 9x + 2.
Differentiate and factorise:
f’(x) = 3x² - 12x + 9 = 3(x - 1)(x - 3).
The candidates are x = 1 and x = 3. They split the real line into three intervals.
| Interval | Sign of x - 1 | Sign of x - 3 | Sign of f’ | Behaviour |
|---|---|---|---|---|
| x < 1 | Negative | Negative | Positive | Increasing |
| 1 < x < 3 | Positive | Negative | Negative | Decreasing |
| x > 3 | Positive | Positive | Positive | Increasing |
At x = 1, the derivative changes from positive to negative. Therefore, f has a local maximum there.
At x = 3, it changes from negative to positive. Therefore, f has a local minimum there.
Now return to the original function:
f(1) = 1 - 6 + 9 + 2 = 6.
f(3) = 27 - 54 + 27 + 2 = 2.
The local maximum point is (1, 6) and the local minimum point is (3, 2). Neither is an absolute extreme over all real numbers: this cubic grows without bound in one direction and falls without bound in the other.
How close should your test values be?
For this polynomial, 0, 2 and 4 are convenient test values. Each lies in one of the intervals separated by all the derivative’s zeros. The factor signs establish that the derivative keeps its sign throughout each interval.
Do not choose two arbitrary distant values and assume they describe the immediate behaviour around a candidate. You might cross another zero or a break in the domain. Split the domain first, then test each resulting interval.
The second derivative test: a quick check at a stationary point
For the usual smooth functions in these exercises, begin with f’(c) = 0, then calculate f”(c).
| Result at the stationary point | Conclusion |
|---|---|
| f”(c) < 0 | Local maximum |
| f”(c) > 0 | Local minimum |
| f”(c) = 0 | Inconclusive: use another method |
| f”(c) does not exist | This test cannot be applied there |
The negative sign goes with a maximum because a cap-shaped curve bends downward. A bowl bends upward and has positive second derivative near its bottom.
Crucially, f”(c) > 0 by itself is not enough. For instance, g(x) = x² + 5x has g”(0) = 2, but g’(0) = 5. The graph is not stationary at zero, and zero is not a minimum point.
Example 2: solve the same cubic more quickly
For f(x) = x³ - 6x² + 9x + 2, we already found stationary points at 1 and 3.
f”(x) = 6x - 12.
At x = 1, f”(1) = -6 < 0, so the local maximum value is f(1) = 6.
At x = 3, f”(3) = 6 > 0, so the local minimum value is f(3) = 2.
The classification takes only two substitutions. If the question asks only for local extrema and allows either method, this is a neat solution. If it also asks for increasing and decreasing intervals, the first derivative sign chart gives you those answers together.
What if the second derivative is zero?
This is where a good answer often separates itself from a rushed one. Zero does not mean “no maximum or minimum”. It means this test has not decided.
OpenStax’s derivative-test explanation explicitly treats a zero second derivative as inconclusive and returns to first-derivative signs. Its stated version assumes a continuous second derivative near the stationary point, which holds for the polynomial examples here.
Example 3: three different outcomes with the same zero result
Consider these three functions at x = 2:
| Function | First derivative | Second derivative at 2 | Actual outcome at 2 |
|---|---|---|---|
| A(x) = (x - 2)⁴ + 5 | 4(x - 2)³ | 0 | Minimum value 5 |
| B(x) = 5 - (x - 2)⁴ | -4(x - 2)³ | 0 | Maximum value 5 |
| C(x) = (x - 2)³ + 5 | 3(x - 2)² | 0 | Neither |
For A, the first derivative is negative when x < 2 and positive when x > 2. The curve falls into a minimum and then rises. You can also see directly that (x - 2)⁴ is nonnegative, so A(x) is always at least 5.
For B, the derivative signs reverse: positive to negative. Also, subtracting a nonnegative fourth power means B(x) is always at most 5.
For C, the derivative is positive on both sides of 2. For any small positive h:
C(2 - h) = 5 - h³, while C(2 + h) = 5 + h³.
There are nearby values below and above 5. It is neither a maximum nor a minimum. It is a stationary point of inflection: its concavity changes at 2, as C”(x) = 6(x - 2) changes sign.
All three functions have both first and second derivatives equal to zero at the candidate. Their behaviour is different. That is why guessing from f”(c) = 0 cannot work.
A corner can be a minimum too
Example 4: a modulus function
Find the minimum of f(x) = |x - 4| + 3.
For x < 4, f(x) = 7 - x, so f’(x) = -1.
For x > 4, f(x) = x - 1, so f’(x) = 1.
The function is continuous at 4, but its derivative does not exist there. Nevertheless, its slope changes from negative to positive across the corner. Therefore, it has a local minimum at x = 4, with value 3.
It is also an absolute minimum because |x - 4| cannot be negative.
If you searched only for solutions of f’(x) = 0, you would miss this answer entirely. There are none.
Now compare g(x) = 1/(x - 4). Here x = 4 is outside the domain, so it cannot be a maximum or minimum point. “Derivative undefined” means different things depending on whether the original function exists there.
Absolute extremes: endpoints can beat turning points
Example 5: the interval changes the answer
Find the greatest and least values of:
f(x) = x³ - 6x² + 9x + 2 on [0, 5].
The function is continuous on the whole closed interval. Its interior critical numbers are 1 and 3. Evaluate those and the endpoints:
| Candidate | Why included | Function value |
|---|---|---|
| 0 | Left endpoint | 2 |
| 1 | Interior stationary point | 6 |
| 3 | Interior stationary point | 2 |
| 5 | Right endpoint | 22 |
The absolute maximum is 22 at x = 5. The absolute minimum is 2 at both x = 0 and x = 3.
Notice what happened: x = 1 remains a local maximum, but its value 6 is nowhere near the largest value on the stated interval. Also, the same minimum value can occur at more than one location.
You do not need to classify every candidate as a local maximum or minimum before comparing this finite list. Once you have all the candidates, comparing their original function values answers the absolute-extreme question directly.
What changes on an open interval?
Take h(x) = x on (0, 5). Its values get arbitrarily close to 5, but never equal 5. There is no greatest value. Similarly, there is no least value because zero is excluded.
On [0, 5), the least value is zero, attained at the included endpoint. There is still no greatest value.
An approaching value is not automatically an attained maximum or minimum. Always read the brackets before calculating.
A commerce application: proving maximum profit
Example 6: a production decision with a capacity limit
Suppose a simplified firm’s revenue and cost functions are:
R(q) = 100q - q² and C(q) = 20q + 300, in rupees.
Treat output q as continuous, with 0 ≤ q ≤ 50. Profit is revenue minus cost:
P(q) = R(q) - C(q) = 80q - q² - 300.
P’(q) = 80 - 2q.
Setting P’(q) = 0 gives q = 40. Since P”(q) = -2 < 0, this is a local maximum.
For the greatest feasible profit, compare the stationary output and both capacity endpoints:
- P(0) = -300.
- P(40) = 3,200 - 1,600 - 300 = 1,300.
- P(50) = 4,000 - 2,500 - 300 = 1,200.
The greatest profit is Rs 1,300 at 40 units.
There is also a useful algebra check:
P(q) = 1,300 - (q - 40)².
No allowed output can produce more than 1,300 because the square being subtracted is nonnegative.
In this model, marginal revenue is 100 - 2q and marginal cost is 20. Their equality gives q = 40, but the maximum-profit conclusion also needs the curvature or sign-change check and the feasible-domain check.
Suppose capacity falls to 30 units
The stationary answer 40 is now infeasible. For every q between 0 and 30, P’(q) = 80 - 2q is positive. Profit keeps increasing across the permitted interval, so its maximum is at q = 30:
P(30) = 2,400 - 900 - 300 = Rs 1,200.
This is a boundary optimum, where P’(30) is not zero. If output must be a whole number and your continuous solution is fractional, compare the feasible neighbouring integers as well as relevant boundaries.
Which test should you choose?
Use the first derivative test when f’ factorises neatly, the question asks for monotonic intervals, or the candidate is a corner. It also gives a clear fallback when the second derivative is zero.
Use the second derivative test when f” is easy to calculate and nonzero at the stationary points. There is usually no need to repeat a complete first derivative chart after a decisive second derivative test, unless the question requests it.
For absolute extrema on a closed interval, make a candidate-value table. Local classification alone does not settle the question.
A reliable answer has four parts: candidate, evidence, value, conclusion. For instance:
“f’(x) = 0 gives x = 3. Since f”(3) = 6 > 0, f has a local minimum at x = 3. Its local minimum value is f(3) = 2.”
That wording tells the reader exactly what you proved.
Common mistakes and their repairs
Solving f”(x) = 0 to find maxima and minima. Start with f’(x) = 0 and any in-domain nondifferentiable points. Zeros of f” are candidates for changes in concavity, not automatically extrema.
Using the sign of f(c) to classify c. Use derivative signs. The height of the point can be positive, negative or zero under either classification.
Cancelling a factor of f’ before solving. From (x - 2)²(x + 1) = 0, both 2 and -1 are candidates. Dividing by (x - 2)² loses one.
Calling every zero second derivative an inflection point. The fourth-power examples above disprove this. An inflection point requires a change of concavity.
Ignoring the domain. A corner belongs on your candidate list if the function exists there; a vertical asymptote does not.
Stopping at the x-coordinate. Substitute into f to find the value requested. Do not substitute into f’ and report zero as the extreme value.
Try these before reading the answers
- Find and classify the stationary point of f(x) = x² - 10x + 7.
- Find the maximum value of g(x) = 18 - 2(x + 1)² over all real numbers.
- Classify x = 3 for h(x) = (x - 3)⁴ - 2. Explain why the second derivative test does not decide.
- Classify x = -1 for p(x) = (x + 1)³ - 4.
- Find the minimum of r(x) = |x + 2| + 6.
- Find the absolute extremes of s(x) = x² - 4x + 1 on [0, 5].
- A model has profit P(q) = 60q - q² - 200 for 0 ≤ q ≤ 20. Find the greatest feasible profit.
- Does f”(c) < 0, without any information about f’(c), prove a local maximum? Give a counterexample.
Answers with the deciding step
- f’(x) = 2x - 10 gives x = 5. Since f” = 2 > 0, it is a minimum, with value -18.
- g’(x) = -4(x + 1) gives x = -1, and g” = -4. The maximum value is 18. The nonnegative-square argument also proves it is absolute.
- h’(x) = 4(x - 3)³ changes from negative to positive at 3. The minimum value is -2. Here h”(3) = 0, so the second derivative test is inconclusive.
- p’(x) = 3(x + 1)² is positive on both sides of -1. It is neither a local maximum nor a local minimum.
- The minimum is 6 at x = -2. The function is continuous there and its side slopes are -1 and +1.
- The candidates 0, 2 and 5 give values 1, -3 and 6. The absolute minimum is -3 at 2; the absolute maximum is 6 at 5.
- P’(q) = 60 - 2q is positive throughout the permitted interval. The maximum is at q = 20, with profit Rs 600. The stationary output 30 is outside the domain.
- No. Take f(x) = -x² + 4x and c = 0. Although f”(0) = -2, f’(0) = 4, so zero is not a local maximum point.
Frequently asked questions
1. What is the main difference between the two derivative tests?
The first derivative test checks the sign of f’ on either side of a candidate. The second derivative test uses f” at a stationary point, provided the required derivatives exist. The first shows a change of direction; the second can classify the point with a shorter calculation.
2. Which test is easier in an exam?
For a simple polynomial with a nonzero second derivative at each stationary point, the second test is often quicker. If you already have a factorised first derivative or need increasing and decreasing intervals, use a sign chart. Follow a specified method when the question names one.
3. Does f’(c) = 0 guarantee a maximum or minimum?
No. For (x - 2)³ + 5, the derivative is zero at 2 but positive on both sides. The function keeps increasing through that stationary point.
4. What should I write when f”(c) = 0?
Write that the second derivative test is inconclusive. Then use first-derivative signs or a direct comparison of nearby function values. Do not conclude that an extremum is absent.
5. Can there be a minimum where the derivative does not exist?
Yes. The function |x - 4| + 3 has a corner and a minimum value of 3 at x = 4. Continuity there and a negative-to-positive change in its side slopes establish the result.
6. Can a local maximum be smaller than another value of the function?
Yes. Local means compared with nearby values. In our cubic example, the local maximum value is 6, while the value at x = 5 is 22. The highest value over a whole interval is an absolute maximum.
7. Why must endpoints be checked?
A greatest or least value can occur at an included boundary without a zero derivative. In a capacity-constrained profit problem, the best feasible output may be the capacity limit.
8. Do I need both tests for every stationary point?
Usually no. One applicable, decisive test is sufficient for local classification. Use another method if your first choice is inconclusive, and compare all candidates if the question asks for absolute extremes.
9. Is every point with f”(c) = 0 a point of inflection?
No. A point of inflection requires a change in concavity. A fourth-power curve can have zero second derivative at its minimum without changing concavity there.
10. What is the safest final-answer format?
State the location, the test result and the function value: “There is a local minimum at x = 3 because f”(3) > 0; the minimum value is f(3) = 2.” For an absolute-extreme question, also show the comparison with other candidates and endpoints.
Looking for commerce tuitions?
Prachi is a gold-medalist commerce teacher with experience at Deloitte and KPMG. She focuses on fundamentals to build a strong foundation.