Compact operator in Hilbert spaces reach the maximum in the sphere. I found the following question in my textbook:
(QUESTION) Let $\mathcal{H}$ a Hilbert space and $T: \mathcal{H} \rightarrow \mathcal{H}$ a compact operator. Show that exists $x \neq 0$ in $\mathcal{H}$, such that
$\|Tx\| = \|T\|\|x\|$

A few days ago, I found a similar question in another textbook, but I had $f: \mathcal{H} \rightarrow \mathbb{R}$ bounded. This one, I can use Hanh-Banach theorem to show that exists $x \in \mathcal{H}$, such that $f(x) = \|f\| \|x\|$.
Thanks. 
 A: We will prove that $\exists x_0\in S(0,1)=\{x\in H:\|x\|=1\}:\|Tx\|=\|T\|$.
You know that $\|Tx\|\leq \|T\|\,\forall x\in B(0,1)\Rightarrow \exists$ a sequence $\{x_n\}\subset B(0,1): \|Tx_n\|\to \sup\limits_{x\in B(0,1)} \|Tx\|=:\|T\|$. From this sequence you can chose a weakly convergent subsequence, still denoted by $\{x_n\}$, in $B(0,1)$ , say convergent to $x_0\in B(0,1)$ (because $B(0,1)$ is convex and closed and $H$ is reflexive $\Rightarrow B(0,1)$ is weakly compact). But $T$ maps weakly convergent sequences to strongly convergent ones, so $\|Tx_n-Tx_0\|\to 0$. Therefore we have $\|Tx_n\|\to \|Tx_0\|$ and also $\|Tx_n\|\to \sup\limits_{x\in B(0,1)} \|Tx\|\Rightarrow \|Tx_0\|=\sup\limits_{x\in B(0,1)}{\|Tx\|}=\|T\|$, which follows by the uniqueness of limits. It is only left to show that $\|x_0\|=1$. This is done by observing $\|T\|=\|Tx_0\|\leq \|T\|\|x_0\|\Rightarrow \|x_0\|\ge 1$.
A: If you prove that the image of the closed unit ball of $\mathcal H$ by $T$ is compact in $\mathcal H$, then there exists $x\in \mathcal H$ with $\|x\|=1$ such that $\|Tx\|=\|T\|.$ 
Indeed, since $T(B_\mathcal H)$ is compact, the norm $\|\cdot\|$ atains its maximum on $T(B_\mathcal H)$. Therefore, the set $\{\|Tx\|:\; x\in B_\mathcal H\}$ is closed. This means that the supremum when calculating operator norm is attained. 
To prove that $T(B_\mathcal H)$ is compact note first that $T(B_\mathcal H)$ is a convex set. Therefore, its norm closure coincides with its weak closure. Since $B_\mathcal H$ is weakly compact due to the reflexivity of the space $\mathcal H$, and since $T$ is also weakly continuous, then $T(B_\mathcal H)$ is weakly compact as well. Therefore it is also weakly closed. By the argument above it is closed. Since $T$ is compact, $T(B_\mathcal H)$ is relatively compact. And finally, since it is closed, it needs to be compact proving the claim.  
A: Regarding your comment about bounded functionals. Your answer is not correct. Hahn-Banach theorem works in other direction. 
Given $x\in X$, then there exists a bounded functional $f$ with $\|f\|=1$ and $f(x)=\|x\|.$ Your argument proves what I claimed. What you need to do on Hilbert spaces, just apply Riesz representation theorem to obtain a vector $y\in \mathcal H$ such that 
$$f(x)=\langle x,y\rangle.$$ Then $\|f\|=\|y\|$, and if you take $x=\frac{y}{\|y\|}$, then $\|x\|=1$ and $f(x)=\|y\|=\|f\|.$
A: Let $S=\{x\in\mathcal{H}:\|x\|=1\}$. Since $S$ is closed and bounded, then $S$ is weakly compact. 
But $T$ is compact. Then $T$ is weak-norm continous. Thus $f:H\to\mathbb{R}$ given by $f(x)=\|Tx\|$ is weak-continous. Since $H$ equipped with the weak topology is Hausdorff and $S$ is weakly compact, then $f$ attains a globlal maxima on $S$. That is, there is $x_0\in S$ such that $\|Tx_0\|\ge \|Tx\|$ for all $x\in S$. 
Hence $\|Tx_0\|=\sup\{Tx:x\in S\}=\|T\|$ and done.
EDIT a simpler way
Moreover, note that if $T$ is compact and selfadjoint, it is simpler:
If $T=0$, done. Suppose $T\neq0$. Hence $\|T\|\neq0$
Let $\sigma(T)$ the spectrum of $T$. Since $T$ is continous, then $\|T\|\in\sigma(T)$.
Suppose $T$ is compact and selfadjoint. Then $\sigma(T)$ is discrete. Thus, only $0$ can be a limit point. Hence elements of $\sigma(T)$ are eigenvectors. In particular $\|T\|$ is an eigenvector. That is, $Tx=\|T\|x$ for some $x\in\mathcal{H}$.
Now, if $T$ is not selfadjoint, then $T=UA$ for some partial isometry and nonnegative $A$. Applying the above argument to $A$, done.
