Find local extrema
Use the math keyboard for powers, fractions, roots, constants, and supported functions. Switch tabs for variables and function keys.
Only local maxima and minima are listed. The search is numerical, limited to this interval, and checks points in the function’s domain.
On [-3, 3]
Numerical search is limited to this interval. Endpoints are excluded; verify exact results algebraically when needed.
Step-by-step solution
- 1Differentiate the function
- 2Find stationary inputs in the interval
Solve the first-derivative equation for x between -3 and 3. Also check defined points where the derivative does not exist.
- 3local maximum at x ≈ -1
Evaluate the original function: f(-1) ≈ 2, giving the point (-1, 2). The function changes from increasing to decreasing here.
- 4local minimum at x ≈ 1
Evaluate the original function: f(1) ≈ -2, giving the point (1, -2). The function changes from decreasing to increasing here.
What are local maxima and minima?
A local maximum is a point where a function’s value is greater than or equal to nearby values; a local minimum is lower than or equal to nearby values. For a differentiable function, these extrema can occur at interior critical numbers where f′(x) = 0. They can also occur at points where the derivative does not exist, such as the cusp of |x|. A critical point is only a candidate: nearby behavior must show a change from increasing to decreasing for a local maximum, or decreasing to increasing for a local minimum.
A change in f′ from positive to negative indicates a local maximum. A change from negative to positive indicates a local minimum. If the derivative does not change sign, the point is not a local extremum, even when f′(c) = 0.
The calculator searches numerically over the finite interval you provide. It reports detected interior local extrema, not endpoint extrema or a proof that no other extrema exist. Confirm exact results algebraically when required.
How to use the calculator
- Enter the function f(x) and choose an x-interval to inspect.
- Calculate f′(x) and locate numerical derivative zeros in the interval.
- Check defined points where the derivative is not finite, such as an absolute-value cusp.
- Evaluate f(c) to obtain the coordinate (c, f(c)).
- Compare the derivative behavior on each side: positive to negative means a local maximum; negative to positive means a local minimum.
- Review the interval and numerical-search note before using the result.
Worked example
Problem: Find the local maximum and minimum of f(x) = x³ − 3x on [−3, 3].
Method: f′(x) = 3x² − 3 = 3(x − 1)(x + 1), so the critical inputs are x = −1 and x = 1.
Result: At x = −1, f(−1) = 2 and f′ changes from positive to negative: local maximum (−1, 2). At x = 1, f(1) = −2 and f′ changes from negative to positive: local minimum (1, −2).
The first-derivative test classifies the local turning behavior at each stationary point.
Local-extrema principles
- Positive-to-negative derivative: If f′ changes from positive to negative at c, the function rises and then falls, producing a local maximum.
- Negative-to-positive derivative: If f′ changes from negative to positive at c, the function falls and then rises, producing a local minimum.
- No sign change means no extremum: A stationary inflection such as x³ at zero has derivative zero but continues increasing through the point.
- Endpoints need separate treatment: Endpoints can be absolute extrema on a closed interval but are not interior local extrema in this calculator’s result list.
Common mistakes
- Assuming every critical point is a local maximum or minimum.
- Confusing local extrema with absolute extrema.
- Ignoring a cusp because the derivative does not exist there.
- Including interval endpoints without checking the endpoint definition being used.
- Treating a numerical search as an exact proof or as an unlimited-domain search.
Frequently asked questions
How do I find local maxima and minima?
Find interior critical numbers where f′ is zero or undefined, then check how f′ or f changes on either side. Positive-to-negative gives a local maximum; negative-to-positive gives a local minimum.
Are all critical points local extrema?
No. Some are stationary inflection points or other candidates without a local peak or valley. The sign change test distinguishes them.
Can a local extremum occur where the derivative is undefined?
Yes. For example, |x| has a local minimum at zero even though the derivative does not exist there.
What is the difference between local and absolute extrema?
A local extremum is compared with nearby values. An absolute extremum is the greatest or least value on the entire specified domain or interval.
Are interval endpoints included?
This tool reports interior local extrema. For absolute extrema on a closed interval, evaluate both endpoints and compare their values with interior critical values.
Why is an interval required?
The calculator uses numerical search on finite bounds. Results apply only to the interval displayed and may miss difficult or closely spaced candidates.
References
- OpenStax, Rice University: Calculus Volume 1 — Finding Absolute Extrema — Critical numbers, local extrema, first-derivative tests, and endpoint checks for absolute extrema.