# Real Analysis; prove $f(x)=x$ has at least one solution.

I'm having trouble proving this:

Given $f(x)$ is continuous on $\left[a,b\right]$ and $a \lt f(x) \lt b$. Prove that the equation $f(x)=x$ has at least on solution on $\left[a,b\right]$.

Here's what I tried doing:

Proof:

Let $f(x)$ be continuous on $\left[a,b\right]$ and $a \lt f(x) \lt b$. Let $F(x)=x$.
Note, by Intermediate Value Theorem, Since $a \lt b$ and $a \lt F(x) \lt b$, then $\exists c \in \left(a,b\right)$ such that $f(c)=x$.

My logic is a bit confusing and not sure if I'm supposed to use $I.V.T.$ here.

• You have the right idea using the intermediate value theorem, but you have to be a bit more careful. Consider the function $g(x) = f(x) - x$, what do you know about $g(a)$ and $g(b)$? – Nigel Overmars Apr 16 '17 at 19:42
• You need to assume $f \colon [a,b] \to [a,b]$, otherwise this is false. – Michał Miśkiewicz Apr 16 '17 at 19:48
• @NigelOvermars with that approach, g(a)=f(a)-a / g(b)=f(b)-b on [a,b]. Then a solution c, should be: f(a)-a < c < f(b)-b ? – Ali Raza Apr 16 '17 at 20:04

This is a classic question that pops up in almost every Analysis course. Let $f:[a,b] \to [a,b]$ be a continuous function. Define the function $g$ by $g(x) = f(x) - x$, which is also continuous, we will show that there exists a $\xi$ such that $g(\xi)=0$ and hence $f(\xi) = \xi$.
First we evaluate $g$ at $x=a$, this gives $g(a) = f(a) - a$, if $f(a)= a$, then we are done. If not, then we necessarily must have that $g(a) = f(a) - a > 0$, since $f(a) \in (a,b]$. Similarly, we have that $g(b) = f(b) - b < 0$, since $f(b) \in [a,b)$ if $f(b)$ is not equal to $b$. (if it were, then we'd be again done)
So we have $g(b) < 0 < g(a)$, by the intermediate value theorem there exists an $\xi \in [a,b]$ such that $g(\xi) = 0$, but this implies that $f(\xi) = \xi$ and hence we have found a fixed point.