# Prove that there is a point $x\in [0,1]$, such that $f(x)=g(x)$. [duplicate]

This question already has an answer here:

Let $f:[0,1]\rightarrow[0,1]$ and $g:[0,1]\rightarrow[0,1]$ be continuous functions satisfying $f\circ g =g\circ f$. Prove that there is a point $x\in [0,1]$, such that $f(x)=g(x)$.

I have thought two things

1) I have that for every continuous function $f:[0,1]→[0,1]$ there exists $y∈[0,1]$ such that $f(y)=y$, then $f,g, f\circ g$ have fixed points.

2)let $h(x)=f(x)-g(x)$ if there exists $a,b \in [0,1]$ such that $h(a)<0$ and $h(b)>0$ Hence, by the intermediate value theorem, $h$ must equal $0$ at some point $c \in [0,1]$.

the problem is that I can not find a, b that meets those conditions.

## marked as duplicate by Paramanand Singh, Lord Shark the Unknown, Rafa Budría, user91500, mrpJun 10 '17 at 9:48

• I'm not entirely sure yet as to how to prove this, but I can already tell you your approach won't work. Consider for example the constant functions $f(x) = g(x) = 1$, then $h(x) = 0$ everywhere so there is no such $a,b$. – Demophilus Jun 8 '17 at 23:53
Suppose $h(x)=f(x)-g(x)$ has no zero in $[0,1]$.Therefore, WLOG you may assume $h(x) > 0$ for all $x \in [0,1]$. Thus since $h$ is continuous on the compact interval $[0,1]$ you can find $\delta >0$ such that $h(x) \ge \delta$ for all $x \in [0,1]$, this shows $f(x)\ge \delta +g(x)$ for all $x \in [0,1].$ Now pick a fix $x \in [0,1]$ then $$f(f(x)) \ge \delta + g(f(x)) = \delta + f(g(x)) \ge 2\delta +g(g(x)) \ge 2\delta$$ continuing this process for all $n \in N$ you get $$f^{(n)} (x) \ge n \delta$$ Which is a contradiction! Since LHS does not exceed $1$.