If $(m-1)p\geq n$, $u(x)=|x|$ does not belong to $W^{m,p}(B(0,1))$. Suppose $(m-1)p\geq n$. I tried proof that $u(x)=|x|$ does not belong to $W^{m,p}(B(0,1))$. I was able to calculate
$|D^0u|=|x|$, $|D^1u|=1$ and $|D^2u|=\sqrt{\dfrac{1-|x|_s^2}{|x|^2}}$.
Here $D^ju$ represents the $N^j$-vector of all partial weak derivatives of $u$ of order $j$, $|D^ju|$ stands for the Euclidean norm of this vector and $|x|_s$ stand for the sum norm. But I was not able to calculate $|D^mu|$ and check that
$$\int_B|D^mu|^pdx=\infty.$$
 A: The main property of $u$ here is that it's $1$-homogeneous, i.e. 
$$
u(\lambda x) = \lambda u(x) 
\qquad \text{for every } x \in \mathbb R^n \setminus \{ 0 \}, \ \lambda > 0.
$$
Differentiating this identity $m$-times (with $\lambda$ fixed), we deduce that $\nabla^m u$ is $(1-m)$-homogeneous, i.e. 
$$
\nabla^m u(\lambda x) = \lambda^{1-m} \nabla^m u(x) 
\qquad \text{for every } x \in \mathbb R^n \setminus \{ 0 \}, \ \lambda > 0.
$$
Integrating over $B(0,1) \setminus \{ 0 \}$, we obtain 
\begin{align*}
\int_{B(0,1) \setminus \{ 0 \}} |\nabla^m u (x)|^p \, d x
& = \int_0^1 r^{n-1} \int_{\partial B(0,1)} |\nabla^m u (r y)|^p \, dy \, dr\\
& = \int_0^1 r^{n-1} \int_{\partial B(0,1)} (r^{1-m}|\nabla^m u (y)|)^p \, dy \, dr,
\end{align*}
which is up to a constant equal to
$$
\int_0^1 r^{n-1} (r^{1-m})^p dr.
$$
This happens to be infinite for $p(m-1) \ge n$. 

On the other hand, if $u$ were to lie in $W^{m,p}(B(0,1))$, its weak derivative $\nabla^m u$ would coincide with the classical derivative in $B(0,1) \setminus \{ 0 \}$, contradicting the calculations above. 
