As part of my seminar this semester, I need to show that $f(x) = \log\log(\frac{e}{\Vert x \Vert_{2}}) \in W^{1,p}(B_1(0))$. I have shown that $f$ is indeed in $L^p$, but could use some help proving that the partial derivative is in $L^p$. The partial derivative is given by
$$\int_{B_1(0)} \left(\frac{2x_i}{\Vert x \Vert_2^2(\log(\Vert x \Vert_2^2)-2)}\right)^p dx_i$$
Can anyone help with showing that the integral exists?
This is only true for $p\le n$, where $n$ is the dimension of the space, and that only when $n\ge 2$. The case $p=n$ is the most interesting one: this function is a canonical counterexample to the embedding $W^{1,n}\to L^\infty$.
To show integrability, work in polar/spherical coordinates. Near the origin the integrand is bounded by $C\|x\|^{-p}\log^{-p}\|x\|^2$. Integration in spherical coordinates reduces this to $$ \int_0^\epsilon r^{n-1-p} \log^{-p}r\,dr $$ When $p<n$, this converges due to the exponent of $r$ being greater than $-1$. When $p=n\ge 2$, the exponent of $r$ is borderline, but logarithmic term tips the balance in favor of convergence.
I should add that merely having pointwise derivatives in $L^p$ does not make the function in $W^{1,p}$. One has to somehow justify that these pointwise derivatives are weak derivatives. In the present case, the function is smooth in the punctured ball, which suffices for this conclusion.