Why is $C=\{x\in l^2:|x_n|\leq 2^{-n},n=1,2,3,\dots\}$ compact?
I tried to show that $C$ is totally bounded and closed.
I showed that is closed but I don't know how to show that is totally bounded.
It's very simple to show that $C$ is bounded:
If $0$ is the zero sequence, there is an upper bound on $d(0,x)$ for all $x\in C$: $(\sum_{n\geq1}2^{-n})^{\frac{1}{2}}$ is the max for the distance $||\centerdot||_{l^2}$.
But I think that the unit ball is not totally bounded in $l^2$ and so the fact that C is bounded it's not usefull to show that is tottaly bounded. Can someone help me?
So you have a set of the form $$C=\{x\in\ell_2; |x_n|\le a_n\}$$ where $a_n$ is a series of positive real numbers such that $\sum a_n^2<+\infty$. You want to show that this space is totally bounded.
Let $\varepsilon>0$. We want to show that there exist finitely many points in $C$ such that each point of $C$ is within the distance $\varepsilon$ from some of these points.
Let $n_0$ be such that $$\sum_{k>n_0} a_n^2 < \frac\varepsilon2.$$
Now let us concentrate for a while on sequences in $C$ such that $x_n=0$ for $n>n_0$. This means that we are looking essentially on $\mathbb K^{n_0}$ (where $\mathbb K=\mathbb C$ or $\mathbb K=\mathbb R$, depending on which field you are working with). $$D=\{x\in C; n>n_0 \Rightarrow x_n=0\}$$ Can you show that there are finitely many points $x_1,\dots,x_k$ in $D$ such that for each $x\in D$ the distance $\|x-x_k\|<\varepsilon/2$ for some $k$? Can you show that the same $k$ gives $$\|x-x_k\|<\varepsilon$$ for any $x\in C$?
The same problem as in your question appears in the book Banach Space Theory by Marián Fabian, Petr Habala, Petr Hájek, Vicente Montesinos, Václav Zizler as Exercise 1.15. It is also mentioned there that this space is called Hilbert cube. (And once you know the name of this space, you can find many other sources, where the same or similar problem appears.)
And a very similar problem appeared in Ask a Topologist forum: http://at.yorku.ca/cgi-bin/bbqa?forum=ask_a_topologist_2013&task=show_msg&msg=3853