Density of $\{ v \in C^0[0,1]: v(0)=0\}$ in $C^0[0,1]$

56 Views Asked by At

Let $V = \{ v \in C^0[0,1]: v(0)=0\}$. I need to show this set is dense in $C^0[0,1]$ with respect to the $L^2$ norm.

I was thinking to select a sequence of functions $\{ f_n \} \in V$ such that $f_n(0)=0$ so they're in $V$ and as $n$ increase I am always closer to $f(0)$, being $f$ the function I want to approximate.

I came up with $f_n(x)= $ \begin{cases} f(\frac{1}{n})x, \qquad x \in I_n \\f(x) \qquad x \not \in I_n ​\end{cases}


Okay, here's what I did: I need to show that $$||f_n -f||_{L^2(0,1)} \rightarrow 0$$ As the sequence and the original function $f$ agree except on $I_n$, I need to compute that difference on $I_n$ only.

Then I have:

$$\int_0^{1/n}(f(\frac{1}{n})x - f(x))^2dx =_\underbrace{nx = t} \int_0^1 \Bigl(f\bigl(\frac{1}{n}\bigr) \frac{t}{n} - f\bigl(\frac{t}{n} \bigr) \Bigr)^2 \frac{dt}{n} $$ Taking the limit, that integral goes to $0$. Is this correct?

1

There are 1 best solutions below

7
On

Okay so you have essentially done it with a few adjustments needed! If you define

$$g_n(x):= \begin{cases} nxf(x), &x \in I_{n} \\ f(x), & x\not\in I_{n}\end{cases}$$

we have $g_{n}(0)=0$ and $g_{n}$ is continuous as $\lim_{x\uparrow\frac{1}{n}}g_{n}(x) = \lim_{x\uparrow\frac{1}{n}}nxf(x)=f(\frac{1}{n})$ and $\lim_{x\downarrow\frac{1}{n}}g_{n}(x) = \lim_{x\downarrow\frac{1}{n}}f(x)=f(\frac{1}{n})$ by the continuity of $f$.

Moreover, one has that $$\begin{split}\lVert f-g_{n}\rVert_{L^{2}} & = \int_{(0,1)}(f(x)-g_{n}(x))^{2}dx \\ & =\int_{(0,\frac{1}{n})}(f(x))^{2}(1-nx)^{2}dx \\ & \leq \sup_{(0,1)}|f|^{2}\int_{(0,\frac{1}{n})}1-2nx+n^{2}x^{2} dx \\ & = \frac{1}{3n}\sup_{(0,1)}|f|^{2} \end{split}$$ Finally we have that $\sup_{(0,1)}|f|^{2} < \infty$ as $f$ is defined on a compact set and is thus bounded. Since $n$ was arbitrary we are done.