I was wondering how to express the closed-form solution of the following double line integral in $ \mathbb{R}^n$ :

$ $ \int_{\mathbf{x}_1}^{\mathbf{x}_2} \int_{\mathbf{y}_1}^{\mathbf{y}_2} \frac{1}{|\mathbf{x} – \mathbf{y}|} d\mathbf{x} d\mathbf{y} $ $

where

$ $ \mathbf{x} = [x_1, x_2, \dots, x_n]^T $ $ $ $ \mathbf{y} = [y_1, y_2, \dots, y_n]^T $ $ $ $ |\mathbf{x}| = \sqrt{\sum_{k=1}^n|x_k|^2} $ $ $ $ |\mathbf{y}| = \sqrt{\sum_{k=1}^n|y_k|^2} $ $

given that $ \mathbf{x}_1, \mathbf{x}_2, \mathbf{y}_1, \mathbf{y}_2$ are all distinct from each other and the lines $ \mathbf{x}_1, \mathbf{x}_2$ and $ \mathbf{y}_1, \mathbf{y}_2$ do not cross each other. That is, it is granted that $ |\mathbf{x} – \mathbf{y}| > 0$ when evaluating the integral.

I thought on using coordinate translation to do the integration along the line $ \mathbf{z}_1, \mathbf{z}_2$ in relation to the origin

$ $ \int_{\mathbf{z}_1}^{\mathbf{z}_2} \frac{1}{|\mathbf{z}|} d\mathbf{z} = \ln{\frac{ \sum_{k=1}^n \mathbf{z}_{2,k}(\mathbf{z}_{2,k} – \mathbf{z}_{1,k}) + \sqrt{ (\sum_{k=1}^n \mathbf{z}_{2,k}) (\sum_{k=1}^n (\mathbf{z}_{2,k} – \mathbf{z}_{1,k})) } }{ \sum_{k=1}^n \mathbf{z}_{1,k}(\mathbf{z}_{2,k} – \mathbf{z}_{1,k}) + \sqrt{ (\sum_{k=1}^n \mathbf{z}_{1,k}) (\sum_{k=1}^n (\mathbf{z}_{2,k} – \mathbf{z}_{1,k})) } }} $ $

where $ \mathbf{z}_{1,k}$ is the $ k$ -th coordinate of the point $ \mathbf{z}_{1}$ .

But then I run out of ideias on how to proceed further and do the second integral taking advantage of that result…