Mean value theorem
In calculus, the mean value theorem states, roughly, that given a section of a smooth curve, there is a point on that section at which the derivative (slope) of the curve is equal (parallel) to the "average" derivative of the section.  It is used to prove theorems that make global conclusions about a function on an interval starting from local hypotheses about derivatives at points of the interval.
This theorem can be understood concretely by applying it to motion: if a car travels one hundred miles in one hour, so that its average speed during that time was 100 miles per hour, then at some time its instantaneous speed must have been exactly 100 miles per hour.
An early version of this theorem was first described by Parameshvara (13701460) from the Kerala school of astronomy and mathematics in his commentaries on Govindasvami and Bhaskara II. The mean value theorem in its modern form was later stated by Augustin Louis Cauchy (17891857). It is one of the most important results in differential calculus, as well as one of the most important theorems in mathematical analysis, and is essential in proving the fundamental theorem of calculus. The mean value theorem can be used to prove Taylor's theorem, of which it is a special case.

# Formal statement
The mean value theorem is a generalization of Rolle's theorem, which assumes f(a) = f(b), so that the right-hand side above is zero.
The mean value theorem is still valid in a slightly more general setting, one only needs to assume that f :   R is continuous on , and that for every x in (a, b) the limit
exists as a finite number or equals + or . If finite, that limit equals f' (x). An example where this version of the theorem applies is given by the real-valued cube root function mapping x to x1/3, whose derivative tends to infinity at the origin.

# Proof
The expression (f(b)  f(a)) / (b  a) gives the slope of the line joining the points (a,f(a)) and (b,f(b)), which is a chord of the graph of f, while f (x) gives the slope of the tangent to the curve at the point (x,f(x)). Thus the Mean value theorem says that given any chord of a smooth curve, we can find a point lying between the end-points of the chord such that the tangent at that point is parallel to the chord. The following proof illustrates this idea.
Define g(x) = f(x) + rx, where r is a constant. Since f is continuous on  and differentiable on (a, b), the same is true of g. We now want to choose r so that g satisfies the conditions of Rolle's theorem. But
By Rolle's theorem, since g is continuous and g(a) = g(b), there is some c in (a, b) for which g '(c) = 0, and it follows from the equality g(x) = f(x) + rx that,
as required.

# Cauchy's mean value theorem
Cauchy's mean value theorem, also known as the extended mean value theorem, is the more general form of the mean value theorem. It states: If functions f and g are both continuous on the closed interval , and differentiable on the open interval (a, b), then there exists some c  (a,b), such that
Of course, if g(a) = g(b) and if g(c) = 0, this is equivalent to:
Geometrically, this means that there is some tangent to the graph of the curve
which is parallel to the line defined by the points (f(a),g(a)) and (f(b),g(b)). However Cauchy's theorem does not claim the existence of such a tangent in all cases where (f(a),g(a)) and (f(b),g(b)) are distinct points, since it might be satisfied only for some value c with f(c) = g(c) = 0, in other words a value for which the mentioned curve is stationary; in such points no tangent to the curve is likely to be defined at all. An example of this situation is the curve given by
which on the interval  goes from the point (1,0) to (1,0), yet never has a horizontal tangent; however it has a stationary point (in fact a cusp) at t  = 0.
Cauchy's mean value theorem can be used to prove l'Hopital's rule. The mean value theorem is the special case of Cauchy's mean value when g(t) = t.

## Proof of Cauchy's mean value theorem
The proof of Cauchy's mean value theorem is based on the same idea as the proof of the mean value theorem. 
First we define a new function h from  into R and then we aim to transform this function so that it satisfies the conditions of Rolle's theorem. Let
Since h is continuous and h(a) = h(b), by Rolle's theorem, there exists some c in (a, b) such that h(c) = 0. But

# Mean value theorems for integration
The first mean value theorem for integration states
In particular for (t) = 1, there exists x in (a, b) such that
There are various slightly different theorems called the second mean value theorem for integration.  A commonly found version is as follows:
Here G(a + 0) stands for limxaG(x), the existence of which follows from the conditions. Note that it is essential that the interval (a, b] contains b. A variant not having this requirement is:
This variant was proved by Hiroshi Okamura in 1947.