Let $(X,S,\mu)$ is a measure space and $\mu(X)<\infty$. Define $d(f,g)=\int\frac{|f-g|}{1+|f-g|}d\mu$. Then $d$ is a metric on the space of measurable functions.
Let us prove a more general result.
Let $d: \Bbb R \times \Bbb R \rightarrow [0, +\infty) $ be any metric in $\Bbb R$.
Let us define $d_0: \Bbb R \times \Bbb R \rightarrow [0, 1) $ by
$$d_0(x,y) = \frac{d(x,y)}{1+d(x,y)}$$
Then $d_0$ is also a metric in $\Bbb R$.
In fact
- $d_0(x,y) = 0$ iff $d(x,y) = 0$ iff $x=y$.
- $d_0(y,x) = \frac{d(y,x)}{1+d(y,x)}= \frac{d(x,y)}{1+d(x,y)} = d_0(x,y)$
- For triangular inequality,
let $f: [0, +\infty) \rightarrow \Bbb [0,1)$ defined as $f(t) = \frac{t}{1+t}$. Note that $f'(t) = \frac{1}{(1+t)^2}>0$ so $f$ is strictly increasing. Note that $d_0= f \circ d$. So we have
\begin{align*} d_0(x,z)&= f(d(x,z))\leq f(d(x,y) +d(y,z)) = \frac{d(x,y) +d(y,z)}{1+d(x,y) +d(y,z)} = \\
& = \frac{d(x,y) }{1+d(x,y) +d(y,z)}+ \frac{d(y,z)}{1+d(x,y) +d(y,z)} \leq \\
& \leq \frac{d(x,y) }{1+d(x,y)}+ \frac{d(y,z)}{1+d(y,z)} = d_0(x,y) + d_0(y,z)
\end{align*}
So, $d_0$ is a metric in $\Bbb R$ (actually $d_0$ is equivalent to $d$, but we don't need to prove this for this question).
Now, let $\mathcal{M}(X,S)$ be the set of measurable functions defined in $(X,S)$.
Let $d_\mu: \mathcal{M}(X,S) \times \mathcal{M}(X,S) \rightarrow [0, \infty)$ be defined by
$$ d_\mu (f,g) =\int d_0(f(x),g(x)) d\mu(x) = \int \frac{d(f(x),g(x))}{1+d(f(x),g(x))}d\mu(x)$$
Note that, since, for all $x$, $d_0(f(x),g(x))\in [0,1)$ and $\mu(X) <+\infty$, we have that, for all $f, g \in \mathcal{M}(X,S)$, $d_\mu (f,g) \leq \mu(X) <+\infty$. So, $d_\mu (f,g) \in [0, +\infty)$.
In order that $d_\mu$ be a metric, we must make the convention that, if $f,g \in \mathcal{M}(X,S)$ and $f=g$ a.e., we are going to consider that $f=g$ (technically we are taking the quotient of $\mathcal{M}(X,S)$ by the equivalence relation $=$ a.e.).
Let us prove that $ d_\mu$ is a metric.
- $d_\mu (f,g) = 0$ iff $d_0(f(x),g(x))=0$ a.e iff $f=g$ a.e.
- $ d_\mu (g,f) =\int d_0(g(x),f(x)) d\mu(x) = \int d_0(f(x),g(x)) d\mu(x)= d_\mu (f,g) $
\begin{align*} d_\mu (f,h) &= \int d_0(f(x),h(x)) d\mu(x) \leq \\
& \leq \int d_0(f(x),g(x)) d\mu(x) + \int d_0(g(x),h(x)) d\mu(x) =\\
& = d_\mu (f,g)+ d_\mu (g,h)
\end{align*}
So, $d_\mu$ is a metric in $\mathcal{M}(X,S)$.
The result in the question is just the special case where $d(x,y)=|x-y|$.
Remark:
Note that in addition to the triangular inequality for $d_\mu$ (which depends on the triangular inequality for $d_0$), there are two other subtle points:
We use the fact that $\mu(X)<\infty$ to ensure that $d_\mu$ is finite. Having $d_\mu$ finite is a condition for $d_\mu$, as defined in the question, to be a metric.
If $f,g \in \mathcal{M}(X,S)$ and $f=g$ a.e., we must identify $f$ and $g$ (technically we are taking the quotient of $\mathcal{M}(X,S)$ by the equivalence relation $=$ a.e.). This is needed in order that $d_\mu$, as defined in the question, is a metric (otherwise $d_\mu$ would be only a pseudo-metric).
https://math.stackexchange.com/questions/943827/a-pseudometric-on-the-space-of-the-measurable-functions-is-complete
There, the first three items correspond to this question, but the OP clearly says: "I have already done 1. 2. 3. 4., but I'm stuck on 5. I don't know which $f$ should the $f_n$ converge to". The two answers there are about item 5 only.
- If $f_n$ is a Cauchy sequence on $\mathcal F$ then there exists $f \in \mathcal F$ such that $d(f_n, f)\rightarrow 0$.
– Ramiro Apr 10 '21 at 23:24