Problem Prove or disprove the following:
Let $f : X \to X$ be a continuous function from a complete metric space $(X, d)$ into itself such that $d(f(x), f(y)) < d(x, y)$ whenever $x\neq y$. Then $f$ has a fixed point.
A fixed point of a function is an element of the function's domain that is mapped to itself by the function.
Attempt If we define $f(x)=x+\frac{1}{x} $ with domain in $ [1,\infty )$ then $d(f(x),f(y))<d(x,y)$. Then we can easily see that $f$ hasn't fixed point.
Is it correct enough?
Don't confuse with @Darman's answer. Actually that was my previous attempt.
@Darman's answer is perfectly correct.
No. With your assumption your state isn't true.
If you define $f(x)=x+\frac{1}{x} $ with domain in $ [1,\infty )$ then $d(f(x),f(y))<d(x,y)$, because
$|x+\frac{1}{x}-y-\frac{1}{y}|<|x-y| \Leftrightarrow|\frac{yx^2+y-xy^2-x}{xy}|<|x-y| \Leftrightarrow \frac{|xy(x-y)-(x-y)|}{|xy|}<|x-y| \Leftrightarrow |(xy-1)||x-y|<|xy||x-y| \Leftrightarrow |xy-1|<|xy| \Leftrightarrow -1<0$
So this function have the assumption but if $f(x_0)=x_0$,
$x_0+\frac{1}{x_0}=x_0 $ and this is a contradiction