[Math] Can there exist a function that has a weak derivative, but is not differentiable almost everywhere

partial differential equationssobolev-spacesweak-derivatives

I am currently learning about Sobolev spaces, and I am trying to build some intuition of weak derivatives. My current intuition is imagining the weak derivative of f as a function equal to f's derivative almost everywhere. However, this assumption assumes that f is differentiable almost everywhere. Is this always the case for weakly differentiable functions?

Best Answer

If $p>n$, then the function is differentiable a.e. and the derivative coincides with the weak derivative a.e.

If $p\leq n$ (or even $f\in BV$) the function is only approximately differentiable a.e.

Both results can be found in Evans & Gariepy, Measure theory and fine property of functions, section 6.1 (and if I recall correctly "a.e." can be replaced by "outside a set of zero $p$-capacity", which is slightly stronger).

To construct a counterexample to a.e. differentiability for $p$ strictly below $n$, consider a nonnegative function $\eta \in C^\infty (\mathbb{R}^n)$ with support in $B_1$ and with value $1$ on $B_{1/2}$, and enumerate the rationals as $\mathbb{Q}=\{q_i\}_{i\in \mathbb{N}}$. Choose a sequence $r_i\searrow 0$ to be specified later, and define $$f(x)=\sum_{i\in \mathbb{N}}\eta\left(\frac{x-q_i}{r_i}\right).$$ This is a dense sum of bumps with smaller and smaller support. By the scaling of the $L^p$ norms you can check that indeed $f\in W^{1,p}$, provided $\sum_{i\in \mathbb{N}}r_i^{\frac{n}{p}-1}<\infty$.

However, the support of $f$ is contained in $\bigcup_{i\in \mathbb{N}} B(q_i,r_i)$ which can be made as small as wanted by sending $r_i$ quickly to zero, therefore at most points the function is zero. On the other hand, $f$ has value at least $1$ on a dense set (and the same holds for any function in the same equivalence class), therefore it can not be differentiable where it attains value zero.

I couldn't come up with a similar counterexample for $f\in W^{1,n}(\mathbb{R}^n)$, but maybe a similar construction would work.