For $f\in L^2(0,\infty),$ define $(Tf)(x)=x^{1}\int_0^x f(s)ds,$ for $x\in(0,\infty),$ then from hardy's inequality, $T\in B(L^2),$ my question is how to show that $T$ is not compact?

5$\begingroup$ If you don't mind me asking: (a) why do you want to know? mere curiosity, or as a precursor to some other question? (b) what goes wrong with a direct attempt to use the definition of (sequential) compactness? $\endgroup$– Yemon ChoiMar 14 '10 at 9:06
For a natural number $j$ let $f_j$ be the indicator function of the interval $[0,1/j]$ times the square root of $j$. Then the $L^2$norm of $f_j$ is one. A simple calculation shows that one has $Tf_iTf_j^2\ge\int_0^{1/j}(\sqrt i\sqrt j)^2dx= (1\sqrt{i/j})^2$ for $i\le j$, which implies that no subsequence can be Cauchy.
It is natural to look for an example around $x=0$ since that is where the kernel of $T$ fails to be $L^2$.
Anton already gave a very clean answer. Another way to see it is to work backwards: start from a sequence of functions $F_j$ in $L^2$ that does is noncompact, and define $f_j(x) = \frac{d}{dx} (x F_j(x) )$.
For example, let $\phi(x)$ be an arbitrary smooth bump function supported in $[1/4,1/4]$, then the sequence of functions $F_j(x) = 2^j \phi( 4^j x  1)$ all have disjoint support, but all have the same $L^2$ norm, so obviously does not have a converging subsequence in $L^2$.
Now set $f_j = (xF_j)' = F_j(x) + 8^j x \phi' (4^j x  1)$. Since $\phi'$ has support only in $[1/4,1/4]$, on the support of $f_j$ we can bound $4^j x$ absolutely by, say, 2. So we have that $f_j$ is a bounded sequence in $L^2$, whose corresponding $F_j = Tf_j$ cannot have a Cauchy subsequence.
Edit: I should also provide some motivation: observe that the scaling argument also works the other way (replace $j$ by $j$, so that you can dilate). The Hardytype inequality that you are using is a scaling invariant inequality: you estimate $f/x$ in $L^2$ by its derivative $f'$. If we treat $x$ as having units of distance, then the two objects have the same units regardless of what units $f$ has. This gives scaling invariance of the estimate. In other words, the estimate is invariant under the natural scaling action of $\mathbb{R}_{+}$ on $L^2(\mathbb{R}_+)$, where the group operation for $\mathbb{R}_{+}$ is multiplication.
Observe that $(\mathbb{R}_+, \times)$ is a noncompact Lie group. Generally, if you have an inequality/operator that is invariant under the action of a noncompact Lie group, the inequality/operator cannot be compact. You just need to start with some test function and act on it by the Lie group action to generate a bounded sequence that runs off noncompactly in the "infinity dimension" direction. Terry summarised it in his Buzz http://www.google.com/buzz/114134834346472219368/9UseDXTJN74/Therearethreewaysthatsequentialcompactness a short while back.
This is, of course, closely related to the notion of concentration compactness.
Let { $ L_{n} $ } be the sequence of Laguerre polynomials, and let us define
$e_{n}(t)=\dfrac{L_{n}(\ln t)}{t}$ $\cdot\chi_{\left(1,\infty\right)}\left(t\right)$ $(n\in\mathbb{N\textrm{, t > 0}})$ . Then { $e_{n} $ } is an orthonormal system in $L^{2}\left(0,\infty\right)$, and it is not hard to see that $He_{n}=e_{n}e_{n+1}$ $(n\in\mathbb{N})$, where $H$ stands for the Hardy averaging operator. Therefore, $H$ cannot be compact.
See also revistas.ucm.es/mat/11391138/articulos/REMA0606220467A.PDF.

$\begingroup$ So your $H$ is the questions's $T$... :) $\endgroup$ Mar 14 '10 at 20:59