TITLE: Decay of $H^1(\mathbb{R}^n)$ functions
QUESTION [8 upvotes]: Is it true (is there a commonly known theorem) that says:
$f \in H^1(\mathbb R ^n)$ $\Rightarrow$ $\displaystyle \lim_{|x| \to \infty} f(x) = 0$ pointwise (where $H^1$ denotes the Sobolev space $W^{1,2}$)?
This can be inferred from the Sobolev embeddings for dimension sufficiently small, but is it true in general?

REPLY [3 votes]: This is true for $n = 1$, but false for $n \ge 2$. Recall, that for $n \ge 2$, there is a positive function $h \in H^1(\mathbb R^n) \setminus L^\infty(\mathbb R^n)$. Now, take a sequence $\{x_i\}$ with $|x_i| \to \infty$ and define
$$
f(x) = \sum_{i=1}^\infty 2^{-i} \, h(x - x_i).
$$
Then you have $f(x_i) = +\infty$ for all $i$ (if you want finite function values, take $\tilde x_i$ in a neighbourhood of $x_i$).
See also here, where I used a similar construction.