1. Introduction
The celebrated Rolle’s theorem, familiar to undergraduate students in Analysis (see, e.g., [
1] just to quote a book, or the book by the second author [
2]), can be stated as follows:
Let f be a function that is continuous on the closed interval  and differentiable on the open interval . If , then there exists a point c in  for which .
This theorem appeared in a primitive form in a book dated 1690 (see a translation in [
3]), and it has an interesting story (see [
4,
5,
6]) because Rolle is known paradoxically for his attack on infinitesimal calculus for its “lack of rigour”. Since its first appearance, it has attracted the attention of researchers, who have published generalizations in several directions, variants, or also less-standard proofs (see, e.g., a constructive proof in [
7]). It had a role in all the levels of study in Mathematics, from school instruction (see, e.g., the experiments in Nepal [
8]) to some variants of interest for first-year calculus classes ([
9,
10,
11]) and for second-year calculus classes ([
12]) until dynamical systems (see, e.g., [
13]). A large body of literature concerns the functions defined in more abstract structures. For instance, the theorem has been considered for complex valued functions in the framework of the complex plane (see, e.g., [
14,
15,
16,
17]) and for functions defined in finite-dimensional spaces (see, e.g., [
18]). Moreover, there exists an “approximate version” for the functions defined in the closure of open connected bounded sets in Banach spaces (see [
19,
20,
21]) because  Rolle’s theorem cannot be applied to the functions defined in the closure of the unit ball in infinite-dimensional Banach spaces, where continuous functions may not have minimum and maximum values (because compactness is lost; see, e.g., [
22] and the references therein, and also [
23]). At last, we mention a version for real functionals defined in a whole real Banach space, which appears in [
24], a study on the range of the derivative of functions with bounded support in [
25], and the recent contributions [
26,
27,
28,
29,
30,
31,
32].
The aim of this paper is to prove four results that generalize the classical result.
First, we point out that Rolle’s theorem has much broader validity than the classical theorem; in fact, it can be applied to functions whose domain is a closed set endowed with interior points, of any locally convex topological Hausdorff vector space (see the precise statement of Theorem 1); in particular, as already known, it can be applied to real functions of several variables, and to functions of a single variable not necessarily defined in an interval. Then, with reference to the functions defined in an interval of , the classical theorem is generalized from different points of view.
The second result (see Theorem 2) shows that, in Rolle’s theorem, the function can also be defined in an unbounded interval under the assumption that the limits in the extremes, assumed to exist, are equal (see 
Figure 1); we do not exclude that there exist points at which the function has an infinite derivative (see 
Figure 2), and, moreover, when it is finite, there is no need for the continuity in the extremes; at last, there is also no need for the interval to be closed. As an application, we prove Theorem 3, which also generalizes Lagrange’s theorem.
If in Rolle’s theorem we assume the function of class  (i.e., a continuous first derivative) in a compact interval, the integral mean of the derivative is equal to zero (it suffices to use the fundamental formula of integral calculus); this trivial observation suggests the thesis of the third theorem (see Theorem 4), which cannot be the same as that of Rolle’s theorem because the function, instead of being endowed with a derivative defined pointwise, is assumed to be endowed with a weak derivative belonging to  (i.e., whose modulus is integrable).
Finally, Theorem 5 can be considered Rolle’s theorem for distributions over an open interval of .
  2. The Main Results
We begin by recalling the classical notion of a Gateaux differential, which is a generalization of the concept of a directional derivative in differential calculus. Let 
S be a topological Hausdorff vector space, 
 be an open subset of 
S, and 
f be a real and continuous function defined in 
. For each 
, the function 
f is said to be Gateaux-differentiable at the point 
, where, for each 
, there exists a finite limit
      
      and the map 
 is a linear and continuous operator. If 
f is Gateaux-differentiable at the point 
, then the map 
 is denoted by 
, and it is called the Gateaux differential of 
f at the point 
. In the particular case 
, the Gateaux differentiability is equivalent to derivability according to any direction, and 
 is the differential of 
