On this page
A cubic function can either turn twice (forming a peak and a valley) or not turn at all. To find out which shape you are dealing with, you look at its slope.
What is the condition for a cubic to have local maximum and minimum?
A cubic function f(x) = ax³ + bx² + cx + d has a local maximum and a local minimum if the discriminant of its derivative is strictly positive. Wikipedia
To see why, find the first derivative of the cubic function. Because the original function has a highest power of three, its derivative is a quadratic: f'(x) = 3ax² + 2bx + c
Local extrema occur where the tangent to the curve is horizontal, meaning the derivative f'(x) equals zero. For the cubic to have both a local maximum and a local minimum, the quadratic equation 3ax² + 2bx + c = 0 must have two distinct real roots.
The number of roots of a quadratic depends on its discriminant (Δ = B² − 4AC). For our derivative, the coefficients are A = 3a, B = 2b, and C = c. Δ = (2b)² − 4(3a)(c) Δ = 4b² − 12ac
For two distinct real roots, this discriminant must be strictly greater than zero. Dividing by 4 gives the simplified condition: b² − 3ac > 0
Why does the derivative need two real roots?
When the derivative crosses the x-axis twice, its sign changes from positive to negative, and then back again.
Where f'(x) goes from positive (increasing) to negative (decreasing), the graph forms a peak (a local maximum).
Where f'(x) goes from negative to positive, the graph forms a valley (a local minimum).
If you are unsure why setting the derivative to zero finds these points, the Fermi Concept Library has a lesson for every concept in mathematics, each with its place in the map.
If the derivative has no real roots, it never touches the x-axis, meaning the slope never reaches zero. The function just keeps increasing (or decreasing) without turning. If the derivative has exactly one real root (a double root when b² − 3ac = 0), the slope reaches zero for a brief instant but does not change sign. This creates a horizontal point of inflection—a flat terrace on the graph—rather than a peak or a valley.
For a deeper look at where curves meet the axis, you might find our guide on How many roots? Counting intersections of two sketched curves helpful.
How do you apply this condition to a worked example?
Exam questions often ask you to find a missing parameter by using this condition.
Question: Find the range of values for k such that the function f(x) = x³ + kx² + 3x + 5 has a local maximum and a local minimum.
Step 1: Find the derivative. f'(x) = 3x² + 2kx + 3
Step 2: Set the condition for two distinct real roots. For the cubic to have turning points, the discriminant of f'(x) must be greater than zero. Here, a = 1, b = k, and c = 3. Using the b² − 3ac > 0 condition: k² − 3(1)(3) > 0 k² − 9 > 0
Step 3: Solve the inequality. k² > 9
This means k must be strictly greater than 3, or less than −3. So, the function has local extrema when k > 3 or k < −3. Notice that if k = 3 or k = −3, the condition becomes exactly zero, meaning the function would only have a horizontal point of inflection and no local extrema. If k were between −3 and 3, the discriminant would be negative, and the function would be strictly increasing everywhere.
If a question asks you to check if a function has extrema on a restricted domain instead of everywhere, our post on Absolute maximum and minimum on a closed interval: endpoint check shows how the endpoints change the result.



