# If $f : [a,b]\to\Bbb R$ is continuous, are there $x_1,x_2\in (a,b)$ such that $\tfrac{f(b)-f(a)}{b-a} = \tfrac{f(x_1)-f(x_2)}{x_1-x_2}$?

I just thought about the mean value theorem and wondered whether the following statement is true:

If $f : [a,b]\to\Bbb R$ is continuous, then there are $x_1,x_2\in (a,b)$ such that $\tfrac{f(b)-f(a)}{b-a} = \tfrac{f(x_1)-f(x_2)}{x_1-x_2}$.

One way to look at it is to consider the function $F : \{(x,y) : x,y\in[a,b],\,y>x\}\to\Bbb R$, defined by $F(x,y) = \tfrac{f(x)-f(y)}{x-y}$. If there don't exist such $x_1,x_2$, then $(a,b)$ is a maximum of a minimum of $F$. But I don't know what to conclude from that. Does anybody have an idea?

• I think I have an argument (in the affirmative) if $f'$ is continuous. – Randall Sep 14 '18 at 15:00
• @Randall That would also be interesting. However, I really would like to assume only continuity of $f$. – amsmath Sep 14 '18 at 15:02
• @amsmath Did you check a singular strictly increasing function (it is proved that there exists such a function). A singular function is a function, which derivative is $0$ almost everywhere. – szw1710 Sep 14 '18 at 15:14
• @szw1710 No, I haven't. And such a function can be continuous? – amsmath Sep 14 '18 at 15:21
• @amsmath Yes, of course. See foe example a Cantor function. – szw1710 Sep 14 '18 at 15:26

I think this might be a rather geometric proof.

Consider a continuous function $f\colon [a,b]\to \mathbb{R}$. Let $\ell$ be the line that goes through the points $(a,f(a))$ and $(b,f(b))$.

If the graph of $f$ is equal to $\ell$ (or a segment of it, to be more precise), then there is nothing to prove. Note that in this case $$f(x) = \frac{f(b)-f(a)}{b-a}(x-a) +f(a).$$

If the graph of $f$ is not equal to the line $\ell$, then there is one point $(x,f(x))$ on the graph of $f$ that does not lie on the line segment.

Consider a line $\tilde \ell$ that is parallel to the line $\ell$ and lies "between" the point $(x,f(x))$ and the line $\ell$ (i.e. $\tilde \ell$ seperates the point $(x,f(x))$ and the line $\ell$). Now, since $f$ is continuous and the interval $[a,b]$ is connected, the graph of $f$ is also connected. Therefore, the graph of $f$ must intersect $\tilde \ell$ at a point $(x_1,f(x_1))$ with $x_1 \in (a,x)$ and also at another point $(x_2,f(x_2))$ with $x_2 \in (x,b)$. Since these two points lie on $\tilde \ell$, we have $$\frac{f(b)-f(a)}{b-a} = \frac{f(x_2)-f(x_1)}{x_2-x_1}.$$

• Beautiful proof. – szw1710 Sep 14 '18 at 15:29
• @szw1710 Thank you. – Ernie060 Sep 14 '18 at 15:35
• I'm slow this morning and feel a little lost. What's the reason for the "Therefore, the graph..." sentence? These two connected things could still fail to intersect, couldn't they? Also, is it clear that your $x_1$ isn't $a$ and the same for $x_2$ and $b$? I'm missing something obvious. – Randall Sep 14 '18 at 15:35
• @Randall No, because $(a,f(a))$ lies on $\ell$, where $(x_1,f(x_1))$ lies on $\tilde\ell$. – amsmath Sep 14 '18 at 15:43
• @Randall Since the line $\tilde \ell$ is different from $\ell$ and $a, b \in \ell$, $x_1$ and $x_2$ cannot be equal to $a$ or $b$ respectively. To prove the intersection, there is another argument. Let $c_1x+ c_2y +c_3 =0$ be the equation of $\tilde \ell$. Then consider the function $g(x) = c_1 x +c_2 f(x) + c_3$ on $[a,b]$. Then we have that $g(a) > 0$, $g(b)>0$ and $g(x) < 0$; or vice versa. By the intermediate value theorem for continuous functions, there must be two values where $g$ is zero. – Ernie060 Sep 14 '18 at 15:44

