I was reading stuffs about Riesz energy which is defined for an open subset $U\in\mathbb{R}^d$ by $I\_s(U)=\int\_U\int\_U|x-y|^{-s}\ dx\ dy$ where $dx$ and $dy$ are Lebesgue measure in $U$. Now if I take for simplicity $U$ to be a ball I am not sure how to evaluate the integration. If I shift the integral to origin i.e like calculating the integral $|x|^{-s}$ over a ball is fine using polar change of coordinate. But here it's not only in one ball over another ball also, I am not sure how to evaluate it or I am missing something. Any help is very much appreciated for my understanding.



Calculation of Riesz energy for balls
This is just an extended comment to [Iosif Pinelis's answer](https://mathoverflow.net/a/452021/108637) above, which provides an answer in terms of an unknown constant $C\_{d,s}$. Here we evaluate this constant.


Let $B$ be the unit ball. If $f(x)=(1-|x|^2)^p$ if $x\in B$ and $f(x)=0$ otherwise, then
$$(-\Delta)^{\alpha/2}f(x)=2^\alpha\frac{\Gamma(p+1)\Gamma(\frac{d+\alpha}2)}{\Gamma(p+1-\frac\alpha2)\Gamma(\frac d2)}{\_2F\_1}(\tfrac{d+\alpha}2,\tfrac\alpha2-p;\tfrac d2;|x|^2).$$
Here $p > -1$, ${\_2F\_1}$ is the Gauss's hypergeometric function, and $(-\Delta)^{\alpha/2}$ is the fractional Laplace operator for $\alpha > 0$ and the Riesz potential operator for $\alpha \in (-d, 0)$.


I would not be surprised if the above formula actually appeared in some paper by Boris Rubin, Stefan Samko, or one of the other authors working on Riesz potentials, but as far as I can tell, for $\alpha \in (0, 2)$ this is due to Bartłomiej Dyda [DOI:10.2478/s13540-012-0038-8](https://doi.org/10.2478/s13540-012-0038-8), and extension to an arbitrary $\alpha > -d$ is given in my paper with Bartłomiej Dyda and Alexey Kuznetsov [DOI:10.1007/s00365-016-9336-4](https://doi.org/10.1007/s00365-016-9336-4); for further discussion, see my survey [DOI:10.1515/9783110571622-007](https://doi.org/10.1515/9783110571622-007).


We set $p=0$ and $\alpha=s-d$ to get
$$(-\Delta)^{-(d-s)/2}\mathbb 1\_B(x)=2^{s-d}\frac{\Gamma(\frac s2)}{\Gamma(1+\frac{d-s}2)\Gamma(\frac d2)}{\_2F\_1}(\tfrac s2,\tfrac{s-d}2;\tfrac d2;|x|^2).$$
Using the definition of the Riesz potential operator, this translates to
$$\int\_B|x-y|^{-s}dy=\frac{2\pi^{d/2}}{(d-s)\Gamma(\frac d2)}{\_2F\_1}(\tfrac s2,\tfrac{s-d}2;\tfrac d2;|x|^2).$$
Integrating this with respect to $x\in B$, we obtain
$$\int\_B\int\_B|x-y|^{-s}dydx=\frac{4\pi^d}{(d-s)(\Gamma(\frac d2))^2}\int\_0^1r^{d-1}{\_2F\_1}(\tfrac s2,\tfrac{s-d}2;\tfrac d2;r^2).$$
Using [http://functions.wolfram.com/07.23.21.0003.01], we find that
$$\int\_B\int\_B|x-y|^{-s}dydx=\frac{4\pi^d{\_2F\_1}(\tfrac s2,\tfrac{s-d}2;1+\tfrac d2;1)}{d(d-s)(\Gamma(\frac d2))^2},$$
and [http://functions.wolfram.com/07.23.03.0002.01] leads to
$$\int\_B\int\_B|x-y|^{-s}dydx=\frac{4\pi^d\Gamma(1+\tfrac d2)\Gamma(1+d-s)}{d(d-s)\Gamma(1+\frac{d-s}2)\Gamma(1+d-\frac s2)(\Gamma(\frac d2))^2}.$$
After some simplification, we arrive at
$$\int\_B\int\_B|x-y|^{-s}dydx=\frac{2^{d-s+1}\pi^{d-1/2}\Gamma(\frac{1+d-s}2)}{(d-s)(d-\frac s2)\Gamma(\tfrac d2)\Gamma(d-\frac s2)}.$$
(Watch out: this may be full of typos! I only checked the final answer for $d = 1$, and it seems to agree with the result of an explicit calculation.)


