Relative Maxima And Minima Calculator

Relative Maxima And Minima Calculator









Cubic functions are the simplest functions that can have both a relative maximum and a relative minimum, which makes them the perfect laboratory for learning extrema analysis. Their S-shaped graphs rise, dip and rise again — or the reverse — and pinpointing those two turning points is a core calculus skill.

The Relative Maxima And Minima Calculator on this page analyzes any cubic f(x) = ax³ + bx² + cx + d. Enter the four coefficients and it solves the derivative equation, reports each critical point, classifies it with the second derivative test, and evaluates the function there. It even tells you when a cubic has no extrema at all.

Because cubics are the first functions with two turning points, they are also the first place where curve sketching becomes genuinely interesting. The techniques on this page — the discriminant, the critical points and the second derivative test — form the complete toolkit for drawing any cubic accurately.

Critical Points of a Cubic

A critical point is an x-value where the derivative is zero, marking a horizontal tangent and a candidate extremum. For the cubic f(x) = ax³ + bx² + cx + d, the derivative is the quadratic f'(x) = 3ax² + 2bx + c, so finding critical points means solving a quadratic equation.

The discriminant of that quadratic, D = 4b² − 12ac, predicts how many critical points exist. A positive discriminant gives two distinct critical points — the classic two-turning-point cubic. A zero discriminant gives one repeated critical point, and a negative discriminant means no real critical points and therefore no relative extrema.

This is why the calculator shows the discriminant first: it is the quickest possible preview of the function's shape before any further arithmetic.

The Second Derivative Test

Once the critical points are known, the second derivative test classifies each one. For a cubic the second derivative is the line f''(x) = 6ax + 2b. Evaluate it at a critical point: a positive value means the graph is concave up there, so the point is a relative minimum; a negative value means concave down, so it is a relative maximum.

If the second derivative equals zero at a critical point, the test is inconclusive — the point may be a flat inflection point rather than an extremum. The calculator labels this case honestly instead of guessing.

For cubics with a positive leading coefficient, the smaller critical point is always the maximum and the larger one the minimum; with a negative leading coefficient the order reverses. The calculator verifies this pattern numerically for your specific coefficients.

End Behavior of Cubic Graphs

Far to the left and right, the ax³ term dwarfs everything else, so the end behavior of a cubic depends only on the sign of a. When a > 0 the graph falls toward negative infinity on the left and rises toward positive infinity on the right; when a < 0 the reverse holds.

This is why every cubic crosses the x-axis at least once: a continuous curve traveling from −∞ to +∞ must cross zero somewhere along the way. Cubics always have at least one real root, unlike quadratics which may have none.

Combine end behavior with the extrema to count roots without solving: for f(x) = x³ − 3x the maximum value 2 is positive and the minimum −2 is negative, so the graph crosses the axis three times — three distinct real roots.

If instead the maximum were negative (or the minimum positive), both turning points would sit on one side of the axis and the cubic would cross only once. The extreme values alone determine the root count.

How to Use the Relative Maxima And Minima Calculator

Type the four coefficients of your cubic in standard form and the calculator handles the quadratic formula and both derivative tests.

Step 1: Write your function as f(x) = ax³ + bx² + cx + d and read off a, b, c and d.

Step 2: Enter the four coefficients into the matching boxes.

Step 3: Click Calculate. The discriminant of f'(x) is computed and displayed first.

Step 4: Read the two critical points, each obtained from the quadratic formula applied to f'(x) = 0.

Step 5: Read each classification — relative maximum, relative minimum, or inflection point — with its function value.

Step 6: If the discriminant is negative, the calculator explains that the cubic is strictly monotonic with no extrema.

Worked Example 1: f(x) = x³ − 3x

Take the classic cubic f(x) = x³ − 3x. Enter a = 1, b = 0, c = −3 and d = 0.

Step 1: Differentiate: f'(x) = 3x² − 3. The discriminant is D = 4(0)² − 12(1)(−3) = 36, positive, so two critical points exist.

Step 2: Solve 3x² − 3 = 0 to get x = 1 and x = −1.

