Rolle’s Theorem Calculator

Check endpoints, values, and continuity in one panel. Compute slopes numerically and locate stationary points. Download results as CSV or PDF for sharing later.

Calculator

Enter your function and interval. Results appear above this form after submission.

Allowed: + − × ÷ ^, parentheses, x, pi, e, sin/cos/tan, ln/log, exp, sqrt, abs.
If a > b, the calculator swaps them.
Rolle’s theorem requires a < b.
More samples can detect more roots.
Central difference uses x ± h.
Smaller tolerance may need more iterations.
Checks if f(a) ≈ f(b).
Used in bisection and refinement steps.

Example data table
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
Run these examples to see how stationary points appear.
How to use this calculator
  1. Type f(x) using supported operators and functions.
  2. Enter a and b. Ensure the function is defined on the full interval.
  3. Click Check Rolle’s Theorem to display results above the form.
  4. If no point is found, increase samples or adjust tolerances.
  5. Use the export buttons to save your computed table.

Formula used

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.


FAQs
1) What expressions are supported?

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.

2) Why does the tool say “not confirmed” even when I expect a c?

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.

3) How should I choose the derivative step h?

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.

4) Can discontinuous functions pass the endpoint check?

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.

5) Why are there multiple stationary points?

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.

6) What do the CSV and PDF exports include?

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.

Related Calculators

jacobian determinant calculatorimplicit differentiation calculatorlebesgue measure calculatoropen set calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.