Extrema Calculator - Absolute Maximum and Minimum

Find the highest and lowest values on [a, b]

Compare endpoints with interior critical points. Supports expanded polynomials through degree 6, transformed sine/cosine waves, and absolute-value functions on a closed interval.

Expanded terms, such as x^4 - 2x^2 + 1 or 1/3x^3 - x. No parentheses or functions in this field. Coefficient magnitudes: 10⁻¹² to 10⁶, or zero.

Both endpoints are included. Use a < b, between −1,000 and 1,000, with width at least 0.0000001. Trigonometric arguments use radians; up to 200 critical points.

Absolute minimum ≈

-1

at x ≈ -2, 1

Absolute maximum ≈

19

at x ≈ 3

Range on this interval
[-1, 19]

Maximum − minimum
20

Interior critical points
2

-119(-2, -1): Left endpoint(-1, 3): Local maximum(1, -1): Local minimum(3, 19): Right endpoint-23x
Purple: absolute maximum. Blue: absolute minimum. Open dots: other candidates. The table gives the numerical results; the curve is a sampled illustration.
Candidate comparison (approximate values)
xf(x)Candidate typeAbsolute result
-2-1Left endpointMinimum
-13Local maximum
1-1Local minimumMinimum
319Right endpointMaximum

Closed interval method: your solution

  1. The selected function is continuous throughout [-2, 3], so both absolute extrema exist.
  2. Differentiate: f′(x) = 3x^2 − 3.
  3. Find interior points where f′(x) = 0. There are 2 in this interval. Classify each using the derivative signs on either side.
  4. Evaluate f at these candidates and at both endpoints. The smallest value is approximately -1; the largest is approximately 19.

Local labels refer to interior points with a change in derivative sign. Endpoints are listed separately. Results use floating-point arithmetic and up to 8 significant digits; nearly coincident roots or nearly equal values may need an exact algebra check.

How to Use This Calculator

  1. Choose a Function type. Enter Polynomial f(x), or set A, B, h, and k for the selected family.
  2. Set Left endpoint a and Right endpoint b. Both endpoints belong to the interval.
  3. Read the absolute minimum and maximum together with their x locations; several locations can tie.
  4. Check the candidate table and derivative steps to distinguish local turns from endpoint extrema.
average • 0 ratings
Your rating
Tap a star to rate

Your rating helps improve Extrema Calculator - Absolute Maximum and Minimum. We store only an anonymized vote (no personal data).

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

A Peak Isn't Always the Winner: Extrema Calculator Guide

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:Updated:
Extrema Calculator illustration of a cubic curve with interior turning points and a higher right endpoint marked

This Extrema Calculator catches a common mistake: calling the local peak at (−1, 3) the largest value of x³ − 3x + 1 on [−2, 3]. The right endpoint reaches 19. Finding where a curve turns is only part of the job; you also need to compare its heights across the entire allowed interval. The examples below show how that comparison works, why corners count, and how changing one endpoint can change the answer.

An Extrema Calculator Example Where the Endpoint Wins

Start with f(x) = x³ − 3x + 1. Its derivative is f′(x) = 3x² − 3 = 3(x − 1)(x + 1). Setting the derivative equal to zero gives x = −1 and x = 1, both inside [−2, 3]. These are candidates, not final answers.

The derivative is positive to the left of −1, negative between −1 and 1, and positive after 1. That makes x = −1 a local maximum and x = 1 a local minimum. But “local” means compared with nearby inputs. It says nothing about a distant endpoint.

Left endpoint: f(−2) = −8 + 6 + 1 = −1

Interior peak: f(−1) = −1 + 3 + 1 = 3

Interior valley: f(1) = 1 − 3 + 1 = −1

Right endpoint: f(3) = 27 − 9 + 1 = 19

So the absolute maximum is 19 at x = 3. The absolute minimum is −1, attained at both x = −2 and x = 1. Keep both locations. A maximum or minimum value can be unique even when several inputs produce it. The range on this interval is [−1, 19], because continuity fills every height between those two extremes.

Build the Candidate List Before Comparing Heights

For a continuous function on a closed, bounded interval [a, b], the extreme value theorem guarantees an absolute maximum and an absolute minimum. That guarantee is the reason the closed interval method works. OpenStax explains the theorem and its assumptions in its maxima and minima chapter.

First establish continuity. Then find interior inputs where f′(x) = 0 or where f′ does not exist while f itself remains defined. Add a and b. Evaluate the original function at every candidate, and compare those output values. Solving f′(x) = 0 alone leaves the endpoint work unfinished.

The derivative calculator helps with differentiation, while the critical points calculator focuses on locating the interior candidates. The additional task here is deciding which candidates actually give the largest and smallest values on the chosen interval.

Don't substitute candidates into f′ and compare the results. For smooth stationary points those values are all zero. Substitute into f. The derivative identifies where to look; the original function tells you the height.

Move the Right Boundary and Watch the Winner Change

Keep the same cubic and the same left endpoint −2, but move the right endpoint to b > 1. The interior peak stays at height 3. The endpoint catches it when f(b) = 3, or b³ − 3b − 2 = 0. Factoring gives (b − 2)(b + 1)² = 0, so the relevant boundary is b = 2.

At b = 1.5, the endpoint value is 3.375 − 4.5 + 1 = −0.125. The local peak at x = −1 is still the absolute maximum. At b = 2, the peak and endpoint tie at 3. At b = 2.5, the endpoint reaches 15.625 − 7.5 + 1 = 9.125 and wins outright.

Try an interval prediction

For x³ − 3x + 1 on [−2, 2], name every input that attains an absolute extremum before calculating again.

Reveal the four locations

