$ \int_{-\infty }^{\infty} e^{-x^{2} + sin x}dx$

179 Views Asked by At

How can I calculate the following integral:

$$ \int_{-\infty }^{\infty} e^{-x^{2} + sin x}dx$$

Thank you very much!

1

There are 1 best solutions below

3
On

Have you got any reason to believe that there is a closed form expression for it? The numerical value comes up to be 2.0671926894979906.

WolframAlpha does not accept the integral when you write it in plain text. I used

NIntegrate[Exp[-x^2+Sin[x]],{x,-Inf,Inf}]
and clicked on
Assuming "NIntegrate" is an integral | Use as a math function instead

Or in MATLAB, you'd use

integral(@(x)exp(-x.^2+sin(x)),-inf,inf)

If you wanted to evaluate this yourself, you could implement midpoint rule, trapezoid rule etc. by hand. Of course math softwares usually have much better algorithms implemented.