Find if a metric space complete Let $(\mathbb{R},d)$ be a metric space with a distance function $d(x,y)=|f(x)-f(y)|,$ where
$$
f(x) = 
\begin{cases} 
&\displaystyle\frac{1}{x-2}, \quad &\text{$x < 2$} \\
&\ln \ x, \quad &\text{$x\ge 2$.} 
\end{cases}
$$
Is this metric space a complete metric space? If it is not what is the completion of it?
 A: Hint: $f$ is an isometry from $(\mathbb{R},d)$ to a subset of $\mathbb{R}$ endowed with the canonical metric of $\mathbb{R}$.
A: First of all we consider our particular case. This space is not complete and an example can be the Cauchy sequence $\{-n+2\}_n$. In fact this sequence is Cauchy
if $n,m\geq M $, then $|f(-n+2)-f(-m+2)|=|\frac{1}{n}-\frac{1}{m}|\leq \frac{2}{M}$
Conversely, is not a convergent sequence on $(\mathbb{R},d)$. By contradiction, we suppose $\{-n+2\}_n$ is convergent to some $\alpha \in \mathbb{R}$. Then one get
$0=\lim_{n\to \infty}d(-n+2, \alpha)=\lim_{n\to\infty } |\frac{1}{n}-f(\alpha)|=|0-f(\alpha)|=|f(\alpha)|$
This means $f(\alpha)=0$ and this is not possible because $f^{-1}(0)=\emptyset$
Thus $(\mathbb{R},d)$ is not a complete space.
What is the obstruction to the positive answer? The problem is that the image of $f$ is not a closed subset of $\mathbb{R}$ but only the subset $(-\infty ,0)\cup [ln(2), \infty)$
If one want to complete this space it is more convenient to study the problem in a more general way, in order to understand what it happens in a general situation.
We consider a bijective function $f: X\to Y$. If $Y$ is a topological space, then it is possible to inherit a natural topological structure on $X$ by $f$ such that $X$ and $Y$ are homeomorphic topological spaces and $f$ is an homeomorphism.
Morevoer, if $(Y,d_Y)$ is a metric space inducing that topology on $Y$, then one can get a metric $d_X$ on $X$ such that the induced topology is the topology inherited on $X$ by $f$ and $f$ is not only an homeomorphism but also an isometry with respect the two metrics fixed respectively on $X$ and $Y$. The metric induced on $X$ will be clearly
$d_X(x,y):=d_Y(f(x),f(y))$
In this way one can observe $(Y,d)$ is a complete metric space if and only if   $X$ is a complete metric space.
At this point we can consider our particular case. The bijection in this case is the following
$f: \mathbb{R} \to (-\infty ,0)\cup [ln(2), \infty)\subseteq \mathbb{R}$
and so $(\mathbb{R}, d)$  can not be a complete metric space because $((-\infty ,0)\cup [ln(2), \infty), |\cdot |)$ is not complete. In fact a subset of a complete metric space ( that in this case is $(\mathbb{R}, |\cdot|)$ ) is complete if and only if it is closed and in our case $(-\infty ,0)\cup [ln(2), \infty)$ is not closed.
At this point it is clear what is a completion of $(\mathbb{R}, d)$. The completion will be simply the complete space
$cl ((-\infty ,0)\cup [ln(2), \infty))=(-\infty ,0]\cup [ln(2), \infty)$
with the metric $|\cdot |$.
