We have mentioned continuous functions before, but let us re-state the preliminary definition which we have used. Let be a function which is defined in an interval containing . Then we say that is continuous at if changing only slightly from produces only a small change in the value of from its value at . More briefly, if is near , then is near . observe that this definition is imprecise in that the words small and near have no exact meaning. For one man, might be near enough, while another might consider a number as small until it is less than . The precise definition of continuity which we eventually shall give will satisfy both men and all others as well.
Now let be defined for all such that . A point of this interval is called a maximum of in the interval if for all such that . is called a minimum of in the interval if for . Not all functions need have maxima or minima; for consider the function
\left\{ \begin{aligned} f(x) &= x, \quad 0 \le x < 1 \\ f(1) &= 0 \end{aligned} \right\}Its graph is

where the oblique line has no right-hand endpoint. This function has no maximum in the interval . For surely 1 cannot be a maximum since . But if were to be a maximum observe that
Therefore
so that cannot be a maximum. Note, however, that this function is not continuous at 1.
Later in the course, we shall prove the following theorem:
Let be continuous at every point of the interval . Then there is at least one , such that is a maximum for in .
Observe that it follows that has a minimum in . For a minimum of is simply a maximum of . Now let have a maximum at , so that is not an endpoint. Then consider the difference quotient
For all ,
If ,
If ,
If f'(x_0) exists, these expressions approach the common limit f'(x_0) as . But if f'(x_0) > 0, the first one (for ) could never get closer to f'(x_0) than the distance of f'(x_0) from 0. If f'(x_0) < 0, the second expression () could not approach it. Therefore we must have f'(x_0) = 0. Our conclusion is then:
Let be defined for and let be a point such that and such that is a maximum for in . Then if f'(x_0) exists, we must have f'(x_0) = 0.
(We could equally well have used "minimum" instead of "maximum".)
Let be continuous in the interval . Let be differentiable for all such that . If , then there is a , such that f'(\xi) = 0.
For smooth-looking functions this seems evident, but we must still prove it. It follows quite quickly from the theorem on the existence of a maximum and our remarks on the derivative at a maximum.
Proof of Rolle's Theorem.
Since is continuous, has a maximum and a minimum in . Now either is constant for , or for some , or for some . In the first case, we have seen that f'(x) = 0 whenever , and we can take to be any point such that . In the second case, any maximum of has , so f'(x_0) exists. But we have seen that then f'(x_0) = 0, and we can take . If the second case does not hold, and is not constant, then any minimum of has , and f'(x_1) = 0 as before. In this case we can take . Thus the theorem is proved.
Next we prove a consequence of Rolle's Theorem, called the Mean Value Theorem, which is perhaps the most useful result we have had to date.
Let be continuous for , differentiable for . Then there exists a , such that
f(b) - f(a) = f'(\xi)(b - a) .We wish to form a new function which will satisfy the conditions of Rolle's Theorem and such that the conclusion of Rolle's Theorem for will imply the desired result. Therefore we try
Then , is continuous for , because is, and
g'(x) = f'(x)(b - a) - (f(b) - f(a)), \quad a < x < b,so that is differentiable for . By Rolle's Theorem, there is a , such that
g'(\xi) = 0 = f'(\xi)(b - a) - (f(b) - f(a)),or
f(b) - f(a) = f'(\xi)(b - a),as desired. Thus the Mean Value Theorem is proved.
Geometrically, the mean value theorem means that if we form a secant to the graph of a function satisfying the conditions, there is a point between the intersections of the secant with the graph where the tangent to the curve is parallel to this secant.

We shall say considerably more about the uses of the Mean Value Theorem as we go along; we shall likewise discuss questions of maxima and minima at greater length a little later. Let us outline at the moment the procedures we can use for determining maxima and minima of a function which is continuous for , and is differentiable for . We know that if has a maximum (or minimum) at , with , then f'(x_0) = 0. It is also conceivable that a maximum, minimum, or both might occur at the endpoints and . Therefore let be all points within the interval where f'(x) = 0, and consider the numbers
Any value of corresponding to the largest of these is a maximum; a value corresponding to the smallest is a minimum. It may be, therefore, that there are points with f'(x_0) = 0 which are neither maxima nor minima for .
Exercises
Find a maximum and a minimum for the following functions on the corresponding intervals:
a)
b)
c) f(x) = \left\{ \begin{aligned} x^2 \sin \frac{1}{x}, \quad x \neq 0 \\ 0 \quad \text{if } x = 0 \end{aligned} \right\}, \quad -\frac{2}{\pi} \le x \le \frac{2}{\pi} .