Let $u:(0,\infty) \to \mathbb{R}$ be such that $u' \in L^2(0,\infty)$, but $u \notin L^2(0,\infty)$. However $u \in L^2(0,T)$ for all finite $T$.
Is it possible to find a sequence of functions $u_n \in L^2(0,\infty)$ with $u_n' \to u'$ in $L^2(0,\infty)$?
I'm thinking about multiplying $u$ with a smooth cut-off function, so $u_n = u\psi_n$ but I don't see any properties of the cut-offs $\psi_n$. Can someone give me some help or reference? Thanks.
You're on the right track, but using the cut-off function on $u$ itself will lead you into trouble with the derivative. Instead, use it on $u'$ and take the integral.
Let $\varphi_n\in C^\infty_c(0,\infty)$ be such that $\varphi=0$ on $(0,\frac1n)\cup(2n,\infty)$, $\varphi=1$ on $(\frac2n,n)$ and $0\le\varphi\le1$ otherwise. For $x\in(0,\infty)$ define $$u_n(x):=\int_{2n}^xu'\varphi_n\ \mathrm{d}t=\int_0^xu'\varphi_n\ \mathrm{d}t-\int_0^{2n}u'\varphi_n\ \mathrm{d}t$$ Observe that $|u_n|\le2\left(\int_0^{2n}|u'|\right)\mathbf1_{(0,2n)}$, and so $$\|u_n\|_2\le4n\int_0^{2n}|u'|\le4n\|u'\|_2(2n)^{1/2}<\infty$$ where the last step comes from Holder's inequality. Hence $u_n\in L^2(0,\infty)$. Moreover, if $\phi\in C^\infty_c(0,\infty)$ then letting $c_n=\int_0^{2n}u'\varphi_n$ we have \begin{align*} \int u_n\phi'&=\int_0^\infty\int_0^xu'(t)\varphi_n(t)\phi'(x)\ \mathrm{d}t\mathrm{d}x-c_n\int_0^\infty\phi'(x)\ \mathrm{d}x\\ &=\int_0^\infty\int_t^\infty u'(t)\varphi_n(t)\phi'(x)\ \mathrm{d}x\mathrm{d}t\\ &=-\int_0^\infty u'(t)\varphi_n(t)\phi(t)\ \mathrm{d}t \end{align*} and so $u_n$ is weakly differentiable with $u_n'=u'\varphi_n$. The dominated convergence theorem implies $u'\varphi_n\to u'$ in $L^2$, so we are done.