Weak derivative of logarithm function I am trying to calculate the weak derivative of the function 
$$u(x)=\log\log\left(1+\frac{1}{|x|}\right)$$
where $x \in B(0,1) \subset \mathbb{R}^n$ for $n>1$. I know that 
$$\nabla u(x)=-\frac{1}{\log\left(1+\frac{1}{|x|}\right)}\frac{1}{1+\frac{1}{|x|}}\frac{x}{|x|^2} = -\frac{x}{\log\left(1+\frac{1}{|x|}\right)|x|(|x|+1)}$$
but I need check this from the definition of a weak derivative.
Can somebody please help me? Thanks.

Note that the domain has to be smaller than the unit ball, otherwise the function has a singularity at $|x|=\frac1{e-1}<1$.
I choose $B(0,1/e)$.

Take a smooth test function $\phi\in C_0^\infty(B(0,1/e))$. You need to verify
$$
\int_{B_1} u \nabla \phi = - \int_{B_1} \nabla u \phi
$$
with $\nabla u$ given by your formula.
The trick is to integrate over $B(0,1/e)\setminus B(0,\epsilon)$, $\epsilon\in(0,1/e)$ first, then let $\epsilon\searrow 0$.
Set $A_\epsilon:=B(0,1/e)\setminus B(0,\epsilon)$, $\Gamma_\epsilon:=\partial B(0,\epsilon)$.
Due to integration by parts (everything is smooth here!)
$$
\int_{A_\epsilon} u \nabla \phi = -\int_{A_\epsilon} \nabla u \phi 
+ \int_{\Gamma_\epsilon} u \phi n,
$$
where $n$ is the outer normal vector, here $n(x) = -\frac{x}{|x|}$.
You need to verify that $u,\nabla u\in L^1(B(0,1/e))$, which can be done using polar coordinates. Then the first two integrals converge for $\epsilon\searrow 0$.
Then you have to verify that the boundary integral converges to zero, which amounts to proving that
$$
\epsilon^{n-1}\log\log(1+\epsilon^{-1}))\to 0.
$$

To see that $\nabla u$ is in $L^1$, note that one can estimate
$$
|\nabla u|\le \frac1{|\log(1+|x|^{-1})|}.
$$
Then integrate this on $B_{1/e}(0)$ to get
$$
\int_0^{1/e} \frac{ r^{n-1}}{|\log(1+r^{-1})|} \le \int_0^{1/e} \frac{r^{n-1}}{|\log(1+e)|}<\infty.
$$
Similarly, one shows $u\in L^1$.
