# Show that the sequence of functions is a Cauchy sequence in $L^2[0, 1]$ but not in $C[0,1]$

The problem is to show that the sequence of functions $$f_n(t) =$$ $$\begin{cases} 0 & 0 \leq t \leq \frac{1}{2} -\frac{1}{n}\\ \frac{1}{2}+\frac{n(t-\frac{1}{2})}{2}& \frac{1}{2} -\frac{1}{n} < t < \frac{1}{2} +\frac{1}{n} \\ 1 & \frac{1}{2} +\frac{1}{n} \leq t \leq 1 \end{cases}$$

is a Cauchy sequence in $$L^2[0, 1]$$ but not in C[0,1] (i.e., using the uniform norm).

$$\\$$

I have proved that in for continuous function [0,1] it is not Cauchy:

Let $$m \leq n$$, consider $$|| f_m(x) - f_n(x)||$$, as $$n \rightarrow \infty$$, $$||f_n(x)|| \rightarrow \frac{1}{2}$$ where $$x = \frac{1}{2}$$. And since the function becomes an uncontinuous fucntion, it is not Cauchy.

But for the $$L^2[0,1]$$ space, I know $$||f_m(x) - f_n(x)||_2 = =\int_{0}^1 (f_m(x) - f_n(x))^2dx$$. I don't know how should I proceed.

Can anyone help me to check if for $$C[0,1]$$ is a right aprroach and how to check for $$L^2[0,1]$$?

let be $$n\geq 1$$, we have:
$$\lVert f_{2n} - f_{n}\rVert_{\infty} \geq \left| f_{2n}\left(\frac{1}{2} + \frac{1}{2n}\right) -f_n\left(\frac{1}{2} + \frac{1}{2n}\right)\right| = \frac{1}{4}$$ so $$f_n$$ is not Cauchy in $$C^{\infty}[0,1]$$
Let be $$h\in L^2[0,1]$$: $$h(x) = \begin{cases} 0 & \text{if } 0 \leq x < \frac{1}{2}\\ 1 & \text{otherwise} \end{cases}$$
we have $$\lVert f_m - f_n\rVert \leq \lVert f_m - h\rVert + \lVert f_n - h\rVert$$
so it suffice to prove $$\lVert f_n - h\rVert_{L^2} \to 0$$
P.S.: we have to prove $$f_n$$ is Cauchy in $$L^2$$, but we know that $$L^2$$ is complete, so it is natural to search for an $$h$$ s.t. $$\lVert f_n - h \rVert_{L^2} \to 0$$