You can first prove a Rolle's-theorem-like theorem (Theorem $1$ below) and then prove a mean-value-theorem-like theorem as a corollary (Theorem $2$ below).

Theorem $1$: Let $f:[a,b]\to\Bbb R$ be continuous with $f(a)=f(b)$. Then there exists distinct points $x_1,x_2\in(a,b)$ such that $\frac{f(b)-f(a)}{b-a}=\frac{f(x_1)-f(x_2)}{x_1-x_2}$ (or more simply, $f(x_1)=f(x_2)$).

Proof: For non-triviality, assume $f$ is not constant. So either the maximum value or minimum value is not equal to $f(a)$. Choose a point $c\in(a,b)$ at where $f$ attains maximum/minimum with $f(c)\not=f(a)$. Choose a number $L$ strictly between $f(c)$ and $f(a)$. Then by intermediate value theorem, there exists $x_1\in[a,c]$ and $x_2\in[c,b]$ such that $f(x_1)=L$ and $f(x_2)=L$ and hence $f(x_1)=f(x_2)$. Both points are not equal to $c$ as $L\not=f(c)$ so they are distinct.

Theorem $2$: Let $f:[a,b]\to\Bbb R$ be continuous. Then there exists distinct points $x_1,x_2\in(a,b)$ such that $\frac{f(b)-f(a)}{b-a} = \frac{f(x_1)-f(x_2)}{x_1-x_2}$.

Proof: Define $g:[a,b]\to\Bbb R$, $g(x):=f(x)-\frac{f(b)-f(a)}{b-a}x$, which is continuous. A computation shows that $g(a)=g(b)$: $$g(a)-g(b)=f(a)-\frac{f(b)-f(a)}{b-a}a-\left(f(b)-\frac{f(b)-f(a)}{b-a}b\right)=0.$$

So $g$ satisfies the hypothesis of Theorem $1$. Find the two distinct points $x_1,x_2\in(a,b)$ with $g(x_1)=g(x_2)$.

The last equality says $$f(x_1)-\frac{f(b)-f(a)}{b-a}x_1=f(x_2)-\frac{f(b)-f(a)}{b-a}x_2,$$ which, upon a little manipulation, is the same as $$\frac{f(x_1)-f(x_2)}{x_1-x_2}=\frac{f(b)-f(a)}{b-a}.$$

• Note that there is no need to pick a maximum or minimum in Theorem 1; you can just use any $c$ such that $f(c)\neq f(a)$. – Eric Wofsey Sep 16 '18 at 6:51

First, without loss of generality assume that $f(a) = 0$(why can we do this?).

Next, set $h(x) = \frac{f(b)(x-a)}{b-a}$ on the interval $[a,b]$. This function is continuous. Note that $h(a) = 0$ and $h(b) = f(b)$.

Therefore, so is $g(x) = h(x) - f(x)$ on $[a,b]$. Note that $g(a) = 0$ and $g(b) = 0$.

Suppose there existed $x,y$ such that $g(x) = g(y)$ on $[a,b]$. Then, $h(x) - h(y) = f(x) - f(y)$, resulting in $\frac{f(b) - f(a)}{b-a} =\frac{f(x) - f(y)}{x-y}$, while noting that $f(a) = 0$.

Therefore, all we are reduced to proving is that there exist $x,y \in (a,b)$ such that $g(x) = g(y)$, for any continuous function $g$ on $[a,b]$ satisfying $g(a) =g(b) = 0$.

First of all, note that if $g$ is constant then of course we are done.

Without loss of generality, assume that $\max_{[a,b]} g(x) > 0$. (Otherwise, take $-g$). Now, the maximum is attained at a point $z$, where $z \in (a,b)$ (because $g$ is zero at the endpoints). If it is attained in two different points, then we are done by taking those two points. So we assume only one maximum exists.

Let $\delta > 0$ be such that $|y-z| < \delta \implies f(z)> f(y) > 0$. Let $y$ satisfy $|y-z| < \delta$, and $b > y > z$. Then define $l : [a,y] \to \mathbb R$ by $l(x) = g(x) - g(y)$. Note that $l$ is continuous, $l(a) < 0$ and $l(z) > 0$. So there exists $b \in (a,z)$ such that $l(b) = 0$ or that $g(b) = g(y)$. Hence, we are done.

