Discontinuous Sobolev Function

I'm trying to show that there's an $f \in H^1(\mathbb{R}^2)$ which is not ae equal to a continuous function. Per a couple of suggestions, I've decided to look at the function $f(x) = (-\log(|x|))^{\frac{1}{2}}$ for $|x| < 1$ and $0$ otherwise. It's not hard to see that $f \in L^2(\mathbb{R}^2)$ and that $f$ is differentiable everywhere on $\mathbb{R}^2 \setminus (\mathbb{S}^1 \cup \{0\})$.

In $|x| < 1$, $\frac{\partial f}{\partial x_j}(x) = \frac{-x_j}{|x|^2 (-\log(|x|)^{\frac{1}{2}})} $. But, unless I'm missing something really obvious (and I think I am!), this isn't square integrable on $|x| < 1$ (integrating in polar coordinates reduces to evaluating something of the form $\int_0^1 \frac{1}{r \log(r)} dr$. I've also looked at $( - \log(|x|)^{\alpha}$ for various values of $\alpha$, but none of these functions seem to have a derivative which is square integrable on $|x| < 1$.

Can someone point me in the right direction here?

Edit:

Suppose that $f(x) = (- \log(|x|))^{\alpha}$ for $|x| < \frac{1}{2}$, say. Then for $f \in L^2$, we need to have that $\int_{B(0; \frac{1}{2})} (f(x))^2 < \infty$. Integrating in polar coordinates, that is

$\displaystyle \int_0^{\frac{1}{2}} r (-\log(r))^{2 \alpha} dr < \infty$. So we can use any value of $\alpha > 0$ here.

Next, in $\{|x| < \frac{1}{2}\}$, $\frac{\partial f}{\partial x_j}(x) = \alpha (-\log(|x|))^{\alpha - 1} (\frac{-1}{|x|}) \frac{x_j}{|x|} = \frac{ - \alpha x_j (-\log(|x|))^{\alpha - 1}}{|x|^2}$.

For this to be in $L^2$, I'd need that

$\displaystyle -\infty > \alpha\pi \int_0^{\frac{1}{2}} r(\frac{r (-\log(r))^{\alpha - 1}}{r^2})^2 dr = -\alpha \pi \int_0^{\frac{1}{2}} \frac{1}{r} (-\log(r))^{2\alpha - 2} dr$

but that never happens for any value of $\alpha$ (that's easy to see by making the substitution $u = (- \log(r))$.

So I must be doing something horribly wrong here, but I don't see where.


Solution 1:

For the unit circle $U=\{x\in\mathbb{R}^2\,\colon\, |x|<1\}$, a routine example is something like that $$ f(x)= \begin{cases} \ln{\ln{\frac{1}{|x|}}},\quad |x|<e^{-2},\\ \ln{2}, \quad |x|\geqslant e^{-2}. \end{cases} $$ To show that $f\in L^2(U)$, take a remarkable limit $$ \lim_{|x|\to 0}|x|^{\mu}\!\!\cdot\!\ln{\frac{1}{|x|}}=0\quad \forall\,\mu>0,\tag{1} $$ and notice that $(1)$ yields $$ \lim_{|x|\to 0}|x|^{\mu}\!\!\cdot\!\ln\Bigl(\ln{\frac{1}{|x|}}\Bigr)=0\quad \forall\,\mu>0.\tag{2} $$ But $(2)$ implies that $$ C_{\mu}\overset{\rm def}=\sup_{x\in U}|x|^{\mu}\!\!\cdot\!\ln\Bigl(\ln{\frac{1}{|x|}}\Bigr)<\infty\quad\forall\, \mu>0, $$ whence follows inequality $$ \int_{U}|f(x)|^2dx\leqslant C^2_{\mu}\int_{U}\frac{dx}{|x|^{2\mu}}= \frac{\pi}{1-\mu} C^2_{\mu} $$ with some $\mu\in (0,1)$, while $$ \int_{U}|\nabla f(x)|^2 dx=\int\limits_{|x|<e^{-2}}\frac{dx}{|x|^2 \bigl(\ln{\frac{1}{|x|}}\bigr)^2}= 2\pi\!\!\int\limits_0^{e^{-2}}\frac{dr}{r(\ln{r})^2}=-\frac{2\pi}{\ln{r}}\biggr|_0^{e^{-2}}=-\frac{2\pi}{-2}+\frac{2\pi}{-\infty}=\pi. $$