Enter a function and endpoints to compute c. Choose precision and scan for multiple solutions. Get graphs, tables, and downloads in one clean page.
| Function f(x) | Interval [a,b] | Secant slope | Expected c (one valid choice) |
|---|---|---|---|
| x^2 | [1, 3] | 4 | 2 |
| sin(x) | [0, pi/2] | 2/pi | ≈ 0.690 |
| exp(x) | [0, 1] | e − 1 | ≈ 0.541 |
If f is continuous on [a,b] and differentiable on (a,b), then there exists at least one c ∈ (a,b) such that:
f'(c) = ( f(b) − f(a) ) / ( b − a )
This calculator estimates c numerically by computing the derivative with a central difference and searching for roots of g(x) = f'(x) − slope.
The calculator accepts a single-variable function and two endpoints. It validates that a ≠ b and swaps endpoints when a > b to keep the interval consistent. Common scientific functions are supported (trigonometric, exponential, logarithmic, and square root). Display precision is capped at 14 decimals to keep reports readable and reduce misleading digits in exported files.
The derivative is estimated using a central-difference scheme, which typically provides better symmetry than a one-sided estimate. The default step is set relative to interval length, so a wide interval avoids too-small steps and a narrow interval avoids too-large steps. Manual step control remains available when a function is especially steep or when numerical noise appears in the error column.
A scan divides (a,b) into evenly spaced subintervals and evaluates g(x)=f'(x)−slope. With the default scan steps of 200, many classroom examples are detected quickly. Higher scan steps, up to 2000, increase sensitivity for oscillatory inputs such as sin(10x), at the cost of extra evaluations.
Multiple solutions can occur when the derivative crosses the secant slope more than once. Each reported c includes f(c), a numeric f'(c), and the residual f'(c)−slope. In practice, residual values near the tolerance threshold indicate a stable match. If you need fewer points, raise tolerance slightly or reduce scan steps.
The interactive plot overlays the function and the secant line on the same interval, making the theorem visually checkable. When results exist, markers show the estimated c locations on the curve. If a function is undefined at an endpoint (for example ln(x) at x≤0), the graph warns and the computation is blocked to prevent exporting meaningless values.
CSV export stores inputs, f(a), f(b), the secant slope, and all detected solutions with residuals. PDF export provides a compact, single-page record suitable for assignments, lab notebooks, and QA logs. Together, these outputs support reproducibility: the same expression and settings should recreate the same numerical estimates within rounding tolerance.
It computes points for the Lagrange Mean Value Theorem, finding c in (a,b) where f'(c) equals the secant slope between a and b.
If f'(x) crosses the secant slope multiple times on the interval, the numerical scan detects multiple sign changes and reports each bracketed root as a separate valid estimate.
Increase scan steps, loosen tolerance slightly, or try a different derivative step. Also check that f(a) and f(b) are finite and that the function is differentiable on (a,b).
No. The derivative uses a central-difference approximation, so results depend on step size and floating-point behavior. The residual column helps you judge how closely the estimate satisfies the equality.
You can use sin, cos, tan, asin, acos, atan, exp, ln, log, sqrt, abs plus constants pi and e, with operators + - * / ^ and parentheses.
Exports include your function, interval, endpoint values, secant slope, numeric settings, and all detected c solutions with f(c), f'(c), and residual error for documentation.
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.