Math Help - Dense subset

1. Dense subset

Let $X$ be the space of continuous functions $f:[0,\pi] \rightarrow \mathbb{C}$ with norm || $f|| = \int_0^\pi |f(x) |dx$. I am trying to determine whether the linearly independent set $\text{span}\{\sin nx\}_{n \in \mathbb{N}}$ is dense in $X.$ Somebody gave me a hint that it is not dense and to look at the constant function 1. So that means I am trying to show that there is some open ball around the function 1, which contains no element of $\text{span}\{\sin nx\}_{n \in \mathbb{N}}$.

This means that I need to show $\int_0^\pi |1 - \sum_{i=0}^r \alpha_i \sin (n_i x) | dx \ge \epsilon$ for some $\epsilon >$0.

2. How about expressing cosx in terms of span{sinkx}?

3. That is not possible since the set $\{f \mid f=\sum_{i=0}^r \alpha _i f_i, \text{ where }f_i = \sin n_i (\cdot) \text{ or } \cos n_i(\cdot) , r >0, \alpha_i \in \mathbb{C}, n_i\in\mathbb{N}\}$ is linearly independent.

This means of course that $|\cos x - \sum_{i=0}^r \alpha_i \sin n_i (x) |>0$. But its not necessarily bigger than a constant $\epsilon$ which I choose at the start

4. Hmmm... What if x is near 0?

5. at 0, the difference is 1, but how does the affect the integral between 0 and pi ? similarly at pi the difference is 1.

6. Well... If you suppose that f=cosx lies in span{sinkx}, then, for every a>0 there is a finite sum S(a), such that
||f-S(a)||<a. But since f(0)=1 and all finite sums are zero at x=0, in a sufficiently small right interval about 0, we can have f-S(a)>a/pi.
Integrating gives a>a.

7. But I know in advance that cosx is not in that span, from linear independence.

I am trying to prove the statement " $\exists f \in C([0,\pi],\mathbb{C}) \text{ such that } \exists \epsilon > 0 \text{ such that }\forall g\in \text{span}\{\sin nx\}_{n \ge 0} , \int_0^{\pi} |f(x)-g(x)|\ge \epsilon$ "

8. If you already know that cosx is not in the span, then the span is not dense... right? Why bother proving more? :S

9. But it might be in the closure of the span? Is this is a standard result you are using?

10. Originally Posted by slevvio
But it might be in the closure of the span? Is this is a standard result you are using?
I have been trying to think of a clever continuous linear functional which is constant on $\text{span}\{\sin(nx)\}$ but not constant on $\mathcal{C}\left([0,1],\mathbb{C}\right)$. This of course would contradict density. Any ideas?

11. Originally Posted by slevvio
Let $X$ be the space of continuous functions $f:[0,\pi] \rightarrow \mathbb{C}$ with norm $\|f\| = \int_0^\pi |f(x) |dx$. I am trying to determine whether the linearly independent set $\text{span}\{\sin nx\}_{n \in \mathbb{N}}$ is dense in $X.$ Somebody gave me a hint that it is not dense and to look at the constant function 1. So that means I am trying to show that there is some open ball around the function 1, which contains no element of $\text{span}\{\sin nx\}_{n \in \mathbb{N}}$.

This means that I need to show $\int_0^\pi |1 - \sum_{i=0}^r \alpha_i \sin (n_i x) | dx \ge \epsilon$ for some $\epsilon >$0.

The ingredients for a solution are already here in the comments of Rebesques and Drexel28. Define a continuous linear functional $\phi$ on $X$ by $\phi(f) = \int_0^\pi f(x)\cos x\,dx$. Then $\phi(\sin nx) = 0$ for all n, but $\phi(\cos x)\ne0$. So the function $\cos x$ is not in the kernel of $\phi$, which is a closed subspace of $X$.

[I have moved this thread, because it's really a problem in functional analysis rather than linear algebra. The solution depends on the fact that $L^\infty[0,\pi]$ is the dual of $L^1[0,\pi]$.]

12. but $\phi(\sin nx )$ is not zero when n is even

the map $\theta(f) = \int_0^{\pi} f(x) sin(x) dx$ seems to work for $cos(2x).$ . Only sinx is not in the kernel here, but that could never be a sequence tending to cos(2x) anyway.

13. yes that map works ! Thanks all I see how it works

14. Originally Posted by slevvio
but $\phi(\sin nx )$ is not zero when n is even
Dammit, you're right! And what's more, I'm changing my mind about whether this result is true.

I now think that every continuous function on $[0,\pi]$ can be approximated in the $L^1$-norm by a linear combination of the functions $\sin kx$. In fact, let $f$ be a continuous function on $[0,\pi]$, and extend $f$ to an odd function $g$ on $[-\pi,\pi]$, (so that $g(-x) = -f(x)$). Then the Fourier series of $g$ consists only of sine terms. Let $s_n(g)$ denote the sum of the first n terms of that series. Then $\|s_n(g) - g\|_2\to0$ as $n\to\infty$, where $\|\,.\,\|_2$ is the $L^2$-norm, given by $\|h\|_2 = \sqrt{\int_{-\pi}^\pi|h(x)|^2dx}$. By the Cauchy–Schwarz inequality, if $\|h\|_1$ is the $L^1$-norm of h, given by $\|h\|_1 = \int_{-\pi}^\pi|h(x)|\,dx$, then

$\|h\|_1 = \int_{-\pi}^\pi|h(x)|\cdot1\,dx\leqslant\|h\|_2\|1\|_2 = \sqrt{2\pi}\|h\|_2$.

It follows that $\|s_n(g)-g\|_1\leqslant\sqrt{2\pi}\|s_n(g)-g\|_2\to0$, and if you restrict the interval of integration to $[0,\pi]$, this tells you that $\int_0^\pi|s_n(f)-f|\,dx\to0$. In other words, $f$ can be approximated in the $L^1[0,\pi]$-norm by a linear combination of functions $\sin kx$.

15. I'm not sure about this last argument Op, how can we restrict the interval to [0,pi]?