f in the classical sense.
By using the same argument as in calculus, we show that the following generalized Rolle’s theorem holds as follows:
Theorem 1. Let S be a locally convex topological Hausdorff vector space, D a proper subset of S, closed and with nonempty interior; let f be a real function defined in D, continuous in D and Gateaux-differentiable in the interior points. Then, if f is constant on the boundary of D, and if there exist  and  (for instance, in the case D is a compact set), then there exists at least one interior point  of D such that .
 Proof of Theorem 1. Let us rule out the case that f is constant because, in such a case, the differential is zero for every interior point and the assertion is trivial.
By assumption, which is always satisfied in the case that 
D is a compact set, by the Weierstrass theorem (see, e.g., Theorem 4.16, p. 89 [
33]), the function has a minimum and a maximum; let 
 be points of 
D such that 
 and 
. At least one of the points 
, e.g., 
, is interior to 
D; if they were both boundary points (note that the boundary of 
D is nonempty because 
D is a proper subset of 
S), by the assumption that 
f is constant on the boundary of 
D, it would be 
 and therefore the function 
f would be constant; i.e., this would be the eventuality ruled out above.
Now, since  is point of local minimum for f interior to the domain of f, as we are going to recall, we have  and the assertion will be proved.
A point of local extreme interior in D is such that  and can be proved in the framework of locally convex topological Hausdorff vector spaces by an argument very close to the standard one; nevertheless, there are a few details.
Let 
 be, e.g., a point of local minimum. Since it is interior in 
D, there exists a neighborhood 
, 
, such that 
, and, since 
S is a locally convex topological space, there exists a convex neighborhood 
, 
, satisfying
        
        on the other hand, by the continuity of the addition in the vector space 
S, we have
        
        and therefore there exists 
 such that 
. By (
1), we obtain
        
        so that, by the known argument involving signs (the ratio is nonnegative when 
 and nonpositive when 
), we have (the existence of the limit is ensured by the assumption of differentiability)
        
Since 
y is arbitrary, we obtain 
.    □
 Remark 1.  
1. 
          The requirement of the closure of D in the assumptions of Theorem 1 appears just for the sake of simplicity. In fact, the statement holds as well assuming only that the set of the boundary points of D that belong to D are nonempty; if such set consists of a singleton, obviously, the assumption of f to be constant on the boundary must be dropped.
2. 
          From Theorem 1, in the case , , we obtain the classical Rolle’s theorem extended to functions of several variables, and we stress that, in the case , the classical assumption that the domain of the function is an interval can be dropped.
3. 
          In the special case in which S is a Hilbert space, by Riesz’s theorem, the linear operator  is identified with the gradient of f (element of S), and, therefore, in the assumptions of the theorem, there exists at least one point  interior to D such that . Moreover, we note that Theorem 1 can also be applied in the framework of infinite-dimensional Hilbert spaces to a function defined in the non-compact domain ; in fact, by (8.24 p. 267 [34]), the function  is Fréchet-differentiable at every point, and, therefore, we hold that f is in particular Gateaux-differentiable. This is well-known; however, for the sake of completeness, we recall here the short proof. We will apply the fact that, for all , it is , where by • we denote the scalar product in S. Sincewe haveThe value of f is 1 on the boundary of D, and, in this case, the point  is minimum for f and . 4. 
          The existence of  and , which appear in the assumptions of Theorem 1, is essential for the validity of the thesis. In fact, if we denote by  the closure of the complementary set of the unitary ball D considered in the previous point 
          3., the functionsatisfies all the assumptions of Theorem 1 except the existence of the maximum, and no point  exists, interior to , such that . It should be noted that, if , and  interior to  are orthogonal, we have , but the thesis states that the whole operator  is identically zero. 5. 
          We stress that Theorem 1 can be applied not only in the framework of Hilbert spaces but also in a class of Banach spaces (which again, as in the previous point 
          3., can be infinite-dimensional). Namely, from Theorem 8.13 p. 247, [34], we know that every separable Banach space admits an equivalent norm that is Gateaux-differentiable in every point . This implies that the function  is Gateaux-differentiable at every point (see, e.g., 8.18 p. 265, [34]), and, therefore, the same example shown in the previous point  
          3. 
          works also in this case. 6. 
          Recently ([35]), Rolle’s theorem has been extended to functions of several variables using a new definition of differentiability, which allows the thesis to be obtained even for points not necessarily interior to the domain. 7. 
          The conclusion of Theorem 1 still holds in the case of real functions that are continuous and Fréchet-differentiable in the interior points because, as already observed, they are also Gateaux-differentiable and the Fréchet differential equals the Gateaux differential.
 Theorem 2. Let f be a function defined in an interval  (closed, open, or semi-open) of extremes a and b (not excluding , nor ), continuous at interior points of I and endowed therein with a derivative, finite or not; in the extremes, let f be endowed with limit (finite or not).