EDIT : Here is the strengthening.

Let $g$ be a non-constant continuous function on $[a,b]$ such that $g(a) = g(b) = 0$(WLOG , $g(y) > 0$ for some $y$) . Let $z$ be any point at which $g(z) = \max_{[a,b]} g$(such a point exists, definitely). Let $d_z = \min\{z-a,b-z\}$. Then for all $v < d_z$, there exist points $x_1,x_2 \in (a,b)$ such that $x_1 - x_2 = v$ and $g(x_1) = g(x_2)$.

Proof : let $J(x)$ be defined on $(z-d_z,z+d_z)$ and be given by $J(x) = g(x) - g(x+v)$. Then, $J(z-v) \leq 0$ and $J(z) \geq 0$, so there is some point $l \in (z-v,z)$ such that $J(l) = 0$, or that $g(l) = g(l+v)$.

Note that if there are many maximums, then choosing a very central maximum(thus maximizing $d_z$) allows us to expand the range of values that $x_1 -x_2$ can attain.

• Thank you! Here is an easier way to see that the claim holds for $g$: Let $z$ be a maximum such that $g(z) > 0$. Then apply the intermediate value theorem on both $[a,z]$ and $[z,b]$ with $g(z)/2$. Done. :o) – amsmath Sep 14 '18 at 15:38
• It is funny, but actually I worked on this proof to prove something stronger. I will edit if required to add the strengthening. – Teresa Lisbon Sep 14 '18 at 15:39
• Yes, I would like to see what you mean. – amsmath Sep 14 '18 at 15:45
• I have provided a strengthening. – Teresa Lisbon Sep 14 '18 at 15:52
• Thank you! So you can even fix the distance between $x_1$ and $x_2$. Hope you are not angry on me if I now go and check ernie's answer. I can unfortunately only check one. :-( It is in principle the same, but it is more intuitive and shows an easy picture. I thank you for your time that you spent on my problem. – amsmath Sep 14 '18 at 16:08

I swear that I hadn't peeked at the contents of all above solutions before my idea was posted.The following is my thoughts.Well,maybe it's not concise,even redundancy.

Let us suppose that $$\forall x_{0}\in (a,b),s.t.\forall x\in(a,b)\setminus\{x_{0}\},\frac{f(x)-f(x_{0})}{x-x_{0}}\ne \frac{f(b)-f(a)}{b-a}.$$

Since $F(x)=\frac{f(x)-f(x_{0})}{x-x_{0}}-\frac{f(b)-f(a)}{b-a}$is continuous respectively on$(a,x_{0})$ and$(x_{0},b)$,$\forall x\in (a,x_{0}),F(x)>0$(or $\forall x\in (a,x_{0}),F(x)<0);$ similary,$\forall x\in (x_{0},b),F(x)>0$(or $\forall x\in (x_{0},b),F(x)<0).$ Then we can eliminate two cases( Case 1,Case 2) from above,remaining another two cases( Case 3,Case 4).

Case 1.$\forall x\in (a,x_{0}),F(x)>0$ and $\forall x\in (x_{0},b),F(x)<0;$

Case 2.$\forall x\in (a,x_{0}),F(x)<0$ and $\forall x\in (x_{0},b),F(x)>0;$

Case 3.$\forall x\in (a,x_{0}),F(x)>0$ and $\forall x\in (x_{0},b),F(x)>0;$

Case 4.$\forall x\in (a,x_{0}),F(x)<0$ and $\forall x\in (x_{0},b),F(x)<0.$

We only need to proof that Case 1 doesn't really exist,since Case 2 is similar to Case 1.

In fact,

$(1)\quad$$\forall x\in (a,x_{0}),\frac{f(x)-f(x_{0})}{x-x_{0}}>\frac{f(b)-f(a)}{b-a}.$$ $$\quad\Rightarrow \forall x\in (a,x_{0}),s.t.\frac{f(y)-f(x)}{y-x}>\frac{f(b)-f(a)}{b-a},y\in(x,b).$$$(2)\quad$$\forall x\in (x_{0},b),\frac{f(x)-f(x_{0})}{x-x_{0}}<\frac{f(b)-f(a)}{b-a}$$ $$\quad\Rightarrow \forall x\in (x_{0},b),s.t.\frac{f(y)-f(x)}{y-x}<\frac{f(b)-f(a)}{b-a},y\in(a,x).$$

