Is $C^2[0,1]$ closed in $L^2[0,1]$? We know that $C^2[0,1]$ is a subspace of $L^2[0,1]$ since continuous functions on a compact set $[0,1]$ are bounded and therefore square integrable.
However, we know that if $C^2[0,1]\ni f_n\to f$ pointwise, $f$ need not to be in $C^2[0,1]$, for example, $f(x)=x^n $ if $x\in [0,1)$ and $f(x)=1$ if $x=1$.
So if $C^2[0,1]\ni f_n \to f$ in the subspace topology of $L^2[0,1]$, i.e., $||f_n-f||_{L^2}$, then is $f \in C^2[0,1]$?
 A: Doesn't seem like it.  Can you visualize a sequence of continuous functions $ f_n $ approaching the step function 
$$f(x) = \begin{cases}
  0 & x \leq 1/2 \\
  1 & x > 1/2
\end{cases}
$$
This function isn't continuous, but you could have convergence in $ L^2 $.  (Imagine continuous functions with a steeper and steeper transition from $ 0 $ to $ 1 $ near $ x = 1/2 $.)
A: Let $f_n(x)=0$ for $x <\frac 1 2$, $1$ for $X  > \frac  1 2+\frac 1 n$ ad $n(x-\frac  1 2)$ for $\frac  1 2 \leq x \leq \frac  1 2+\frac 1 n$. Then each $f_n$ is continuous and $f_n \to I_{(\frac  1 2, 1)}$ in $L^{2}$. Since the limit function is not almost everywhere equal to any continuous function it follows that $C[0,1]$ is not closed in $L^{2}[0,1]$. 
A: Let $f_n(x) = \sqrt{(x-1/2)^2 + 1/n}.$ Then each $f_n\in C^\infty(\mathbb R)$ and $f_n(x)\to |x-1/2|$ uniformly on $[0,1].$ Hence $f_n(x)\to |x-1/2|$ in $L^2.$ But $|x-1/2|$ is not differentiable at $1/2,$ so certainly doesn't belong to $C^2[0,1].$ This shows $C^2[0,1]$ is not closed in $L^2.$
