Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm very sorry because it may be a very basic question but I'm not able whether to solve it for sure, nor to find an answer in stackexchange or elsewhere.

I have to calculate

$ \int \int n(\vec{r})u(||\vec{r}-\vec{r}'||) n(\vec{r}') d\vec{r} d\vec{r}'$

For some purpose, I have a case where $n(\vec{r})=n$ is a constant value.

I thus have

$ n^2 \int\int u(||\vec{r}-\vec{r}'||) d\vec{r} d\vec{r}' $

Let emphasis that $u$ is a spherically symetric function (radial in my physicist vocabulary), so that

$ n^2 \int\int u(||\vec{r}-\vec{r}'||) d\vec{r} d\vec{r}' = n^2 \int\int u(r) d\vec{r} d\vec{r}' $ (if it was unclear before)

Each integration is over all space in 3 dimensions.

Here is my question: I am right to say that

$n^2 \int\int u(r) d\vec{r} d\vec{r}' = 4 \pi n^2 \int u(r) r^2 dr $


My thought is that $u$ being independent of $\theta$ and $\psi$, the integration over these angles lead to the solid angle of the whole sphere : $4\pi$. The rest stays ...

share|cite|improve this question
...and $u(r)$ is? – J. M. Jul 21 '11 at 16:02
Unless $u$ is essentially zero, the integral $\int u(||\vec{r}-\vec{r}'||)d\vec{r}d\vec{r}'$ cannot be finite. The change of variables $\vec{s}=\vec{r}'-\vec{r}$ makes the integral to $\int u(||\vec{s}||) d\vec{s} d\vec{r}$, and the integrant doesn't depend on $\vec{r}$. – user8268 Jul 21 '11 at 19:00
Sorry if the question was unclear: I wanted to ask if my last equation line is right (going from spherical to radial integration for a spherically symmetric function $u$). What $u$ is isn't important as this integration will be done numerically for any kind of $u$ (it's a two centers interaction potential let's say a Lennard Jones 6-12 for instance). Thank you Joriki et al! @Alice: Hi! it is indeed very linked in the sens that now that I understand this, I can understand your demonstration for my other question! Once more thank your! – max Jul 22 '11 at 17:00
up vote 2 down vote accepted

Contrary to what I wrote in a comment when I hadn't noticed yet that you went from a double integral to a single integral, this isn't right; you can't just drop one of the integrals.

If I understand your notation correctly, $r=\lVert\vec r-\vec r'\rVert$ (which is slightly confusing, since $r$ is usually used to denote $\lVert\vec r\rVert$). By substituting $\vec r''=\vec r-\vec r'$, we can factor the integrals:

$$\iint u(\lVert\vec r-\vec r'\rVert)\mathrm d\vec r\mathrm d\vec r'=\iint u(\lVert\vec r''\rVert)\mathrm d\vec r''\mathrm d\vec r'=\int u(\lVert\vec r''\rVert)\mathrm d\vec r''\mathrm \int \mathrm d\vec r'\;.$$

(We could just as well have kept $\vec r$ and replaced $\vec r'$; since all the integrals are over all space, it makes no difference.) We can indeed transform the left-hand integral over $\vec r''$ into a radial integral:

$$\int u(\lVert\vec r''\rVert)\mathrm d\vec r''=4\pi\int u(r)r^2\mathrm d r\;.$$

But the right-hand integral over $\mathrm d\vec r'$ is infinite. So there's a fundamental problem in your setup. The function $n$ should usually be responsible for making the integral finite by decaying sufficiently quickly; the problem may be that you're taking it to be constant.

share|cite|improve this answer
Addendum for @Maximilien: if, as you say, you are taking $u(r)$ to be the LJ potential and are treating $n$ constant, small wonder that you've divergence... – J. M. Jul 22 '11 at 17:41
@Joriki: thanks a lot for this very clear explanation. In order to answer your very last sentence "small wonder that you've divergence": I use pair potential that converges to zero at a non-infinite radius. In fact, when people in my community say LJ potential, they mean troncated LJ potential. Sorry for the misunderstanding I should have been more careful. Thanks again I am very happy with your answer. – max Jul 23 '11 at 10:00
@Maximilien: You're welcome. Note that "small wonder that you've divergence" is from J.M.'s comment, not from me. J.M.'s point is valid despite your explanation, since the potential converges to zero at a non-infinite radius $\lVert \vec r-\vec r'\rVert$, whereas the infinite contribution to your double integral comes from values near $\vec r-\vec r'=0$, of which the double integral contains an infinite measure since you approximated $n$ by a constant. The problem is not solved by truncating the LJ potential; you need the decay in $n$ to make the integral finite. – joriki Jul 23 '11 at 10:17
As I told before ... I'm not used to deal with mathematics but I'm hunger to learn. Thanks @joriki and J.M. for your remarks. Here is the point about the values near $\vec{r}-\vec{r}'=0$: the LJ potential is also modified at small $r$, for instance using the Weeks-Chandler-Andersen scheme (this question is related to our study of perturbation theory for hard spheres thermodynamics) – max Jul 23 '11 at 17:28
@Maximilien: No matter how you modify the potential, as long as it's not zero everywhere, the non-zero values will get multiplied by the infinite integral over $\vec r'$. This isn't about either the short-range behaviour or the long-range behaviour of the potential; it's about the fact that if the interacting densities are constant, then for every value of $\lVert\vec r-\vec r'\rVert$ there's an infinite measure of configurations with that value contributing with constant density. – joriki Jul 23 '11 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.