# How do I find the weak derivative of this function?

I am trying to find a weak derivative for the function $$f(x,y) = \sqrt{-\log\sqrt{x^2+y^2}}$$ on the unit disc. I believe that $$g_x = \frac{-x}{2(x^2+y^2)\sqrt{-\log\sqrt{x^2+y^2}}}$$ and $$g_y = \frac{-y}{2(x^2+y^2)\sqrt{-\log\sqrt{x^2+y^2}}}$$ are the weak partial derivatives.

I am having a great deal of difficulty making any headway with this problem. Dealing with rectangular coordinates on the unit disc makes dealing with the boundaries quite difficult, so I decided to try the one dimensional case where $$f(x) = \sqrt{-\log|x|}.$$ If $$\phi\in C_c^\infty$$ has support in $$[0,1]$$, then we can write

$$\int_{-1}^1f\phi' = \int_{-1}^{-\epsilon}f\phi' + \int_{-\epsilon}^\epsilon f\phi' + \int_\epsilon^1f\phi'$$ $$= \left[f(-\epsilon)\phi(-\epsilon) - \int_{-1}^{-\epsilon}f'\phi\right] + \int_{-\epsilon}^\epsilon f\phi' - \left[f(\epsilon)\phi(\epsilon) + \int_\epsilon^1f'\phi\right]$$

But it does not seem like I can do anything here. Any hints for this one dimensional case, and for dealing with the awkwardness of rectangular coordinates over the unit disc in the main case would be greatly appreciated.

We need to show that $$\forall \phi\in C_c^\infty(\mathbb{D})$$ we have $$\int_\mathbb{D}f\nabla \phi = -\int_\mathbb{D}\nabla f \phi.$$ Notice that outside of a ball $$B(0,\epsilon)$$ both functions are smooth. So a version of integration by parts holds. So we have that $$\int_{\mathbb{D}\setminus B(0,\epsilon)}f\nabla \phi = \int_{\partial B(0,\epsilon)}f\phi \mathbf{n} - \int_{\mathbb{D}\setminus B(0,\epsilon)}\nabla f \phi$$ where $$\mathbf{n}$$ is the outward normal vector.
Now we want to show that the middle integral goes to 0 as $$\epsilon \rightarrow 0$$, and that $$f, \nabla f \in L^1(\mathbb{D})$$ so that the remaining integrals converge as $$\epsilon \rightarrow 0$$.\newline For the middle integral, notice that $$f = \sqrt{-\log\epsilon}$$ on the domain of integration so that $$\int_{\partial B(0,\epsilon)}f\phi \mathbf{n} = \sqrt{-\log\epsilon}\int_0^{2\pi}\mathbf{n} \epsilon dt$$ which goes to 0 if $$\epsilon\sqrt{-\log\epsilon} \rightarrow 0$$.\newline
Now to show that $$f\in L^1(\mathbb{D})$$ $$\int_\mathbb{D}|f|= 2\pi\int_0^1r\sqrt{-\log r}dr = 2\pi\left(\int_0^\frac{1}{e}r\sqrt{-\log r}dr + \int_\frac{1}{e}^1r\sqrt{-\log r}dr\right)$$ $$\leq 2\pi\left(\int_0^\frac{1}{e}r(-\log r) dr + \int_\frac{1}{e}^1rdr\right) < \infty$$ For $$\nabla f$$, we have $$\int_\mathbb{D}|\nabla f| = 2\pi\int_0^1\frac{r}{2r^2\sqrt{-\log r}}rdr \leq \pi\int_0^1\frac{1}{\sqrt{1-r}}dr = 2\pi$$