Enter your function and interval. Results appear above this form after submission.
| Example f(x) | a | b | f(a) | f(b) | Expected c |
|---|---|---|---|---|---|
| x^2 - 1 | -1 | 1 | 0 | 0 | 0 |
| sin(x) | 0 | pi | 0 | 0 | pi/2 |
- Type f(x) using supported operators and functions.
- Enter a and b. Ensure the function is defined on the full interval.
- Click Check Rolle’s Theorem to display results above the form.
- If no point is found, increase samples or adjust tolerances.
- Use the export buttons to save your computed table.
Rolle’s theorem: If f is continuous on [a,b], differentiable on (a,b), and f(a)=f(b), then there exists c∈(a,b) such that f′(c)=0.
Numerical derivative (central difference): f′(x) ≈ ( f(x+h) − f(x−h) ) / (2h).
Root search: The calculator scans the interval for sign changes in f′(x) and then applies bisection to estimate values of c.
What the calculator verifies
Rolle’s theorem states that if a function is continuous on [a,b], differentiable on (a,b), and satisfies f(a)=f(b), then at least one interior point c exists where f′(c)=0. This calculator checks the endpoint equality numerically and searches for stationary points by solving f′(x)≈0 across the interval. The endpoint test uses an equality tolerance so you can handle rounding effects when f(a) and f(b) should match analytically.
Inputs that control numerical stability
The interval endpoints a and b set the search window. “Derivative step (h)” defines the central-difference slope estimate f′(x)≈(f(x+h)−f(x−h))/(2h). Smaller h can improve local accuracy, but extremely small values may amplify rounding noise for steep or highly oscillatory functions. If you see unstable derivative values, increase h and compare results.
Why the scan uses samples
To locate candidates efficiently, the tool samples f′(x) at evenly spaced points. A sign change between two samples indicates a likely root bracket for f′. Increasing “scan samples” improves detection of closely spaced stationary points, especially for trigonometric expressions or higher-degree polynomials. For long intervals, raising the sample count reduces the chance of skipping narrow features around sharp turns.
Bisection refinement and tolerance
After bracketing, bisection narrows the interval until either |f′(c)| falls below the root tolerance or the bracket width becomes very small. Tight tolerances provide sharper c estimates, but may require more iterations. For difficult functions, using a moderate tolerance with a higher sample count is often more reliable. The max-iteration setting provides a cap when convergence is slow.
Interpreting the Plotly graph
The graph plots f(x) and the numeric derivative f′(x) over [a,b]. Stationary points are highlighted as markers at c. If the derivative curve crosses the horizontal axis while the endpoints show f(a)≈f(b), the visual evidence aligns with Rolle’s theorem. Flat regions can produce multiple nearby solutions. If f(x) is undefined near the endpoints, the plotted curve will show gaps and the theorem’s hypotheses may fail.
Exporting results for reporting
CSV export captures the computed table of stationary points and derivative values for further analysis in spreadsheets. PDF export saves a readable summary of inputs and results for sharing. When documenting work, record your h, samples, and tolerance settings so numeric conclusions can be reproduced consistently easily.
Use x, numbers, + − * / ^, parentheses, and functions like sin, cos, tan, ln, log, exp, sqrt, abs, floor, and ceil. Constants pi and e are also supported.
Rolle’s theorem needs f(a)=f(b) and differentiability on (a,b). If endpoint values differ within your tolerance or the numeric derivative misses a root, increase samples or adjust tolerances.
Start near 1e-5 for typical scales. If results look noisy, increase h. If the derivative seems overly smoothed, decrease h gradually. Always compare outcomes across a few h values.
Yes. Matching endpoint values alone does not guarantee continuity or differentiability. If the function is undefined or has jumps inside the interval, Rolle’s theorem does not apply, even if a stationary point appears numerically.
Many functions have several points where f′(c)=0 within (a,b). The theorem guarantees at least one when conditions hold, but it does not limit the total count. Increase samples to find closely spaced points.
CSV exports the stationary-point table for analysis in spreadsheet software. PDF captures a readable summary of inputs, endpoint checks, and the computed table, making it convenient for submissions and sharing.