Does $d(x,y) = \log(1 + | x - y |)$ define a metric on $\mathbb{R}$? Help would be much appreciated here! I got as far as evaluating the following:


*

*$d(x,y) \geq 0$. Argument is that $(1 + |x - y|)$ doesn't produce negative values, since the $|x-y| \geq 0$ itself and, at most, it would be added to $1$. So this condition is satisfied!

*$d(x,y) = d(x,y)$. Since we have that $\log(1 + |x - y|) = \log(1 + |y - x|)$ by commutative of real numbers.
Now, here is where I am stuck. How can I demonstrate this algebraically?


*

*$d(x,y) = 0$ implies that $x = y$.


What I could do is $\log(1+|x - y|) = 0$. It seems that the only way this log can be zero, is if $1 + |x - y| = 1$. Therefore, it would $|x - y| = 0$ would rise naturally. Does it make sense?


*

*$d(x, y) \leq d(x,z) + d(z,y)$. What is left is add a zero to the inside of the modulo function and then try and break it into the triangle inequality. That is not working so well thus far, but here it goes: 
$\log(1 + |x - y|) = \log(1 + |x - z + z - y|)$ but then it turns out that:
$\log(1 + |x - z + z - y|) \leq \log(1 + |x - z| + |z - y|)$

The $d\left(x,y\right)=0$ proof is correct. For the triangle inequality, I would start out with the right hand side. Notice that
\begin{align*}
\log\left(1+\left|x-z\right|\right)+\log\left(1+\left|z-y\right|\right)&=\log\left(\left(1+\left|x-z\right|\right)\left(1+\left|z-y\right|\right)\right)\\
&=\log\left(1+\left|x-z\right|+\left|z-y\right|+\left|x-z\right|\left|z-y\right|\right).
\end{align*}
Recall that for all $a,b>0$, $\log\left(a\right)\ge\log\left(b\right)\iff a\ge b$. By the triangle inequality, $\left|x-y\right|\le\left|x-z\right|+\left|z-y\right|$, and so
\begin{align*}
1+\left|x-y\right|&\le1+\left|x-z\right|+\left|z-y\right|\\
&\le1+\left|x-z\right|+\left|z-y\right|+\left|x-z\right|\left|z-y\right|.
\end{align*}
Thus,
\begin{align*}
d\left(x,y\right)=\log\left(1+\left|x-y\right|\right)&\le\log\left(1+\left|x-z\right|+\left|z-y\right|+\left|x-z\right|\left|z-y\right|\right)\\
&=\log\left(1+\left|x-z\right|\right)+\log\left(1+\left|z-y\right|\right)\\
&=d\left(x,z\right)+d\left(z,y\right).
\end{align*}
