This Gaussian integral came up while working on a likelihood analysis for pulsar timing arrays:

$$

int_{-pi}^{pi} expleft( -(x-y sin{gamma} )^2 right) mathrm{d}gamma

$$

I’ve tried everything I can think of, but I can’t get an analytic solution.

If you expand the square, the cross term can be written in terms of a cosh, but I don’t know where to go from there. That gives the integrand as $exp{(-x^2)} exp{(-y^2 sin^2gamma)} cosh{(2 x y sin{gamma})}$.

The substitution $betaequivsin{gamma}$ leads to

$$

oint_0^0 frac{expleft( -(x-y beta )^2 right)}{sqrt{1-beta^2}} mathrm{d}beta

$$

I also tried $arctan alpha equiv gamma$, which gives

$$

int frac{expleft(-left( x- frac{alpha y}{sqrt{1+alpha^2}} right)^2right)}{1+alpha^2} mathrm{d}alpha

$$

Neither Mathematica nor Rubi are able to evaluate any of these integrals. I was hoping the residue theorem might be applicable, or one of these substitutions might get into a form that Mathematica knows. Any help will be greatly appreciated and certainly land you in the acknowledgements of the paper my collaborators and I are working on:)