# $f:[0,1]\to [0,1]$ continuous then exists $x_0\in [0,1]$ such that $f(x_0) = x_0$

I need to prove the following:

$f:[0,1]\to [0,1]$ continuous then exists $x_0\in [0,1]$ such that $f(x_0) = x_0$

$f$ continuous, then there are $x_1,x_2$ such that $f(x_1)=0$ and $f(x_2)=1$ and by the mean value theorem there exists $c\in [0,1]$ such that $0\le f(c)\le 1$ but I couldn't find any relation to what I want to prove. I also imagined that if $f(x)=x$ then it's proved, but if not, then there should exist one point $p$ such that $f'(p)=\frac{\sqrt{2}}{2}$ but that does not use mean value theorem. Any ideas on how to prove it?

• Hint: Let $g(x)=f(x)-x$. $g(0)≥0$ and $g(1)≤0$ – lulu Jul 3 '16 at 19:45
• I don't think you can assume $f$ is onto. – David Mitra Jul 3 '16 at 19:47
• Use the hint given by lulu and the rest is goes the same as this – Piotr Benedysiuk Jul 3 '16 at 19:50
• "f continuous then there are x1 and x2 such f (x1)=0 and f (x2) =1". D o you honestly believe that? What about f (x) = 1/2. That's continuous. As is f (x) =1/3 x + 1/4 and many others. More to the point there exist an x1 and x2 where f (x1)=f (0) and f (x2)= f (1). – fleablood Jul 4 '16 at 1:05
• There should be a point p so that f'(x) = root(2)/2? Why? – fleablood Jul 4 '16 at 1:15

First define $g(x)=f(x)-x$. Now $g(0)=f(0)-0=f(0)\geq 0$ and $g(1)=f(1)-1\leq 1$.
Now if either $g(0)=0$ or $g(1)=0$, then we have $f(0)=0$ or $f(1)=1$ respectively, so we can assume $g(0)>0$ and $g(1)<0$. Now $g$ is continuous on $[0,1]$ since $f$ is continuous, so we can apply the Intermediate Value Theorem, which gives us that $g(a)=0$ for some $a\in (0,1)$. Choosing $c=a$ we have that $$f(c)=g(c)+c=c$$