Let $H$ be a real Hilbert space (an euclidian vector space over the real numbers field).
If $\{x_n\}$ weakly converges to $x$ and $\|x_n\|\rightarrow \|x\|$, show that $\|x_n-x\|\rightarrow 0$.
My attempt:
If $x=0$ the proof is immediately, so let's say $x\neq0$, so $\|x\|\neq 0$.
The functional $f(z)=(z,x)$ is continuous and since $\{x_n\}$ weakly converges to $x$ we have that $f(x_n)\rightarrow f(x)$ or $(x_n,x)\rightarrow (x,x)=\|x\|^2$, and so then
$(x_n,x)-(x,x)=(x_n-x,x)\rightarrow 0$
since $x\neq 0$ it seems logical that $x_n-x\rightarrow0$ and so $\|x_n-x\|\rightarrow 0$, so my question is how can I justify this last step?
I know it must be related with the condition $\|x_n\|\rightarrow \|x\|$ since I haven't made use of it.
Thanks.
Letting $f(z)= \langle z,x \rangle$ like you said, we have that $$\|x_n-x\|^2 = \|x_n\|^2 -2 \langle x_n,x \rangle + \|x\|^2 = \|x_n\|^2 - 2f(x_n) +\|x\|^2$$$$ \to \|x\|^2 - 2f(x) +\|x\|^2 =0$$