How to prove that span of $\sin$ and $\cos$ is closed in $L^2$ (trivial question)

107 Views Asked by At

Let $V= \{ f(x) = \alpha \sin x + \beta \cos x : \, \alpha, \beta \in \mathbb{R} \} \subset L^2[0,\pi] $.
Prove that $V$ is a closed subspace of $L^2[0,\pi]$.

I have tried to solve this exercise, but I am not sure about my argument - I believe there is a simpler way to solve it.
More generally, my other question is: Is it always true that the span os some elements is a closed subspace? Under which conditions it holds?

My reasoning is basically that $V$ is the sum of two closed subspaces ($<\sin>$ and $<\cos>$) of $L^2[0,\pi]$. Is that right to conclude that $V$ has to be closed too?

In particular:
If $\, f_n(x) = \alpha_n \sin (x) \rightarrow f$ in $L^2$, then $\vert \alpha_n \vert \Vert sin(x) \Vert_2 \rightarrow \Vert f \Vert_2$, so that $\exists \alpha \in \mathbb{R}$ such that $\alpha_n \rightarrow \alpha$.
Now, by the uniqueness of the limit, since $\, f_n(x) = \alpha_n \sin (x) \rightarrow \alpha \sin (x)$, we get: $\, f(x)=\alpha \sin(x) \quad \text{a.e. in} \, [0,\pi]$.
Therefore, $\, f_n(x) = \alpha_n \sin (x) \rightarrow f$ in $L^2 \, \Rightarrow \, f \in V$.
We can iterate the same argument for a sequence $\, f_n(x) = \beta_n \cos (x)$.
We have proven that $<\sin>$ and $<\cos>$ are closed in $L^2[0,\pi]$, and so $V=<\sin>+<\cos>$ (finite union of closed subspaces) has to be.

1

There are 1 best solutions below

0
On

Here is an elementary proof which does not use the fact that finite dimensional subspaces are closed: Suppose $\alpha_n\sin x +\beta_n \cos x\to f(x)$ in $L^{2}$. Then $\int_0^{\pi} ((\alpha_n\sin x +\beta_n \cos x)-(\alpha_m\sin x +\beta_m \cos x))^{2} dx\to 0$ as $n,m \to \infty$. Just expand the square and compute the integral to see that $(\alpha_n-\alpha_m)^{2} +(\beta_n-\beta_m)^{2} \to 0$. Hence $\alpha_n$ converge to some $\alpha$ and $\beta_n$ comnvers to some $\beta$. This implies that $f(x)=\alpha \sin x +\beta \cos x$.