# Fourier coefficients of the Gaussian.

I would need to find the fourier coefficient of this gaussian for a problem. I'm now stuck with this integral, $$c_{n}=\int_{-1}^{1}e^{\frac{x^{2}}{2}}\left(\cos\left(\pi nx\right)\right)dx.$$ I'm not sure if it is possible an analytical solution, does anybody know? Please note that's on an interval and not on the whole line.

• Have you tried mathematica or maple? – Mhenni Benghorbal Feb 7 '16 at 19:54
• I'm not really good at neither... any way I would like to know if it exists a way for solving it analytically before switching to numerically... – Dac0 Feb 7 '16 at 20:02
• The integral is not elementary! You can have an answer in terms of the error function. See [here] (m.wolframalpha.com/input/…). – Mhenni Benghorbal Feb 7 '16 at 20:28
• thank you very much... I was afraid it wasn't plain... – Dac0 Feb 7 '16 at 20:40
• I was trying to find an function that could be easy to write in Fourier Expansion and Hermite Expansion at the same time, maybe I could ask this question directly... – Dac0 Feb 7 '16 at 21:46