Then we can choose $$p\in (x_{0},b),q\in(a,x_{0}),s.t.\frac{f(p)-f(q)}{p-q}>\frac{f(b)-f(a)}{b-a}>\frac{f(q)-f(p)}{q-p}.$$$${\color{red}{Contradicted!}}$$

The finally,We only need to proof that Case 3 also doesn't really exist,since Case 4 is similar to Case 3.
In fact, If we assume that Case 3 is feasible,then $$\forall x_{0}\in(a,b),s.t. \frac{f(x)-f(x_{0})}{x-x_{0}}>\frac{f(b)-f(a)}{b-a},x\in (a,b)\setminus\{x_{0}\}.$$

$(3)$$\lim_{x\rightarrow a^{+}} \frac{f(x)-f(x_{0})}{x-x_{0}}= \frac{f(a)-f(x_{0})}{a-x_{0}}\geq \frac{f(b)-f(a)}{b-a}.$$and$(4)$$$\lim_{x\rightarrow b^{-}} \frac{f(x)-f(x_{0})}{x-x_{0}}= \frac{f(b)-f(x_{0})}{b-x_{0}}\geq \frac{f(b)-f(a)}{b-a}.$$ Since $$\frac{a}{b}<\frac{c}{d},bd>0\Rightarrow \frac{a}{b}<\frac{a+c}{b+d}<\frac{c}{d},\quad (*)$$$(5)$$\text{If}\quad \frac{f(b)-f(x_{0})}{b-x_{0}}\geq \frac{f(a)-f(x_{0})}{a-x_{0}},$$then $$\frac{f(b)-f(a)}{b-a}\geq \frac{f(a)-f(x_{0})}{a-x_{0}} \stackrel{(3)}{\Rightarrow}\frac{f(b)-f(a)}{b-a}=\frac{f(a)-f(x_{0})}{a-x_{0}};$$

$(6)$ $$\text{If}\quad\frac{f(b)-f(x_{0})}{b-x_{0}}\leq \frac{f(a)-f(x_{0})}{a-x_{0}},$$then $$\frac{f(b)-f(a)}{b-a}\geq \frac{f(b)-f(x_{0})}{b-x_{0}} \stackrel{(4)}{\Rightarrow}\frac{f(b)-f(a)}{b-a}=\frac{f(b)-f(x_{0)}}{b-x_{0}}.$$

The next,we can classify Case 3 into there distinct subcases.

Case 3(1) $$\forall x_{0}\in(a,b),s.t.\frac{f(b)-f(x_{0})}{b-x_{0}}\geq\frac{f(a)-f(x_{0})}{a-x_{0}}\stackrel{(5)}{\Rightarrow}f(x)=mx+n,x\in(a,b].$$ $${\color{red}{Contradicted！}}$$ Case 3(2) $$\forall x_{0}\in(a,b),s.t.\frac{f(b)-f(x_{0})}{b-x_{0}}\leq\frac{f(a)-f(x_{0})}{a-x_{0}}\stackrel{(6)}{\Rightarrow}f(x)=kx+l,x\in[a,b).$$ $${\color{red}{Contradicted！}}$$ Case 3(3) $$\exists x_{1},x_{2}\in(a,b),x_{1}\ne x_{2},$$ $$s.t.\frac{f(b)-f(x_{1})}{b-x_{1}}> \frac{f(a)-f(x_{1})}{a-x_{1}}\text {and} \frac{f(b)-f(x_{2})}{b-x_{2}}<\frac{f(a)-f(x_{2})}{a-x_{2}}$$ $$\stackrel{(5)}{\Rightarrow}\frac{f(b)-f(a)}{b-a}=\frac{f(a)-f(x_{1})}{a-x_{1}} < \frac{f(b)-f(x_{1})}{b-x_{1}}\stackrel{(*)}{\Rightarrow}\frac{f(b)-f(a)}{b-a}<\frac{f(b)-f(a)}{b-a}.$$ $${\color{red}{Contradicted！}}$$

• Thank you for your answer and for your time. – amsmath Sep 16 '18 at 14:47