# Spivak's Calculus Chapter 7, Problem 19(a) : a logical question

The problem is as follows:

Suppose that $$f$$ is continuous on $$[0,1]$$ and $$f(0) = f(1)$$. Let $$n$$ be any natural number. Prove that there is some number $$x$$ such that $$f(x)=f(x + \frac{1}{n}).$$

I was wondering if my proof was logically sound, especially the last bit. I tried to apply the logic of the Intermediate Value Theorem, but was curious as to whether the contradiction in the end actually gives me the result I want:

Let $$g$$ be a function such that $$g(x) = f(x+\frac{1}{n}) - f(x)$$. We want to show that there exists an $$x \in [0,1]$$ such that $$g(x) = 0$$. We prove by contradiction.

1. Assume $$\forall x \in [0,1], g(x) < 0.$$ Then for $$i = 0, 1, 2, ..., n$$ we have that $$g(\frac{i}{n}) < 0$$. Therefore, $$f(0) > f(\frac{1}{n}) > f(\frac{2}{n}) > ... > f(1),$$ which means that $$f(0) \neq f(1)$$.
2. By similar logic, it follows that $$g(x) > 0$$ cannot hold for all $$x \in [0,1]$$.

Hence, there must exist $$a,b \in [0,1]$$ such that $$a$$ and $$b$$ have different sign, i.e. $$g(a) \leq 0 \leq g(b)$$. By the Intermediate Value Theorem, there exists $$c$$ such that $$g(c) = 0$$, and we are done.

• The idea is completely sound, yet I cannot grasp the reasoning in (1): why if $\;g(x)<0\;$ for all $\;x\in[0,1]\;$ , we must have thet $\;f(0)>f\left(\frac1n\right)>\ldots etc.$ ? Where does this sequence of inequalities come from? – DonAntonio Mar 26 at 1:27
• @DonAntonio For $f(1/n)-f(0)<0$, $f(2/n)-f(1/n)<0$, etc. – fantasie Mar 26 at 1:33
• @DonAntonio . If $g<0$ then for $0\le j \le n-1$ we have $0>g(j/n)=f((j+1)/n)-f(j/n)$. – DanielWainfleet Mar 26 at 1:37
• Very nice. An alternate is that $\sum_{j=0}^{n-1}g(j/n)=\sum_{j=0}^{n-1}f((j+1)/n)-f(j/n)=f(1)-f(0)=0$, so the values $g(j/n)$ for $0\le j \le n-1$ cannot be all $+$ nor all $-.$ This is called the Horizontal Chord Theorem. – DanielWainfleet Mar 26 at 1:52

Here is a way to avoid the whole contradiction argument, at the cost of using another well-known theorem about continuous functions. Because $$f$$ is continuous on the closed interval $$[0,1]$$, it attains its maximum, say $$f(x_0)=M$$. Now $$g(x_0-\tfrac1n)=M-f(x_0-\tfrac1n)\geq0.$$ And $$g(x_0)=f(x_0+\tfrac1n)-M\leq0.$$ As $$g$$ is continuous, there exists $$x$$ between $$x_0-\tfrac1n$$ and $$x_0$$ such that $$g(x)=0$$.
The argument above does not work in principle if $$x_0-\tfrac1n<0$$, but that can be solved by defining $$g$$ as $$f(0)$$ outside of $$[0,1]$$.
• I thought of the curve climbing up from $f(0)$ up to the max (think of this as the first part) and the climbing down from the max to $f(1)$ (think of this as the second part). The horizontal distance between the two curves is $1$ at the bottom and $0$ at the max, so all distances are achieved in between. I struggled for a bit to make this into someting analytic, until I noticed that your $g$ is exactly what one needs. – Martin Argerami Mar 26 at 3:32