Prove that $X=C([0,1],\mathbb{R})$ is Not complete

Prove that $X=C([0,1],\mathbb{R})$ with the metric $d(f,g)=\int^1_0|f(x)-g(x)|dx$ is not a complete metric space.

My idea

Consider the sequence of continuous functions $$f_n(x)=\left\{\begin{matrix} 0 & 0\le x \le \frac{1}{2}-\frac{1}{n}& \\ nx+(1-\frac{1}{n})& \frac{1}{2}-\frac{1}{n} \le x \le \frac{1}{2}& \\ 1& \frac{1}{2} \le x \le 1 & \end{matrix}\right.$$

We have $d(f_n,f_m)=\int ^1_0 |f_n-f_m|dx=\frac{1}{n} \rightarrow 0$, and hence $(f_n)$ is a Cauchy sequence.

Now, how do I proceed from here?

• Do you know what else you would have to prove about $f_n$ in order to show that the space is not complete? Apr 6 '18 at 11:35
• $f_n$ is convergent to a function which is not continuous Apr 6 '18 at 11:37
• Yes, or at least '$f_n$ does not converge to a continuous function' (so if you show that it does converge to a discontinuous function you're done). Apr 6 '18 at 11:43
• But... I don't think that $f_n$ as you defined it is a continuous function for each $n$ (let alone the fact that the definition might be a little ambiguous for $n=1$, but that's not a big deal; the continuity of $f_n$ is). Apr 6 '18 at 11:44
• @AlejandroNasifSalum [If you show that it does converge to a discontinuous function] ---> converge not pointwise but for $d(.,.)$ otherwise $x^n$ tends to zero in this space. Apr 6 '18 at 12:01

Your sequence $f_n$ does not work since those are not continuous functions. If you don't know how to fix it, a good option is to define $$f_n(x)=\left\{\begin{matrix} nx & 0\le x \le \frac{1}{n}\\ 1 & \frac 1n <x\le 1.\\ \end{matrix}\right.$$
Now, instead of proving that it converges point-wise to a discontinuous function (which says nothing) you have to prove that there is no $f\in C\big([0,1]\big)$ such that $d(f_n,f)\to 0$ (for the distance of the metric space).
One option is to suppose, on the contrary, that there is a continuous $f\colon [0,1]\to\mathbb R$ such that $$\int_0^1 \big|f_n(x)-f(x)\big|\,dx \to 0.$$ Suppose that $f(0)=y_0$ and take $\delta>0$ (and maybe $\delta<1$) such that $$0\le x<\delta\implies |f(x)-y_0|<\tfrac12,$$ (that is, 'take $\varepsilon=\tfrac12$') which is possible since $f$ is continuous at $x=0$.
Now show that there is an $N$ such that for $n\ge N$ $$\int_0^1 |f_n(x)-f(x)| \, dx$$ is greater than a certain positive lower bound (I guess you can try to integrate in $[0,\delta]$ and take $N$ such that $\tfrac1N<\delta$, so $f_n(0)=0$ and $f_n(\delta)=1$ for $n\ge N$).
Then is not true that $f_n \to f$ in the space, which is absurd.