# Numerical integration of oscillatory integrand

Having two points $$\vec{r_1}$$ and $$\vec{r_2}$$ I interested in calculating the following integral $$\int_{0}^{\infty} exp(-ar)r_1r_2dr_1dr_2d\phi_1d\phi_2$$, where

$$r = |r_1-r_2| = \sqrt{r_1^2+r_2^2-2r_1r_2cos(\phi_1-\phi_2)}$$ is the distance between points. By putting the coordinate system origin to the position of one of points, this integral can be easily calculated:

(4Pi^2)Integrate[Exp[-a*r]^2 r, {r, 0, Infinity}, Assumptions -> a > 0]

with the answer (Pi^2)/(a^2). Now if consider the origin of the coordinate system in some other point and performing numerical integration I expect to get the result close to that:

resNumerical = Table[
NIntegrate[
Exp[-2 a Sqrt[(r1^2 + r2^2 - 2 r1*r2*Cos[\[Phi]1 - \[Phi]2])]] r1*r2,
{r1, 0, Infinity},
{r2, 0, Infinity},
{\[Phi]1, 0, 2 \[Pi]},
{\[Phi]2, 0, 2 \[Pi]},
MinRecursion -> 3],
{a, 1, 3, 0.5}]


which I get (* {4283.66, 553.123, 311.001, 193.66, 132.923} *). These are much bigger numbers than

In:= resAnalytical = Table[Pi^2/a^2, {a, 1, 3, 0.5}]
Out= {9.8696, 4.38649, 2.4674, 1.57914, 1.09662}


My question is am I doing something wrong with numerical integration? Any help will be appreciated, Thank you

• There is something wrong with your analytical result. Look at the dimensions. Assume $r_i$ has a dimension of length (L). Your original formula has therefore the dimension $L^4$. But the analytical integral has the dimension $L^2$. – yarchik Feb 16 at 8:17
• angles $\phi_1$ and $\phi_2$ are dimensionless therefore the formula has also a dimension of $L^2$ – David Baghdasaryan Feb 16 at 8:32
• @DavidBaghdasaryan Your derivation of the analytical integral formula seems to be improper: In the complete integral you vary r2 whereas in the analytical formula you fix r2==0 – Ulrich Neumann Feb 16 at 9:00
• If you set r2 to zero, then the integral will be zero... – Andreas Feb 16 at 11:11
• @DavidBaghdasaryan No, setting one point to the origin has no effect because the variation of r2 remains! – Ulrich Neumann Feb 16 at 11:32