Wolfram Alpha:

```Mean Value and Rolle's Theorem
------------------------------

Mean Value Theorem
------------------

Suppose f(x) is a function that satisfies both of the following.
f(x) is continuous on the closed interval [a,b].
f(x) is differentiable on the open interval (a,b).

Then there is a number c such that a < c < b and

f'(c) = (f(a) - f(b))/(a - b)   ... (1)

Ex:

f(x) = -2x2 - x + 2  [1,3]

f'(x) = -4x - 1

f(1) = -1, f(3) = -19

-4x - 1 = (-1 + 19)/-2 = -9

=> x = 2

Rolle's Theorem
---------------

Let f be continuous on a closed interval [a, b] and differentiable
on the open interval (a, b). If f(a) = f(b), then there is at least
one point c in (a, b) where f'(c) = 0.

Ex:  From above

f(1) ≠ f(3) ∴ no point where f'(c) = 0.

Ex:  f(x) = |2 - x|  [-10,10]

function is not differentiable at x = 2 ∴ cannot use theorem.

Ex:  f(x) = (x-3)(x-7)

f(3) = f(7)

f'(x) = 2x - 10 = 0 ∴ c = 5

Mean Value Theorem for Integrals
--------------------------------
Rewrite (1) as:

(a - b)f'(c) = f(b) - f(a)

which implies

∫f(s)ds = (a - b)f(c)

b
f(c) = ∫f(s)ds/(a - b)
a

The point f(c) is called the average value of f(x) on [a,b]
```