Formula used
The calculator estimates derivatives numerically. It uses the central difference method.
First derivative: f'(x) ≈ [f(x + h) - f(x - h)] / 2h
Second derivative: f''(x) ≈ [f(x + h) - 2f(x) + f(x - h)] / h²
Relative maximum: f'(x) changes from positive to negative.
Relative minimum: f'(x) changes from negative to positive.
The second derivative test supports the classification. If f''(x) < 0, the point is usually a relative maximum. If f''(x) > 0, the point is usually a relative minimum.
How to use this calculator
- Enter a function using x as the variable.
- Set the interval start and interval end.
- Increase samples when the graph has many turns.
- Choose radians or degrees for trigonometric expressions.
- Press the calculate button to view the extrema table.
- Use CSV or PDF to save the same calculation.
Supported functions include sin, cos, tan, sec, csc, cot, asin, acos, atan, sqrt, abs, exp, ln, log, floor, and ceil.
Example data table
| Function |
Interval |
Expected relative maximum |
Expected relative minimum |
Note |
| x^3 - 3*x^2 + 2 |
[-2, 4] |
x = 0, f(x) = 2 |
x = 2, f(x) = -2 |
Uses first and second derivative tests. |
| cos(x) |
[0, 6.28] |
x ≈ 0 or 6.28 near endpoints |
x ≈ 3.14159 |
Interior classification depends on interval choice. |
| x^4 - 4*x^2 |
[-3, 3] |
x = 0 |
x ≈ -1.414 and x ≈ 1.414 |
Shows multiple local extrema. |
Understanding relative extrema
Local turning point meaning
A relative maximum or relative minimum is a local turning point. It describes nearby behavior, not the whole graph. A point is a relative maximum when nearby values fall on both sides. A point is a relative minimum when nearby values rise on both sides. This calculator checks those changes with numerical derivatives.
Derivative tests
The first derivative shows slope. A turning point usually appears where the derivative is zero or changes sign. The second derivative helps classify the point. A positive second derivative suggests a local minimum. A negative second derivative suggests a local maximum. When the second derivative is close to zero, the sign change test is more useful.
Search method
The tool scans your interval with many sample points. It estimates the first derivative at each point. Then it searches for sign changes. Each sign change is refined by bisection. This gives a cleaner x value. The function value is then calculated at that x. The result table also shows the slope, curvature, and classification note.
Choosing settings
Choose an interval that contains the curve feature you need. A very wide interval may need more samples. A narrow interval can use fewer samples. Use a small derivative step for smooth functions. Use a larger step when rounding noise appears. Increase iterations when roots need more refinement.
Important limits
Some functions have sharp corners or undefined areas. Absolute value functions may have extrema where the derivative is not smooth. Rational functions may have gaps. Trigonometric functions can have many local points. The calculator skips invalid samples and reports reliable candidates found inside the interval.
Practical review
This method is numerical, so it is practical for exploration. It does not replace a symbolic proof. It is helpful for checking homework, graph study, and model review. Compare the result with a graph when accuracy matters. Adjust tolerance, sample count, and interval limits until the result stays stable.
Saving results
For best use, start with a familiar graph window. Test a simple polynomial first. Then move to harder expressions. Save the CSV when comparing several intervals. Save the report when sharing a clean summary. Keep notes about each setting. These notes make repeated checks easier. They also help find mistakes quickly. Use more samples for waves, roots, and narrow hidden turning points too.
FAQs
What is a relative maximum?
A relative maximum is a point where the function value is higher than nearby values. The graph usually rises before the point and falls after it.
What is a relative minimum?
A relative minimum is a point where the function value is lower than nearby values. The graph usually falls before the point and rises after it.
Does this calculator use exact symbolic derivatives?
No. It uses numerical derivative estimates. This makes it flexible for many expressions, but final results should be checked when exact proof is required.
Why should I set an interval?
The interval tells the calculator where to search. A function may have many extrema, so a clear search range gives better and faster results.
What sample count should I use?
Use more samples for wide intervals, trigonometric curves, or functions with many bends. Use fewer samples for simple polynomial examples.
What does derivative step mean?
The derivative step controls the distance used in the numerical derivative formula. Smaller steps can improve smooth functions, but very tiny steps may add rounding error.
Can endpoints be relative extrema?
This calculator focuses on interior relative extrema. Endpoints are shown for comparison, but local extrema usually require nearby points on both sides.
Why do I see a stationary point?
A stationary point has a derivative near zero. It may not be a maximum or minimum if the slope does not clearly change direction.