1. Proving a metric

To prove that a function is a metric, I must show that:

$
\frac{|x-z|}{1+|x-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|} \quad \forall x,y,z \in \Re
$

However, I cannot quite get there. Here's what I come up with:

$
\frac{|x-z|}{1+|x-z|}
= \frac{|x-y+y-z|}{1+|x-y+y-z|}
\le \frac{|x-y|+|y-z|}{1+|x-y+y-z|}
$

$
= \frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} = \ldots
$

Any nudge in the right direction is appreciated. Thanks.

2. Originally Posted by drumist
To prove that a function is a metric, I must show that:

$
\frac{|x-z|}{1+|x-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|} \quad \forall x,y,z \in \Re
$

However, I cannot quite get there. Here's what I come up with:

$
\frac{|x-z|}{1+|x-z|}
= \frac{|x-y+y-z|}{1+|x-y+y-z|}
\le \frac{|x-y|+|y-z|}{1+|x-y+y-z|}
$

$
= \frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} = \ldots
$

Any nudge in the right direction is appreciated. Thanks.
$
\frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} \leq \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$
.

3. Originally Posted by Sampras
$
\frac{|x-y|}{1+|x-y+y-z|} + \frac{|y-z|}{1+|x-y+y-z|} \leq \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$
.
Sorry but I just don't see how that is true. How can you claim that $|x-y+y-z| \ge |x-y|$?

4. So, I just did some crunching, and it turns out that $\frac{|x-y|+|y-z|}{1+|x-y+y-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$ is NOT a true statement, so clearly I'm on the wrong track from the beginning. (Use x=1, y=2, z=0 for a counterexample.)

5. Lemma:
$\begin{gathered}
0 \leqslant a \leqslant b \Rightarrow \quad a + ab \leqslant b + ab \hfill \\
\Rightarrow \quad a(1 + b) \leqslant b(1 + a) \Rightarrow \quad \frac{a}
{{1 + a}} \leqslant \frac{b}
{{1 + b}} \hfill \\
\end{gathered}$

Using that lemma, we know that $|x-z|\le |x-y|+|y-z|$ so

$\frac{{\left| {x - z} \right|}}
{{1 + \left| {x - z} \right|}} \leqslant \frac{{\left| {x - y} \right| + \left| {y - z} \right|}}
{{1 + \left| {x - y} \right| + \left| {y - z} \right|}} \leqslant \frac{{\left| {x - y} \right|}}
{{1 + \left| {x - y} \right|}} + \frac{{\left| {y - z} \right|}}
{{1 + \left| {y - z} \right|}}$

6. Originally Posted by drumist
So, I just did some crunching, and it turns out that $\frac{|x-y|+|y-z|}{1+|x-y+y-z|} \le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}$ is NOT a true statement, so clearly I'm on the wrong track from the beginning. (Use x=1, y=2, z=0 for a counterexample.)
You're problem here was the confusion of what the actual metric is. Let $d(x,y)=\frac{|x-y|}{1+|x-y|}$ then to show that the triangle quality hold here you must show that $\frac{|x-y|}{1+|x-y|}=d(x,y)\leqslant d(x,z)+d(y,z)=\frac{|x-z|}{1+|x-z|}+\frac{|y-z|}{1+|y-z|}$. You, probably used to using the triangle inequality for the usual metric on $\mathbb{R}$, automatically thought you must mess with the $|x-y|$'s.