If the limitsare equal, then there exists at least one interior point  of I such that .  Remark 2. In Theorem 2, the assumption that f has derivative at all interior points is essential for the validity of the thesis (see Example 3 below).
 Proof of Theorem 2. In the proof, we will rule out the existence of an interval  in which the function is constant since in such an eventuality the derivative is zero at all points of  and therefore the thesis is trivially verified.
Denoted by 
ℓ, the limit of 
f in the extremes of 
I, we first prove that
        
In order to prove (
3), we assume 
 because otherwise (
3) is trivially verified with 
 and 
. Having chosen a point 
 such that 
 (it exists since 
f is not constant), let us consider the sets
        
        since by continuity of 
f there exists a neighborhood of 
c in which the function does not take the value 
ℓ, such sets are nonempty, and setting
        
        we have 
; we show that in 
 the condition required in (
3) is satisfied. On the contrary, let us assume that there exists 
 such that
        
If 
, since 
 is not a minorant of 
, there exists 
 such that 
; then, we have 
 (by the meaning of 
), which is in contrast with (
6); on the other hand, if 
, since 
 is not a majorant of 
, there exists 
 such that 
; then, we have 
 (by the meaning of 
), which is in contrast with (
6). Hence, (
3) follows.
Now, in order to prove the first of (
4), let us assume 
 (if 
, then the first of (
4) holds because of the meaning of 
ℓ) so that 
 is an interior point of the interval 
I; then, by the continuity of 
f, the limit in the left-hand side exists and is equal to 
; if it were 
, there would exist 
 such that 
 and therefore also 
; hence, it would be 
 in conflict with the first of (
5). By a similar argument, we can prove the second of (
4).
Let us now denote by 
g the restriction of 
f to the interval 
 so that from (
4) we have
        
By the continuity of 
g, the range 
 is an interval since 
; the interval 
 is contained in one of the intervals 
, 
, precisely in the former if 
 and in the latter if 
 (we take these eventualities into account because it could be 
). It will suffice to examine the case 
 since for the other case the argument is entirely analogous.
We will prove that, in the present case, the function g is endowed with a minimum, and that the minimum is attained at a point  interior to J; after that, it will be easy to establish, by a classical argument, that . In the other case, where the proof is entirely analogous, the function is endowed with a maximum, attained at a point interior to J.
Setting  and , we have ; this is trivial if  or  is infinite; if both were finite, it would be ; the function would be constant, which we ruled out from the beginning.
Let us show that 
, which is obvious if 
 since in such case the function is not upper-bounded; if 
, having assumed 
, the number 
ℓ is a majorant of 
g, and it is the minimum of majorants; in fact, by (
7), taking into account the definition of limit, for every 
, there exist points 
 such that 
.
Having shown that 
, (
7) becomes
        
On the other hand, if 
 is finite [if 
], for every 
, there exists 
 such that
        
        and therefore
        
We may assume that the sequence 
 is regular since there exists in any case a convergent or divergent extract sequence that can be denoted by the same symbol; hence, we are allowed to set 
.
We show that 
 is not an extreme of the interval 
; if it were 
, since the limit of 
 exists as 
 and 
 is a sequence of points of the open interval 
 having 
 as limit, by (
9), we would have
        
        which is contrary to (
8) since 
; similarly, we conclude that 
.
Therefore, as to the point 
 of the interval 
, we have
        
        hence, by the continuity of 
g,
        
