proving “$C^1([−1,1])$ is dense in the given space with given norm”

Define $$E = \left \{ f \in W^{1,2} (-1,1) \; | \; \| f \|_E := \left( \int_{-1}^1 (1-x^2 ) | f' (x) |^2 dx + \int_{-1}^1 | f(x) |^2 dx \right)^{\frac{1}{2}} < \infty \right \}.$$ Then how can I prove that $C^1 ([-1,1])$ is dense in $E$ ? Is this concerned with Sobolev inequality?

-
@DavideGiraudo Of course, I edited it. –  Ann Jul 28 '12 at 9:10
@DavideGiraudo The space $E$ now is just $W^{1,2}$ equipped with a smaller norm. I wonder if Ann didn't want to take a genuinely larger space: all $f\in L^2$ with a weak derivative $f^\prime$ satisfying $\int_{-1}^1 (1-x^2) |f^\prime(x)|^2\,dx<\infty$? This makes more sense to me... –  Byron Schmuland Jul 28 '12 at 14:00
@ByronSchmuland I guess it's what you mean. But when I edited, I just changed formatting, not the body of the question. So we have to wait Ann coming back. –  Davide Giraudo Jul 28 '12 at 14:41

I assume that Ann wants the space $$E = \left \{ f \in L^2(-1,1) \; \bigg| \; \| f \|_E := \left( \int_{-1}^1 (1-x^2 ) | f' (x) |^2 dx + \int_{-1}^1 | f(x) |^2 dx \right)^{\frac{1}{2}} < \infty \right \}.$$ That is, $f\in E$ if it belongs to $L^2(-1,1)$ and has a weak derivative $f^\prime$ on $(-1,1)$ satisfying $$\int_{-1}^1 (1-x^2 ) | f' (x) |^2 dx <\infty.$$

Now for $f\in E$, let $p$ be a polynomial with small $\int_{-1}^1 (1-x^2 )\, |p(x)-f'(x)|^2 dx$, and then let $q$ be the polynomial with $q(0)=f(0)$ and $q^\prime=p$. From the aside below, we see that $q$ is close to $f$ in $E$-norm, which shows that polynomials are dense in $E$.

For a more general, multivariable version of this result, see Are polynomials dense in Gaussian Sobolev space?

Aside: Suppose that $f\in E$ and $f(0)=0$. Then for $0\leq x\leq 1$ we have $f(x)=\int_0^x f^\prime(y)\,dy$. Cauchy-Schwarz gives $f(x)^2\leq x\int_0^x (f^\prime(y))^2\,dy,$ and integrating in $x$ we find $$\int^1_0 f(x)^2\,dx\leq \int_0^1 x \int_0^x (f^\prime(y))^2\,dy\,dx={1\over 2}\int_0^1 (1-y^2) (f^\prime(y))^2\,dy.$$ Adding a similar contribution from negative $x$-values, we conclude that $$\int^1_{-1} f(x)^2\,dx\leq {1\over 2}\int_{-1}^1 (1-y^2) (f^\prime(y))^2\,dy.$$

-

$C[-1,1]$ is dense in $L^2[-1,1]$. Any $f \in C[-1,1]$ can be uniformly approximated by a polynomial, hence the polynomials are dense in $L^2[-1,1]$. The polynomials are smooth, hence in $C^1[-1,1]$. It follows that $C^1[-1,1]$ is dense in $L^2[-1,1]$, hence automatically in $E$.

It is not clear to me how this is related to a Sobolev inequality.

-
Looks like the question changed after I answered it... –  copper.hat Jul 28 '12 at 9:40