The minimum −1 occurs at x = −2 and x = 1. The maximum 3 occurs at x = −1 and x = 2. Both extrema have an endpoint location and an interior location.

This gives a useful check for any maximum minimum calculator: widening an interval cannot lower its absolute maximum or raise its absolute minimum. The old candidates are still available. If your answer violates that rule, inspect the interval, the function, and any rounding before trusting it.

A Flat Tangent Can Be a Valley or Neither Extremum

For f(x) = x⁴ on [−2, 2], f′(x) = 4x³ is zero at x = 0. The second derivative is 12x², also zero there. The second derivative test is inconclusive, yet the minimum is easy to prove: x⁴ ≥ 0 everywhere, with equality only at zero. The maximum is 16 at both endpoints.

Compare f(x) = x³ on the same interval. Again f′(0) = 0 and f″(0) = 0. This time 3x² is positive on both sides of zero, so the function keeps increasing. The origin is stationary but is neither a local maximum nor a local minimum. The absolute extrema are −8 at −2 and 8 at 2.

A derivative sign change settles both cases. Negative to positive means a local minimum; positive to negative means a local maximum; unchanged sign means neither for these isolated stationary points. The concavity calculator investigates how the slope changes, and the inflection point calculator addresses changes in concavity. Those questions differ from finding the greatest output.

Corners and Repeated Peaks Still Belong on the List

Consider f(x) = |x − 2| on [0, 5]. There's no horizontal tangent at x = 2: the derivative jumps from −1 to 1 and is undefined at the corner. Nevertheless, f(2) = 0 is the absolute minimum. The endpoints give f(0) = 2 and f(5) = 3, making 3 the absolute maximum.

This is why “critical” includes more than “derivative equals zero.” A corner where the function exists is a valid candidate. A hole where the function itself is undefined is not a candidate value. Those two situations require different treatment.

For f(x) = 2 sin(x) + 1 on [0, 2π], f′(x) = 2 cos(x). Its interior zeros are π/2 and 3π/2. Their heights are 3 and −1; both endpoint heights are 1. Thus the maximum is 3 and the minimum is −1. Extending to [0, 4π] adds another occurrence of each extreme without changing either value. Trigonometric derivative formulas here assume radians.

A Bound Is Not Necessarily an Attained Maximum

Closed endpoints matter. The function f(x) = x on (0, 1) has no maximum and no minimum. You can approach 1 as closely as you like, but 1 is excluded; every allowed input has a larger allowed input. The supremum is 1 and the infimum is 0, neither attained. On [0, 1], both are attained extrema.

Continuity matters too. The expression 1/x is undefined at zero, so you cannot apply the closed interval method across [−1, 1] as though it were continuous. Values become unbounded near the missing point. The limit calculator is relevant when the question involves approaching a boundary or singularity.

This tool handles finite closed intervals for its stated continuous function families. Polynomial critical points are found numerically from derivative roots; sine, cosine, and absolute-value candidates follow their known formulas. The graph visualizes the result rather than supplying the candidate list. Very close roots and nearly equal heights can be sensitive to floating-point rounding, so retain exact fractions or symbolic multiples of π when writing a final mathematical proof.

For a constant such as f(x) = 7, every allowed input gives both the maximum and minimum, and the range is the single value 7. There are infinitely many non-strict local extrema on the interior, but no strict turning points. Reporting just the two endpoints as the only winning locations would miss the rest of the interval.

Frequently Asked Questions

How do I find absolute maximum and minimum values on a closed interval?

Evaluate the continuous function at both endpoints and at every interior critical point, then compare the results. For f(x) = x² on [−1, 3], the candidate values are 1, 0, and 9. The absolute minimum is 0 at x = 0, and the absolute maximum is 9 at x = 3.

What is the difference between local and absolute extrema?

A local extremum beats nearby function values; an absolute extremum beats every value on the specified domain or interval. For x³ − 3x + 1 on [−2, 3], the local maximum is 3 at x = −1, but the absolute maximum is 19 at x = 3. Always include the interval when reporting an absolute result.

Can an endpoint be a local maximum or minimum?

This calculator uses the interior-point convention for local extrema, so endpoints are labeled separately. Endpoints can still be absolute extrema: x² has its absolute maximum 9 at the right endpoint of [−1, 3]. Some courses allow one-sided local extrema at endpoints; check the definition used in your class.

Does a critical point always mean a maximum or minimum?

No: a critical point is an interior point where the derivative is zero or undefined while the function is defined. For x³, the derivative is zero at x = 0, but the function increases through that point. Check the derivative signs on both sides before classifying it.

Why are several x values listed for the same minimum?

The same extreme height can occur at several inputs. For x⁴ − 2x² + 1 on [−2, 2], the minimum value 0 occurs at both x = −1 and x = 1. Report the value once and include every location that attains it.

Can I enter sine, cosine, or absolute value in this calculator?

Yes: select the corresponding function type and enter A, B, h, and k for A sin(B(x − h)) + k, A cos(B(x − h)) + k, or A |B(x − h)| + k. Sine and cosine use radians, and the interval may contain up to 200 critical points. The separate polynomial field accepts expanded polynomials through degree 6.

Can I use this calculator for open intervals or rational functions?

This calculator supports finite closed intervals for the listed continuous function families. Open intervals and rational functions with poles need separate boundary and domain analysis. For example, x on (0, 1) approaches both bounds but attains neither a maximum nor a minimum.

How do I find the highest temperature in a time interval from a formula?

Compare temperatures at the starting time, ending time, and any interior critical times of the model. For T(t) = −t² + 6t + 10 on [0, 5], T′(t) = −2t + 6 vanishes at t = 3, where T = 19. The endpoint temperatures are 10 and 15, so the modeled maximum is 19 at time 3.