How to compute the integral $\int^{\infty}_{-\infty}\frac{e^{-x^2}\sin^2(x-t)}{a+\cos(x-t)} \, dx$ How to compute the integral $\int^{\infty}_{-\infty}\frac{e^{-x^2}\sin^2(x-t)}{a+\cos(x-t)} \, dx$ ?
Is it possible to integrate?
I tried by elementary methods without much luck
 A: Edited
I can think of two suggestions:
1) For $|a|>1$ expand the denominator into series:
$$\frac{1}{a+\cos(x-t)}=\frac{1}{a} \left(1-\frac{\cos(x-t)}{a}+\frac{\cos^2(x-t)}{a^2} -\frac{\cos^3(x-t)}{a^3}+.\dots \right) $$
$$\frac{1}{a} \int^{\infty}_{-\infty} e^{-x^2}(1-\cos^2(x-t)) \left(1-\frac{\cos(x-t)}{a}+\frac{\cos^2(x-t)}{a^2} -\frac{\cos^3(x-t)}{a^3}+.\dots \right)dx$$
It's not the best way, since I don't know if the integral has closed form for a general term.
For a finite amount of terms you can use trig identities, like:
$$\cos^2 (x-t)=\frac{1}{2} (1+\cos (2x-2t))$$

2) Another, more useful way is to expand the trigonometric part of the integral into Fourier series.

Again, it's possible only for $|a|>1$.

First, it's better to change the variable $x-t=y$:
$$\int^{\infty}_{-\infty}\frac{e^{-x^2}\sin^2(x-t)}{a+\cos(x-t)} \, dx=\int^{\infty}_{-\infty}\frac{e^{-(y+t)^2}\sin^2(y)}{a+\cos(y)} \, dy$$
Since the trigonometric part is even and periodic with period $2 \pi$, we can expand it into cosine Fourier series:
$$\frac{\sin^2 (y)}{a+\cos(y)}=\sum_{n=0}^{\infty} A_n \cos{n y}$$
$$A_0=\frac{1}{\pi} \int^{\pi}_0 \frac{\sin^2 (y)}{a+\cos(y)} dy=a-\sqrt{a^2-1}$$

$$A_n=\frac{2}{\pi} \int^{\pi}_0 \frac{\sin^2 (y)}{a+\cos(y)} \cos(ny) dy$$

The last integral in general is expressed in terms of regularized hypergeometric functions, however for natural $n$ it is expressed in radicals (you can check with Mathematica). For example:

$$A_1=1-2a(a-\sqrt{a^2-1})$$
$$A_2=2 \sqrt{a^2-1}~~ (1-2a(a-\sqrt{a^2-1}))$$
$$A_3=2  \sqrt{a^2-1} ~~ ((4a^2-1)(a-\sqrt{a^2-1})-2a)$$
$$\dots$$

You can express your integral as a series:
$$\int^{\infty}_{-\infty}\frac{e^{-x^2}\sin^2(x-t)}{a+\cos(x-t)} \, dy=(a-\sqrt{a^2-1})\sqrt{\pi}+\sum_{n=1}^{\infty} A_n \int^{\infty}_{-\infty} e^{-x^2} \cos(n (x-t)) dx$$
$$\int^{\infty}_{-\infty} e^{-x^2} \cos(n (x-t)) dx=\sqrt{\pi}~ e^{-n^2/4} \cos (nt)$$

$$\int^{\infty}_{-\infty}\frac{e^{-x^2}\sin^2(x-t)}{a+\cos(x-t)} \, dy=\sqrt{\pi} \left(a-\sqrt{a^2-1}+\sum_{n=1}^{\infty} A_n e^{-n^2/4} \cos (nt) \right)$$


For the case $a=1$ we can easily see that:
$$A_1=-1$$
$$A_n=0,~~~~n>1$$
So the solution contains only two terms:
$$\int^{\infty}_{-\infty}\frac{e^{-(y+t)^2}\sin^2(y)}{1+\cos(y)} \, dy=\sqrt{\pi} \left(1-\frac{\cos (t)}{\sqrt[4]{e}} \right)$$
Update
I asked a question here to find $A_n$ in closed form and Start wearing purple was kind enough to answer:

$$A_{n\ge2}=2(-1)^{n+1}\sqrt{a^2-1}\left(a-\sqrt{a^2-1}\right)^{n}$$

So I would consider your question answered as best as it could.