Step 3: The second derivative is f''(x) = 6x. At x = 1, f''(1) = 6 > 0, so this is a relative minimum.

Step 4: Evaluate: f(1) = 1 − 3 = −2. The relative minimum is the point (1, −2).

Step 5: At x = −1, f''(−1) = −6 < 0, so this is a relative maximum, with f(−1) = −1 + 3 = 2.

The calculator reports both points: a relative maximum at (−1, 2) and a relative minimum at (1, −2).

Worked Example 2: f(x) = 2x³ − 3x² − 12x + 5

Try a messier cubic: f(x) = 2x³ − 3x² − 12x + 5. Enter a = 2, b = −3, c = −12, d = 5.

Step 1: f'(x) = 6x² − 6x − 12 = 6(x² − x − 2) = 6(x − 2)(x + 1), so the critical points are x = 2 and x = −1.

Step 2: The second derivative is f''(x) = 12x − 6. At x = 2, f''(2) = 18 > 0: relative minimum.

Step 3: f(2) = 2(8) − 3(4) − 12(2) + 5 = 16 − 12 − 24 + 5 = −15.

Step 4: At x = −1, f''(−1) = −18 < 0: relative maximum.

Step 5: f(−1) = 2(−1) − 3(1) − 12(−1) + 5 = −2 − 3 + 12 + 5 = 12.

The calculator confirms: relative maximum at (−1, 12) and relative minimum at (2, −15).

When a Cubic Has No Extrema

Not every cubic wiggles. The function f(x) = x³ + x has derivative f'(x) = 3x² + 1, which is always positive — the discriminant is negative and there are no critical points at all. Such a cubic climbs steadily from negative to positive infinity.

Geometrically, a cubic with no extrema is strictly monotonic: it never turns around. Its graph still has an inflection point where the concavity changes, but no max or min. The calculator detects the negative discriminant and reports this case explicitly.

This distinction matters in optimization: if your model is a monotonic cubic, the optimum over a closed interval must occur at an endpoint, not at an interior critical point.

Inflection Points vs Extrema

An inflection point is where the concavity changes sign — the graph switches from cup-up to cup-down. For a cubic there is exactly one, at x = −b/(3a), and the function passes straight through it without turning.

Students often confuse inflection points with extrema because both can have horizontal tangents. The difference: at an extremum the function reverses direction, while at an inflection point it keeps going the same way. The second derivative test separates them — zero second derivative with no sign change means inflection, not extremum.

When the discriminant is zero, the single critical point of a cubic is exactly such a flat inflection point. The calculator labels it as neither a maximum nor a minimum.

Sketching a Cubic From Its Extrema

A reliable cubic sketch needs five landmarks: the end-behavior arrows, the two extrema, and the y-intercept (0, d). Plot them, then connect everything with a smooth S-curve that respects the monotonicity between the turning points.

For f(x) = 2x³ − 3x² − 12x + 5: maximum at (−1, 12), minimum at (2, −15), y-intercept at (0, 5), rising to the right. The S-shape through these points is essentially forced — there is only one smooth way to join them.

Verify the sketch with a few extra evaluations, especially between the extrema where the curve is steepest. Any computed point that falls far off your curve signals an arithmetic error worth tracking down.

A sketch reveals shape, not precision: it will not give exact root locations or exact inflection coordinates. Use it to guide and check your algebra, not to replace it.

Choosing the Right Derivative Test

Keep a simple decision tree: if the second derivative at a critical point is nonzero, the second derivative test classifies it instantly — positive means minimum, negative means maximum.

If the second derivative equals zero, switch to the first derivative test and watch the sign change around the point. It requires more arithmetic but it never returns an inconclusive answer.

For cubics specifically, the discriminant has already told you how many critical points exist; the derivative tests only assign the max and min labels. Let each tool do the job it is best at.

In exams, always show which test you used: a bare “maximum” with no justification earns partial credit at best, while a one-line second-derivative check earns full marks.

