# A function in $W^{1,p}(\Omega)$ for $1 < p < n$ which is not differentiable a.e

I'm seeking a function which belongs to $W^{1,p}(\Omega)$ for $p < n$ which is not differentiable a.e. There is a standard theorem which shows that if $p > n$ then in fact any function in $W^{1,p}$ is differentiable a.e. I would like an example where a weak derivative exists, lies in $W^{1,p}$ for $p < n$ but fails to be differentiable a.e.

• ((not differentiable) a.e.) or (not (differentiable a.e.)) ? – user5810 Sep 10 '10 at 5:46

Pick a number $\alpha$ with $0<\alpha< n/p-1$ and a smooth, nonnegative function $g(r)$ defined for $r>0$ with $g(r)=r^{-\alpha}$ when $r$ is small, $g(r)=0$ when $r$ is large. Then $x\mapsto g(|x|)$ belongs to $W^{1,p}(\mathbb{R}^n)$. Write $$f(x)=\sum_{i=1}^\infty 2^{-i}g(|x-q_i|)$$ where $(q_i)$ is a dense sequence in $\mathbb{R}^n$. The series converges in $W^{1,p}(\mathbb{R}^n)$ and the sum is unbounded in any neighbourhood of any $q_i$, hence unbounded in any nonempty open set. Differentiability is rather hard to achieve under those circumstances.
(Edit: Need $g\ge0$.)
Using a similar construction as in the answer of Harald Hanche-Olsen and the function $$g(|x|)=\log|\log|x||$$ which belongs to $$W^{1,n}$$ in a neighborhood of the origin, one can construct a function $$f\in W^{1,n}(\mathbb{R}^n)$$ which is discontinuous everywhere. In fact one can obtain a function with the property that the essential supremum on every open set is $$+\infty$$ and the essential infimum on every open set is $$-\infty$$.