$d(x,y)= \begin{cases} 0 &\mbox{if } x=y \\ 1+\frac{1}{x+y} & \mbox{if } x\neq y \end{cases} $.
Show that $(\mathbb{Z}^+,d)$ is a metric space.
I'm stuck in proving triangle inequality.
$d(x,y)= \begin{cases} 0 &\mbox{if } x=y \\ 1+\frac{1}{x+y} & \mbox{if } x\neq y \end{cases} $.
Show that $(\mathbb{Z}^+,d)$ is a metric space.
I'm stuck in proving triangle inequality.
The triangle inequality is $d(x,y)\leq d(x,z) + d(z,y)$. If any two of $x$, $y$, and $z$ are equal then the triangle inequality holds. Suppose then that $x$, $y$, and $z$ are distinct, in which case the triangle inequality reads $$ 1 + \frac{1}{x+y} \leq 1 + \frac{1}{x+z} + 1 + \frac{1}{z+y}. $$ Subtracting the $1$ gives $$ \frac{1}{x+y} \leq 1 + \frac{1}{x+z} + \frac{1}{z+y}, $$ and that inequality is what we would like to prove. I think you're overthinking it: in fact, the weaker inequality $$ \frac{1}{x+y} \leq 1 $$ is true when $x$ and $y$ are in $\mathbb Z^+$.