0
$\begingroup$

I am trying to integrating something like: Integrate[Exp[-i*(k*x+k*z)]*Exp[-(x^2+z^2)],{x,-largenumber,largenumber},{z,-largenumber,largenumber}]

My issue is that doing the full integral takes too long to compute, so I am trying to approximate it. I tried two approximations: 1) using the analytical form of the integral and substituting in the limits of integration. 2) approximating the integral as a sum and summing up over the x and z indices.

However, both of these methods give me a result that is significantly different from the full integral. The strangest part is that both (1) and (2) give me the same exact (wrong) solution. I think this may have to do with the complex values of the integrand. The absolute value of the solution is what I ultimately need. I wonder if I need to be careful to account for the real and imaginary parts of the integrand when approximating as a sum.

I have done similar integrals before and haven't had issues. What are the possible problems that I could be facing? How is Integrate acting differently than taking the analytical form of the integral and plugging in values, or summing up the integrand over the relevant indices?

$\endgroup$
  • $\begingroup$ Integrate[ Exp[-I*(k*x + k*z)]*Exp[-(x^2 + z^2)], {x, -Infinity, Infinity}, {z, -Infinity, Infinity}, Assumptions -> k > 0] MMA gives:E^(-(k^2/2)) \[Pi]. $\endgroup$ – Mariusz Iwaniuk Aug 14 at 19:32
  • $\begingroup$ @MariuszIwaniuk I am actually try to do the integral over three different intervals in x. Still, what I'm trying to do is very simple. I'm surprised its not working. $\endgroup$ – LooseyGoose Aug 14 at 19:54
  • 5
    $\begingroup$ Nothing can be said without the code you tried?Not enough info. $\endgroup$ – Mariusz Iwaniuk Aug 14 at 19:58
  • 1
    $\begingroup$ If you are getting the wrong value from an analytic expression, you may be suffering from rounding errors. Try expressing the limits to higher precision e.g. N[1000,20] $\endgroup$ – mikado Aug 14 at 20:46
  • 1
    $\begingroup$ The Wolfram Language is case sensitive, and in particular i is not the same thing as I. So that might be one issue. $\endgroup$ – Daniel Lichtblau Aug 14 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.