I am asked to evaluate de following integral: $$\int_{0}^{1} \int_{0}^{1} \frac{1}{\sqrt{|x-y|}} \mathrm{d}x\mathrm{d}y$$
My attempt.
Note that $$ \frac{x-y}{|x-y|} = 1, \text{ if } x-y > 0 \qquad\qquad \text{ and } \qquad\qquad \frac{y-x}{|x-y|} = 1, \text{ if } x-y < 0 $$
Thus, \begin{align*} &\int_{0}^{1} \int_{0}^{1} \frac{1}{\sqrt{|x-y|}} \mathrm{d}x \mathrm{d}y % = \int_{0}^{1} \int_{0}^{1} \frac{1}{\sqrt{|x-y|}} \frac{x-y}{|x-y|} \mathrm{d}x \mathrm{d}y \\[5pt] % &\implies \int \frac{1}{\sqrt{|x-y}} \frac{x-y}{|x-y|} \mathrm{d}x % = \int \frac{1}{\sqrt{u}} \mathrm{d}u % = 2u^{\frac{1}{2}} + k \qquad\qquad \left( u = |x-y|, \, \mathrm{d}u = \frac{x-y}{|x-y|} \mathrm{d}x\right)\\[5pt] % &\implies \int_{0}^{1} \frac{1}{\sqrt{|x-y|}} \frac{x-y}{|x-y|} \mathrm{d}x % = 2 \sqrt{|x-y|} \Big|_{0}^{1} % = 2 \sqrt{|1-y|} - 2 \sqrt{|-y|} % = 2 \left( \sqrt{1-y} - \sqrt{y} \right)\\[5pt] % &\implies 2\int_{0}^{1} \left[ \sqrt{1-y} - \sqrt{y} \right] \mathrm{d}y % = -\tfrac{4}{3} \left[ (1-y)^{3/2} + y^{3/2} \right] \Big|_{0}^{1} % = 0 \end{align*}
According to WolframAlpha this answer is incorrect and the actual value should be $\frac{8}{3}$.
Moreover, throwing the indefinite integral with respect to x to Wolfram yields $\sqrt{y-x}(\operatorname{sgn}(x-y)-1) + \sqrt{x-y}(\operatorname{sgn}(x-y)+1)$. For this last result I have no clue on how to get there...
Also, integration in the given bounds should not be a problem since removing the line y=x (where the function is not determined) is a set of length 0.
Your very first step contains an error, since multiplication by $(x-y)/|x-y|$ on the unit square will cause the sign of the integrand to be reversed for the region $x < y$. This is why you get $0$.
Instead, recognize the symmetry of the integrand about $x = y$ and compute the half integral $$\int_{y=0}^1 \int_{x=y}^1 \frac{1}{\sqrt{|x-y|}} \, dx \, dy = \int_{y=0}^1 \int_{x=y}^1 \frac{1}{\sqrt{x-y}} \, dx \, dy = \int_{y=0}^1 \int_{u=0}^{1-y} \frac{1}{\sqrt{u}} \, du \, dy.$$