Let $\varphi\in\mathcal{C}^\infty_0(\mathbb{R})$ a map with compact support. For all $n\in\mathbb{N}$, I define $u_n$ by $u_n(x)=\varphi (x+n)$.
I would like to prove that
$u_n$ converges weakly to $0$ in $W^{1,p}(\mathbb{R})$.
Of course for all $n$, $u_n$ and $u_n'$ are in $\mathrm{L}^p(\mathbb{R})$, indeed $\|u_n\|_{\mathrm{L}^p(\mathbb{R})}$ and $\|u_n'\|_{\mathrm{L}^p(\mathbb{R})}$ are constant (equal to $\|\varphi\|_{\mathrm{L}^p(\mathbb{R})}$ and $\|\varphi'\|_{\mathrm{L}^p(\mathbb{R})}$ respectively). It follows that $\|u_n\|_{W^{1,p}(\mathbb{R})}$ is constant let says $\|u_n\|_{W^{1,p}(\mathbb{R})}=C$.
Let $f\in \left(W^{1,p}(\mathbb{R}) \right) '$, $$|f(u_n)|\leq \|f\|\|u_n\|_{W^{1,p}(\mathbb{R})} = \|f\| C$$
I tried to use that we have, since $\| f\|\neq 0$ and $C\neq 0$, $$\dfrac{|f(u_n)|}{\|f\|C}\in [0,1]$$ is in a compact of $\mathbb{R}$, so there exist a subsequence and $l\in [0,1]$ such that $$\lim\limits_{k\to +\infty}\dfrac{|f(u_{n_k})|}{\|f\|C}=l.$$
And I wrote $f(u_{n_k})$ as telecosping serie. But I can't figure out how to conclude.
Any help would be greatly appreciated.
What you want to show is not true for $p=1$. In fact, the functional $f \mapsto \int f$ is bounded and $\int u_n $ is independent of $n$ and (at least for suitable $\varphi$) $\neq 0$.
For $1<p<\infty$, it is not hard to see $\int u_n \cdot g \to 0$ and also $\int u_n ' \cdot g \to 0$ for all $g \in C_c^\infty$. By density of $C_c^\infty$ in the dual space $L^q$ of $L^p$ and since the sequences $(u_n)_n$ and $(u_n ')_n$ are bounded in $L^p$, we easily get weak convergence $u_n \rightharpoonup 0$ and $u_n ' \rightharpoonup 0$ in $L^p$. But this is equivalent to $u_n \rightharpoonup 0$ in $W^{1,p}$.
EDIT: Boundedness of $u_n \in L^p$ (i.e. $\|u_n\|_p \leq C$ for all $n$) is used as follows: Let $f \in L^q$. Then there is $g \in C_c^\infty$ with $\|f - g\|_q < \epsilon$ and we get $$ |\langle f, u_n\rangle| \leq |\langle f - g, u_n\rangle| + |\langle g, u_n\rangle| \leq \|u_n\|_p \|f - g\|_q + |\langle g, u_n\rangle| \leq C \epsilon + |\langle g, u_n\rangle| \to C \epsilon, $$ from which it is not too hard to derive $\langle f, u_n\rangle \to 0$. The same argument applies with $u_n$ replaced by $u_n '$.
For $p=\infty$, the claim is true (surprisingly, for me). The general idea is that while the dual of $L^\infty$ is complicated (not even separable), we are only looking at functions in $C_0 (\Bbb{R})$, i.e. those which are continuous and vanish at infinity. Now, let $f \in (L^\infty)^\ast$ be arbitrary. Note that $f|_{C_0 (\Bbb{R})}$ is a bounded linear functional on $C_0$. Now, the dual of $C_0$ is precisely the space of finite (regular) Borel measures on $\Bbb{R}$, see e.g. https://regularize.wordpress.com/2011/11/11/dual-spaces-of-continuous-functions/. Thus, there is a finite (regular) Borel measure $\mu$ on $\Bbb{R}$ satisfying $f(u) = \int f \, d\mu$ for all $u \in C_0$.
But $u_n \to 0$ pointwise and $|u_n| \leq 1 \in L^1(\mu$), so that the dominated convergence theorem yields $f(u_n) = \int u_n \, d\mu \to \int 0 \, d\mu = 0$. The same argument also shows $f(u_n ') \to 0$. As above, we conclude $u_n \rightharpoonup 0$ in $W^{1,\infty}$.