Therefore, 
 is the minimum of the function 
g.
By assumption, the following limit exists (finite or infinite):
        
        and we can conclude that 
; if it were 
[
], there would exist a neighborhood 
 such that in 
 the difference quotient of 
g would be positive [negative], which is absurd because the numerator is nonnegative while the denominator is positive for 
 and negative for 
. The theorem is thus acquired.    □
 Example 1. The function f, known as the Witch of Agnesi, defined by (see, e.g., [36])satisfies the assumptions of Theorem 2. We note that .
  Example 2. The function  satisfies the assumptions of Theorem 2. We note that the derivative is infinite in the points , 1, and that .
 Example 3. The function  satisfies the assumptions of Rolle’s theorem except for the existence of the derivative at every point inside the definition interval since at point 0 (only at point 0) f is not derivable. The example proves that the thesis cannot hold because the derivative function of f is not zero at any point.
 The standard application of Rolle’s theorem is Lagrange’s theorem with distinct limits in the extremes of the interval of definition of f (in the case of equal limits, Lagrange’s theorem becomes exactly Rolle’s theorem). In an analogous fashion, we have
Theorem 3. Let f be a function defined in a bounded interval  (closed, open, or semi-open) of extremes a and b, continuous at interior points of I and endowed therein with the derivative function having a limit (finite or not) at every point of , finite or not; in the extremes, let f be endowed with limit (finite or not).
If the limitsare distinct, then there exists at least one point  such that  Remark 3.  
1. 
          In Theorem 3, the assumption that the interval I is bounded is essential for the validity of the thesis (see Example 4 below).
Since each of the limits in (10) can be , it should be noted that the left-hand side of (11) is not an indeterminate form (recall that by assumption the two limits are distinct). Furthermore, if the point ξ is interior to the interval or it is an extreme belonging to the interval, the limit on the right-hand side is equal to , even if ; in fact, this can be deduced from the definition of derivative at the point ξ, applying L’Hospital’s theorem (see, e.g., Theorem 5.13 p. 109, [33]). Moreover, it is obvious that, if ξ is an extreme of the interval and it does not belong to it, the function is not defined there and therefore it does not make sense to consider .
2. 
          If the limits in the left-hand side of (11) are finite and, at the interior points of I, the function f is derivable, the point ξ in the right-hand side is interior to , and it is sufficient to apply Lagrange’s classical theorem to the continuous extension on  of the restriction of f to .  Proof of Theorem 3. For any compact interval 
, if 
f is derivable at the interior points of 
, by the classical Lagrange’s theorem, there exists at least one point 
c interior to 
 such that
        
        we observe that this assertion is valid also in the case that there are points interior to 
 where the derivative of 
f is infinite; this can be proved, using Theorem 2 acquired above, by the same procedure usually carried out to prove the classical Lagrange’s theorem.
Now, for each 
, 
, let us consider the restriction of 
f to the compact interval 
; because of what has just been observed, there exists at least one point 
 interior to 
 such that
        
Since the subsequence 
 is bounded because the interval 
I is bounded, we can assume that it is convergent (since in the opposite case we can replace 
 by a convergent extract sequence); on the other hand, denoted by 
 the limit of 
, by our assumption, there exists 
 so that the limit of the subsequence 
 also exists and we have
        
Therefore, from (
12), passing to the limit as 
, we deduce (
11), and the assertion is proved.    □
 Example 4. The arcotangent function satisfies the assumptions of Theorem 3, except that the domain is bounded; it is immediate to see that for this function the thesis of the theorem does not hold. In fact, it asserts the existence of a point  for whichi.e.,If , the limit on the right-hand side is a positive number and (13) is false, while, if , the limit is 0 and (13) does not make sense. Considering the restriction of the arcotangent function at the interval , we obtain an example with the domain lower-bounded but not upper-bounded in which the thesis of the theorem does not hold. Analogously, we could consider the restriction of the arcotangent function at the interval , obtaining an example with the domain upper-bounded but not lower-bounded.
 Next result involves the well-known notion of weak derivative of a function 
f. For a given function 
 (i.e., 
f is in 
 over all compact sets contained in the open interval 
), a function 
 is said to be weak derivative of 
