# Intermediate value theorem and continuity

Show that if $f$ is continuous on $[0,1]$ with $f(0)=f(1)$, there must exist $x,y\in[0,1]$ with $|x-y|=\frac{1}{2}$ and $f(x)=f(y)$

I've been working on this for a while, and can't seem to figure out where to start. Any hints would be appreciated

Let $g$ be the function defined at $[0,\frac{1}{2}]$ by

$g:t\mapsto f(t)-f(t+\frac{1}{2})$.

we have

$g$ is continuous at $[0,\frac{1}{2}]$

and

$g(0).g(\frac{1}{2})=-(f(0)-f(\frac{1}{2}))^2\leq0$ since $f(0)=f(1)$.

then

$\exists x\in [0,\frac{1}{2}]\;$ such that $g(x)=0$ or

$f(x)=f(x+\frac{1}{2})=f(y)$.

with $y=x+\frac{1}{2}$ satisfying

$|y-x|=\frac{1}{2}$.

• Thanks, do you have any idea how to generalize it so $|x-y|=\frac{1}{n}$? Nov 1, 2016 at 17:05
• @Determinant21 You define $g$ from $[0,1-\frac{1}{n}]$. Nov 1, 2016 at 17:10
• So I tried that, and I get $g(0)=f(0)-f(\frac{1}{n})$ and $g(1-\frac{1}{n})=f(1-\frac{1}{n})-f(0)$ Since $f(\frac{1}{n})$ and $f(1-\frac{1}{n})$ could be different, I don't see how the rest of the argument follows. Nov 1, 2016 at 17:30
• @Determinant21 Ok i'll try to see that but not now. Nov 1, 2016 at 17:37