Tips

  1. Always write the cubic in standard form ax³ + bx² + cx + d before reading off coefficients.
  2. Check the discriminant first: negative means no extrema, so do not hunt for turning points that are not there.
  3. Verify each critical point by plugging it back into f'(x) — the result should be zero.
  4. Use the second derivative value, not just its sign, as documented evidence for each classification.
  5. Remember the ordering rule: for a > 0 the left critical point is the maximum and the right one the minimum.
  6. Evaluate f at each critical point carefully; sign slips in the arithmetic are the most common error.
  7. Sketch the graph using the extrema and the y-intercept (0, d) to confirm the overall S-shape.
  8. For applied maxima/minima, confirm the critical point lies inside the feasible interval before reporting it.

1. How do you find relative maxima and minima of a cubic?

Differentiate to get the quadratic f'(x) = 3ax² + 2bx + c, solve f'(x) = 0 with the quadratic formula, then classify each critical point with the second derivative test: f'' > 0 means minimum, f'' < 0 means maximum.

2. What is the discriminant test for cubic extrema?

Compute D = 4b² − 12ac from the coefficients of f'(x). If D > 0 there are two extrema, if D = 0 there is one flat inflection point, and if D < 0 there are no extrema at all.

3. Can a cubic have two relative maxima?

No. A cubic has at most two turning points, and they must alternate: one maximum and one minimum. Two maxima in a row would require an extra turning point between them.

4. What is a critical point?

An x-value where the derivative equals zero (or is undefined). For cubics these are the solutions of f'(x) = 0 — the only places where relative extrema can occur.

5. Why does the second derivative test work?

The second derivative measures concavity. Positive concavity (cup opening upward) at a flat point forces the point to be a local bottom, i.e. a minimum; negative concavity forces a local top, i.e. a maximum.

6. What if the second derivative is zero at a critical point?

The test is inconclusive. For a cubic this happens when the discriminant is zero, and the point is a horizontal inflection point — the graph flattens momentarily but continues in the same direction.

7. How many turning points can a cubic have?

At most two. In general a degree-n polynomial has at most n − 1 turning points, so cubics max out at two, quadratics at one, and quartics at three.

8. Do relative extrema have to alternate between max and min?

Yes for smooth functions. Between any two relative maxima there must be a relative minimum, because the function has to dip down and come back up. This alternation is a useful error check.

9. What is the difference between stationary and critical points?

For polynomials the terms coincide: both mean f'(x) = 0. In general, critical points also include places where the derivative is undefined, such as cusps or corners.

10. Can the calculator handle a = 0?

No — with a = 0 the function is quadratic, not cubic, and needs the quadratic extrema calculator instead. The tool rejects a = 0 with an explanatory message.

11. How do I verify a relative maximum by hand?

Pick test points slightly left and right of the critical point and evaluate f there. For a genuine maximum, both neighboring values must be smaller than the value at the critical point.

12. What are extrema used for in real life?

They locate optimal values: maximum profit, minimum material cost, peak efficiency, or the highest point of a trajectory. Any smooth model of a quantity yields its optima at critical points.

13. Does every cubic have an inflection point?

Yes. Every cubic has exactly one inflection point at x = −b/(3a), where the concavity changes. It exists whether or not the cubic has any extrema.

14. Why do we evaluate f at the critical points?

The critical x-values alone only say where the extrema occur. The function values give the actual maximum and minimum heights, which is usually the number an application asks for.

15. Can a relative maximum be lower than a relative minimum elsewhere?

Yes. Relative means local: a relative maximum only beats nearby points. On a cubic with a > 0, the relative maximum (left point) is always higher than the relative minimum (right point), but for other functions the ordering can surprise you.

CONCLUSION

The Relative Maxima And Minima Calculator carries out the full cubic analysis in one pass: the discriminant preview, both critical points from the quadratic formula, second-derivative classifications, and the extreme values. It is the fastest way to check a complete extrema problem.

Keep the discriminant test in your mental toolkit — knowing before you compute whether extrema even exist saves the most common wasted effort in these problems. From here, the same critical-point strategy extends to quartics and beyond, with only the algebra getting heavier.

Make the discriminant your first glance and the sketch your last check: the first tells you whether turning points exist before you compute, and the second confirms that the numbers tell a coherent geometric story. With those two habits, cubic extrema problems become routine.