How to show complete metric space Let $A \subset \mathbb R^n$ be a bounded and measurable region and let 
$$X = \{ f : \text{ measurable on } A \text{ and } \|f\|_{L^\infty(A)} <\infty\}.$$ 
How can we show that $d(f, g) = \int_A \min (1, |f-g|) dx$ is complete metric on $X$?
 A: It is important that $X$ is not a space of functions but a space of equivalence classes of functions via $f\sim g\iff f=g$ almost everywhere (meaning $\mu(\{x\mid f(x)\neq g(x)\})=0$). Otherwise you don't have $d(f,g)=0\implies f=g$ and you are in the situation of $d$ being a pseudo-metric.
Well definedness of $d$ follows from elements of $X$ being measurable and $A$ being of finite volume, as then $\min(1,|f-g|)$ is a bounded measurable function on a set of finite volume. Symmetry and positivity of $d$ are clear from the definition. It is true that $d(f,g)=0\iff f=g$ almost everywhere:
Let $A_n(f,g)=\{x\in A\mid |f-g|(x)>1/n\}$, it is immediate that $d(f,g)≥\frac1n\mu(A_n)$ for all $n≥1$, so if $d(f,g)=0$ you have $0=\sum_n\mu( A_n) = \mu(\bigcup_n A_n)=\mu(\{x\mid |f-g|(x)>0\})$.
The triangle inequality follows from $\min(1,|x-z|)≤\min(1,|x-y|)+\min(1,|y-z|)$ being true for $x,y,z$ in some normed vector space. If you are interested in seeing this I will write it down.
So $X$ is a metric space. But it isn't necessarily complete. If you look over the proof of it being metric you will see that we didn't need the condition that the functions are essentially bounded. So what we can always do is extend $X$ to $\tilde X =\{f:A\to\overline{\mathbb{R}}\mid f\text{ measurable}\}$. If you can find a sequence $f_n\to f$ with $f_n\in X$ and $f\in \tilde X-X$ then $X$ is not complete.
Let $A=[0,1]$, $f_n(x)=\chi[1/n,1](x)\cdot (1+\frac1{\sqrt x})$ and $f(x)=1+\frac1{\sqrt x}$.
You have that 
$$d(f_n,f)=\int_0^{1/n}1dx+\int_{1/n}^{1}0dx
=1/n$$
So $f_n\to f$ and $X$ is not complete.
This construction can be applied whenever $A$ contains a point $p$ so that $\mu(B_\epsilon(p)\cap A)\neq0$ for all $\epsilon$. There are cases where $X$ is complete, like for example where $\mu(A)=0$. Then $X$ is a space consisting of one point and thus complete.
