Let $\{e_n\}$ be orthonormal basis of infinite dimensional Hilbert space $X$. Let $X_n = \operatorname{span} \{e_1, e_2, \ldots, e_n\}$ for all $n$.
Then how to prove that union of $X_n$ is dense in $X$?
I know that $X_n$ is closed subspace. But how to union is dense?
Take an element $x \in X$, and let $x_n$ be the orthogonal projection of $x$ onto $X_n$. What can you say about $\|x-x_n\|$ as $n$ increases? What conclusion can you draw about any open ball of positive radius around $x$?