f if
      
      where, as usual, by 
, we denote the set of functions differentiable infinitely many times, and having compact support in the interior of 
I. Since this notion extends the classical notion of derivative and it agrees with the classical one whenever the classical derivative exists and is continuous (see, e.g., [
37] and Theorem 6.10, p. 136, [
38]), the function 
w, which can be proved to be uniquely determined, is denoted by the standard symbol 
.
Theorem 4. Let f be a continuous function at the interior points of the interval  (closed, open, or half-open, and bounded or not bounded), endowed in  with a weak derivative belonging to . If f is convergent in the extremes of the interval andthenand therefore  Obviously, under the assumptions of the theorem, in the case the interval is bounded, the thesis means that the mean integral of  is equal to zero.
In the special case in which  has a continuous representative in , let us again call it ; the thesis implies that there exists a point  such that ; hence, for such class of functions, Theorem 4 is a generalization of Rolle’s theorem.
Proof of Theorem 4. Fixed two sequences 
 and 
 of points of 
 such that 
 and 
; we will use the relation
        
The function 
f, being endowed in 
 with a weak derivative in the compact interval 
, is absolutely continuous; hence, it is derivable so there exists a set 
 of null Lebesgue measure such that 
f is derivable in 
; consequently, setting 
, the function 
f is derivable in every point of 
; hence, it is derivable a.e. in 
. Denoting by 
 the classical derivative of 
f, and by 
 a representative of the class 
 (which denotes the weak derivative of 
f), we have
        
On the other hand, since in the interval 
 the function 
f is an absolutely continuous function, primitive of 
, we have 
, and, therefore, by (
17),
        
Hence, (
16) becomes
        
Such relationship holds for every 
, and, passing to the limit as 
 and taking into account (
14), we obtain (
15), and the theorem is proved.    □
 Example 5. The function  does not satisfy the assumptions of Theorem 2 (see Example 3), but it satisfies the assumptions of Theorem 4 because its weak derivative is (see, e.g., Theorem 6.17, p. 152, [38])We note that the integral of  over  equals zero.  Remark 4. The standard application of Rolle’s theorem is Lagrange’s theorem. In the assumptions of Theorem 4, and if, moreover, the interval  is bounded, denoting by  the integral mean of  in , the thesis (15) can be written equivalently asso that Theorem 4 is a generalization of Lagrange’s theorem because on the right-hand side the value of  in a suitable point of  (which would be meaningless) is replaced by the integral mean of  in . Hence, Theorem 4, with the further assumption of the boundedness of the interval, can also be considered an application of Rolle’s theorem.  Let us now denote by 
I an open interval of 
 and by 
 the following subspace of 
:   
We have
Theorem 5. Let  be an open interval, T be a distribution over I, and  be the derivative of T. If there exist  such that  and , then there exists  such that  Proof.  Let 
 denote the open interval 
I. We will prove the assertion setting 
 equal to the primitive function of 
 defined by
        
In order to show that 
, first, we observe that 
. Then, denoted by 
, an interval in 
 containing the supports of 
 and 
, it is obvious that 
 in 
; on the other hand, 
 also in 
 because 
, and, therefore, for each 
, we have
        
Property (
18) is a direct consequence of the definition of derivative of a distribution and of the assumption 
; in fact, 
.    □
 At last, we highlight a special case of Theorem 5. Let 
 (i.e., 
f is 
 over all compact sets contained in 
), 
 be the distribution on 
 associated with 
f, i.e.,
      
      and, finally, let 
 be the derivative of 
:
      that is, the derivative of 
f in the sense of distributions.
In the case , Theorem 5 reads as follows.
Theorem 6. Let . If  are such that  andthen there exists  such thatIn particular, if f has a weak derivative, then there exists  such that  Example 6. The functionsand  on  satisfy the assumptions of Theorem 6 after noticing that  and  are odd functions. The expression of  has been chosen to be equal to the derivative of the well-known Friedrichs mollifying kernel (see, e.g., p. 258, [39])which is known to be . We note that  is odd, and, therefore,