# Counter example in Sobolev spaces: Is there a standard example for showing that $H^1(\mathbb{R}^2)\not\subset L^\infty(\mathbb R^2)$?

One way to define the Sobolev space $H^s(\mathbb{R}^n)$ is as the completion of the $C^\infty$ functions on $\mathbb{R}^n$ under the norm $$\lVert f \rVert_{H^s(\mathbb{R}^n)}:= \left( \sum_{|\alpha|\leq s} \lVert \partial^\alpha f \rVert^2_{L^2(\mathbb{R^n})}\right)^{1/2}$$ where $\alpha=(\alpha_1,...,\alpha_n)$ with $|\alpha|:=\sum_{i=1}^n\alpha_i$ and $\partial^\alpha$ is the standard multi-index notation for partial derivatives. The Sobolev embedding theorems give $H^s(\mathbb{R}^n)\subset L^\infty(\mathbb{R}^n)$ whenever $n < s$.

What would be a standard example of $H^1(\mathbb{R}^2)\not\subset L^\infty(\mathbb{R}^2)$ (that is, an $L^2$ function in the plane having a weak first derivative in $L^2$ but the function itself unbounded in a set of positive measure).

I have come up with some involved example myself (defining it piecewise in an unelegant way), so I wonder if there is a simple enlightening example of this fact.

A standard example would be something like $$f(x,y)=\log\log(1+(x^2+y^2)^{-1}) \varphi(x^2+y^2)$$ or $$f(x,y)=\left[-\log(x^2+y^2)\right]^{1/4} \varphi(x^2+y^2)$$ where $\varphi$ is smooth, compactly supported, and equal to $1$ in a neighbourhood of zero.
The rationale here being that $H^1(\mathbb{R}^2)$ is embedded into $\operatorname{BMO}(\mathbb{R}^2)$, a space that happens to be strictly larger than $L^\infty(\mathbb{R^2})$ insofar as e. g. unbounded functions with logarithmic growth are contained in $\operatorname{BMO}$.
Here $\operatorname{BMO}$ refers to the space of functions of bounded mean oscillation.
Let $$j(x,y)=\left\{\begin{array}{lll}\exp\big((1-x^2-y^2)^{-1}\big) & \text{if} & x^2+y^2<1,\\ 0 & \text{if} & x^2+y^2\ge 1. \end{array}\right.$$ Then $j\in C^\infty(\mathbb R^2)$.
A function in $H^1(\mathbb R^2)\setminus L^\infty(\mathbb R^2)$ is the following $$f(x,y)=j(x,y)\log\big(\log(1+x^2+y^2)\big).$$