I'd like to show that for $f:I\to I$, where $I$ is compact, with $|f(x)-f(y)|<|x-y|\,\,\forall x\neq y\in I$ there exists a unique fixed point.
My first idea was using the mean value theorem and $|f(x)-f(y)|\leq \sup_{\xi\in I}|f'(\xi)|\,|x-y|$. But since $f'$ is not continuous I cannot say $\sup_{\xi\in I}|f'(\xi)|=\max_{\xi\in I}|f'(\xi)|$.
The second idea was to show that $g(x)=|f(x)-x|$ is continuous on $I$ and therefore it attains its infimum (is clear for me). But I'm not able to show that it attains zero.
Thanks for your help.
Let $g(x)=|f(x)-x|$ for $x\in I$.
$g$ is continuous: since $|g(x)-g(y)|\leq |f(x)-f(y)|+|x-y|\leq2|x-y|$ for all $x,y\in I$.
Existence. Since $I$ is compact, there exists $x_0\in I$ such that $g(x_0)=\inf_{x\in I}g(x)$. If $g(x_0)=0$, we are done. If $g(x_0)>0$ then $f(x_0)\neq x_0$ and $$g(f(x_0))=|f(f(x_0))-f(x_0)|<|f(x_0)-x_0|=g(x_0),$$ contradicting with the definition of $x_0$. Therefore, $g(x_0)=0$ and thus $x_0$ is a fixed point of $f$.
Uniqueness. If $x_1\neq x_2\in I$ are both fixed points, then $|f(x_1)-f(x_2)|=|x_1-x_2|$, contradicting with the hypothesis.