Functions that don't have a weak derivative in $L^p(\mathbb{R}^n)$ I'm studying weak derivatives, with the following definition:
$f \in L_{loc}^1(\mathbb{R}^n)$  has $j$-th weak derivative if there is a function $g$  such that:
$$
\int g(x) \phi(x)\mathrm{d}x = - \int f(x) \partial_j\phi(x)\mathrm{d}x \quad\forall \phi \in \mathscr{D}(\mathbb{R}^n)
$$
where $\partial_j\triangleq\frac{\partial}{\partial x_j}$ is the usual partial derivative respect to the $x_j$ variable.
And I've seen examples when $n=1$ that there are functions in $L_{loc}^1(\mathbb{R})$ that don't have a weak derivative.
I was wondering if there are such explicit examples in $L^p(\mathbb{R}^n)$.
If there are I would appreciate to see them or a proof that they always have weak derivative if that's the case.
 A: If $h \in L^1_{loc}(\mathbb{R})$ does not have a weak derivative, then
you can define $f$ via
$$f(x) = h(x_j)$$
and $f$ will not have a weak $j$-th derivative.
A: A simple example can be constructed as follows: consider the positive orthant
$$ 
\Bbb R_+^n=\times_1^n[0,\infty[
$$
and the associated characteristic function, i.e.
$$
\chi_{\Bbb R_+^n} (x)=
\begin{cases}
1 & x\in \Bbb R_+^n\\
0 & x\notin \Bbb R_+^n
\end{cases}.
$$
Then the function
$$
g(x)= \chi_{\Bbb R_+^n} (x) e^{-\| x\|^2}
$$
belongs to $L^p(\Bbb R^n)$ for all $1\le p\le\infty$ and also it is has no weak derivative, since for all $j=1,\ldots,n$, we have
$$
\begin{split}
\int\limits_{\Bbb R^n} g(x)\partial_j\phi(x)\mathrm{d}x &= \int\limits_{\Bbb R^n_+}  e^{-\| x\|^2} \partial_j\phi(x)\mathrm{d}x \\
&= \int\limits_{\Bbb R^{n-1}_+} \mathrm{d}x_{\mathbf{n-j}}  \int\limits_{0}^{+\infty} e^{-\| x\|^2} \partial_j\phi(x)\mathrm{d}x\\
&= \int\limits_{\Bbb R^{n-1}_+} \mathrm{d}x_{\mathbf{n-j}}\left[\phi\big(x_1,\ldots,\underset{j}{0},\ldots,x_n\big)e^{-\bigg(\sum\limits_{\overset{i=1}{ i\neq j}}^nx_i^2\bigg)}-\int\limits_{0}^{+\infty} \phi(x) \partial_j e^{-\| x\|^2} \mathrm{d}x \right]\\
&=\int\limits_{\Bbb R^{n-1}_+} \mathrm{d}x_{\mathbf{n-j}}\left[\delta_{x_j}\!\big(\phi(x)e^{-\| x\|^2}\big)-\int\limits_{0}^{+\infty} \phi(x) \partial_j e^{-\| x\|^2} \mathrm{d}x \right]\\
&\neq \int\limits_{\Bbb R^{n}} f(x)\phi(x)\mathrm{d}x \qquad \forall f \in L^p(\Bbb R^n),\; 
\end{split}
$$
where

*

*$\mathbf{n-j}\triangleq (1,2,\ldots,\overset{j}{0},\ldots,n)\iff \mathrm{d}x_{\mathbf{n-j}} = \mathrm{d}x_{{1}}\cdot\ldots\cdot\mathrm{d}x_{{j-1}}\cdot \mathrm{d}x_{{j+1}}\cdot\ldots\cdot\mathrm{d}x_{{n}}$ is the $n-1$-dimensional Lebesgue measure and

*$\delta_{x_j}$ is the Dirac measure supported on the hyperplane $H_{x_j}=\{x\in\Bbb R^n : x_j=0 \}$.

