[Math] Prove that a continuous function has a fixed point

real-analysis

Suppose that $a < b$ and $f: [a,b] \to\mathbb{R}$ is a continuous function such that the range of $f$ contains $[a,b]$. Prove that $f$ has a fixed point.

I've already proved the case of $[0,1]$ but I don't know how to do the general case. Help.

Proof for $[0,1]$:

Let $g(x)=f(x)-x$, then $g(0)=f(0)\geq 0$, and $g(1)=f(1)-1\leq 0$.

Otherwise, by using IVT, there must exist some $c$ in $[0,1]$ such that $g(c)=0$ meaning that $f(c)=c$.

Best Answer

By simply assuming that the range of $f$ contains $[a,b]$ pick $x_1,x_2$ such that $f(x_1)=\min_{[a,b]}f(x)$ and $f(x_2)=\max_{[a,b]}f(x)$ (which exist by Extreme Value Theorem). Since $f(x_1)\leq a$ and $f(x_2)\geq b$, apply your reasoning with $g(x)=f(x)-x$ on $[x_1,x_2]$ (or $[x_2,x_1]$) with the IVT.