I am attempting to compute the following integral:
$$ I(l) = \int_{[-1,1]^2}dxdy \sqrt{1-x^2} \sqrt{1-y^2}e^{-\frac{(x-y)^2}{l^2}} $$
I am using Mathematica for symbolic calculations and translating the results into a Fortran code with the help of Mathematica's FortranForm function. This method will be invoked frequently, so it is crucial to have a formula that is both simple and executes very quickly. Numerical integration methods are not suitable for this purpose.
If $ l \gg 1 $ or$ l \sim 1 $, I can easily find a solution using series expansion, ChebyshevT, or Pade approximation. However, none of these approaches works effectively when $l \ll 1 $ because the Gaussian becomes very thin, unlike the nearly constant behavior observed when $ l \gg 1 $. Do you have any suggestions on how to address this issue?
It's also worth mentioning that I will need to compute integrals of the form:
$$ J(x; l) = \int_{-1}^{1}dy \sqrt{1-y^2} e^{-\frac{(x-y)^2}{l^2}} $$
So, numerically computing the integral and fitting some curve on it might not be the best idea.
Thanks in advance, L.
Update: It appears that the first integral has a solution. Taylor expanding the Gaussian leads to an infinite series, each term is easy to integrate and, by luck, the infinite sum can be rewritten into a simple expression using
HyperGeometricPFQfunctions. Since those functions have existing implementations that are numerically stable, I am totally happy with that.However, I am still struggling with the second integral $J(x;l)$, and the series does not seem to be converging to a simple expression in that case...