Suppose that $f \colon [a, b] \to [a, b]$ is continuous. (Note that the range of $f$ is a subset of $[a, b]$)
$a) $Prove that there exists at least one point $x \in [a, b]$ such that $f(x) = x$. A point with this property is known as a fixed point of $f$.
$b)$ what happen if $X$ equals $[0,1) $or $(0,1)$ ?
my answer :
for $ a)$ :If $f(a)=a$ or $f(b)=b$ then we are done, suppose $f(a)\ne a, f(b) \ne b$
Now what can you say about $g$ below? does it vanish somewhere in $(a,b)$?
$g(x)=f(x)-x$
For $b)$ i don't know ,,,pliz help me...
The range is $[a,b]$, not a subset of $[a,b]$.
a) Let $g(x)=f(x)-x$. Then $g(a)\geqslant 0\geqslant g(b)$. Therefore, $g(c)=0$ for some $c\in[a,b]$, and this means that $f(x)=c$.
b) Let $f(x)=\frac12(x+1)$. The $f\bigl([0,1)\bigr)\subset[0,1)$, but the equation $f(x)=x$ has no solutions in $[0,1)$. Or in $(0,1)$.