Mean Value Theorem & Tangent Line Calculator

Compare the average slope over a closed interval with tangent slopes inside it. Find all interior matches for a polynomial through degree three or a joined pair of quadratics. Inspect continuity and differentiability at an entered join, see how the open witness interval treats endpoints, and calculate a separate tangent line at a selected x.

Differential calculus

Compare secant and tangent slopes

Secant slope 9. 1 isolated interior matches and 0 open matching ranges.

Endpoint secant slope
9
Average change across [a,b]
Interior matches
1
Strictly between a and b
Theorem conditions
Met
Continuous and differentiable

Function and interval

Coefficients of f(x)

f(x) = c₀ + c₁x + c₂x² + c₃x³

Use up to three decimal places. The tangent check can use either plotted endpoint.

Function, secant and tangents

Filled endpoints belong to the function. The matching points and ranges stay inside the open witness interval.

Function plot with secant and tangent linesClosed function interval 0 to 3. Secant slope 9. 1 isolated interior matches and 0 open matching ranges.

x from 0 to 3 · plotted y from −2.7 to 29.7

  • Function
  • Endpoint secant
  • Interior slope match
  • Checked tangent

Matches in the open interval

c lies strictly inside (0, 3). Exact secant slope 9.

  • c ≈ 1.732051 · f(c) 5.196152

Continuity and differentiability

Mean Value Theorem conditions hold.

A polynomial is continuous on the closed interval and differentiable throughout its interior.

Tangent at the entered x

y = 3x − 2 at x = 1.

Open slope and point ledger
Function coordinates, witnesses and tangent values
PointxyDetail
Closed endpoint a00Closed function endpoint
Closed endpoint b327Closed function endpoint
Interior match1.7320515.196152Interval · approximate x
Tangent check11y = 3x − 2
Show selectable CSV

How to use this calculator

  1. Choose a polynomial or joined quadratics. Enter coefficients in ascending order starting with the constant.
  2. Enter the left and right endpoints of the closed plot interval. For a joined function, enter the interior join x and the actual function value there.
  3. Read the continuity and differentiability checks and compare the secant slope with the reported interior matches.
  4. Enable the separate tangent check and enter an x in the plotted interval. Review its tangent line or the join diagnosis.
  5. Inspect the graph, the interval and endpoint markers, and the value ledger. Download the CSV for a worked record.

The Formula

The mathematical logic powering this calculation is:

For a < b, the secant slope is [f(b) − f(a)]/(b − a). Solve f′(c) = secant slope for c strictly between a and b. For a polynomial through degree three, the derivative is at most quadratic. A constant derivative equal to the secant slope gives every point in the corresponding open interval. A matching derivative at an endpoint stays outside the theorem’s open witness interval.

A joined model uses one quadratic in (x − k) to the left of k, another to its right, and an entered actual value at k. The branch constants give the two one-sided limits. Their linear coefficients give the one-sided branch slopes. Continuity at k requires both limits and the actual value to agree. Differentiability additionally requires the slopes to agree. The Mean Value Theorem guarantees an interior match when continuity on [a,b] and differentiability on (a,b) both hold. Equal endpoint values under those conditions give the Rolle case with slope zero. The worksheet solves for actual interior matches even if the guarantee is unavailable.

The tangent at x₀, when the derivative exists, is y = f(x₀) + f′(x₀)(x − x₀). An endpoint within the entered plot can be checked as a separate tangent point because the supported polynomial expressions extend beyond the plotted bounds. The chosen join must be strictly inside the plot.

Each input supports −1,000 to 1,000 with up to three decimals. Rational arithmetic checks limits, slope equality and open membership. The quadratic equation uses exact comparisons for irrational roots and shows their decimal approximations. The curve is sampled for the graph. Root and endpoint membership are calculated independently of drawing resolution.

Worked Example

If you input:

  • Function model: Polynomial
  • Coefficients c₀, c₁, c₂, c₃: 0, 0, 0, 1
  • Left endpoint a; right endpoint b: 0; 3
  • Tangent check x: 1

Result:

For f(x) = x³ on [0, 3], the mean slope is 9 and the one interior match is c = √3, approximately 1.732051. The independently checked tangent at x = 1 is y = 3x − 2.

Frequently Asked Questions

What does the Mean Value Theorem guarantee?

A function continuous on the closed interval and differentiable in its interior has at least one interior point where the tangent and secant slopes agree.

What is Rolle’s theorem in this calculator?

With the same continuity and differentiability conditions and equal endpoint values, the secant slope is zero. Each matching interior point then has a horizontal tangent.

Can a function have more than one match?

Yes. A cubic can have two interior matches, and a linear function matches throughout its open interval. Joined models can combine an open range and a separate point.

Why is my endpoint outside the witness set?

The theorem seeks a c in (a,b). The calculator shows a matching derivative at a or b separately and can check its tangent using the supported function’s extension.

What happens at a corner or a jump?

A corner can be continuous while its slopes differ. A jump or a different actual join value fails continuity. The worksheet reports any slope matches in the remaining differentiable regions.

Is the tangent always a supporting line?

A tangent has the derivative’s slope and goes through the curve at the entered x. It can cross the curve, including at a differentiable inflection point.

Similar Calculators