Let $B$ denotes the open unit ball in $\mathbb{R}^n$. For what value does the function
$$f(x) = |x|^m$$
belongs to $W^{1,p}(B)$.
My answer is $m>2-n$, but I am not sure if it is correct. The partial derivative is
$$\frac{\partial f}{\partial x_i} = m x_i |x|^{m-2}$$
using the fact that $|x|^{-k}$ is in $L^1_{loc}(B)$ if $k<n$. Thus if $m>2-n$, we have
$$ ||f||_{L^p} + ||\frac{\partial f}{\partial x_i}||_{L^p} < + \infty$$
which is the definition of $W^{1,p}(B)$. Am I missing something?