1. ## Intermediate Value Theorem

Hi,for this question I can visualize what it is asking but I'm having troubles writing a formal proof for it.

Suppose that $f$ is continuous on the closed interval [0,1] and that $0 \leq f(x) \leq1$ for every $x$ in [0,1]. Show that there exists a real number $c \in [0,1]$ such that $f(c) = c.$
I was thinking of applying the intermediate value theorem to g(x) = f(x) - x, but I just keep getting stuck.

Any help will be highly appreciated

2. $g(0)=f(0)\geq 0$

$g(1)=f(1)-1\leq 0$

g is also continuous and $g(0)g(1)\leq 0$

so $\exists c\in[0,1]$ such as $g(c)=0\Rightarrow f(c)=c$