Does there exists a continuous non-decreasing function $f$ such that $|x-z|\leq f(|x-y|)+|y-z|$? Does there exist a continuous non decreasing function $f:[0,\infty)\longrightarrow \mathbb R$ with $g(0))=0$ such that
$$|x-z|\leq f(|x-y|)+|y-z|$$
for all $x,y,z\in X$ where $X$ is some subset of $\mathbb R$.
I am looking for the function other than $f(x)=x$, and other integer powers of $x$.
I tried to set $f(x)=\sqrt x$, and looking for the subset $X$ where the following inequality is true for all $x,y,z\in X$:
$$|x-z|\leq\sqrt{|x-y|}+|y-z|$$
Does there exists such a subset $X$ of $\mathbb R$?
Wolfram shows this.
 A: It may be easier to express your inequality as:
$$f(|x-y|) \ge |x-z| - |y-z|$$
To convert the absolute values into $\pm$ signs, there are six possible orderings of $x$, $y$, and $z$ to consider:

*

*$x \le y \le z \implies f(y - x) \ge - x + y$

*$x \le z \le y \implies f(y - x) \ge - x - y + 2z$

*$y \le x \le z \implies f(x - y) \ge - x + y$

*$y \le z \le x \implies f(x - y) \ge x + y - 2z$

*$z \le x \le y \implies f(y - x) \ge x - y$

*$z \le y \le x \implies f(x - y) \ge x - y$
The four versions of the inequality that do not involve $z$ have the form $f(t) \ge t$ or $f(t) \ge -t$.  But since $t = |x - y| \ge 0$, then $f(t) \ge t$ will simultaneously satisfy both.  It can also be shown to be consistent with the other two orderings where $z$ is in the middle.

*

*$x \le z \le y \implies y - x \ge - x - y + 2z$

*$y \le z \le x \implies x - y \ge x + y - 2z$
So, you just need to have $\forall t \ge 0:f(t) \ge t$.  As @PhoemueX pointed out in their comment, this can be easily satisfied with $f(t) = ct$ where $c \ge 1$.
But other functions would work too.  For example, $f(t) = t^2 + t$.
A: Take a continuous function $f:\mathbb{R}_+\to \mathbb{R}_+$ such that
$$t\leq f(t)$$ (e.g. $f(t):=t$ or $f(t):=(t+1)^2 $ ). then by using the triangle inequality together with $t\leq f(t)$:
$$|x-z| = |x-y+y-z| \leq |x-y|+ |y-z| \leq f(|x-y|)+ |y-z| $$
