I have an expression which is just a linear combination of plane waves, and I'd like to calculate FT of it. I know what I will get should be a bunch of delta functions, but it turns out Mathematica gives me a completely wrong result:

FourierTransform[(E^(-I (k1 + k2) (x1 + x2)) (E^(I (k2 x1 + k1 x2)) + 
    E^(I (k1 x1 + k2 x2))))/(4 \[Pi] (I + 2 k1 - 2 w) (-I - 2 k2 + 2 w)), 
    {x1, x2}, {p1, p2}]

However, if I re-organize the numerator of this expression to a simpler form of plane waves

E^(-I (k1 + k2) (x1 + x2)) (E^(I (k2 x1 + k1 x2)) + E^(I (k1 x1 + k2 x2))) // ExpandAll
E^(-I k2 x1-I k1 x2)+E^(-I k1 x1-I k2 x2)

and then insert the above expression back to the numerator, after FourierTransform I get the correct result:

FourierTransform[(E^(-I k2 x1 - I k1 x2) + E^(-I k1 x1 - I k2 x2))/
             (4 \[Pi] (I + 2 k1 - 2 w) (-I - 2 k2 + 2 w)), {x1, x2}, {p1, p2}] 
(DiracDelta[-k2+p1] DiracDelta[-k1+p2])/(2 (I+2 k1-2 w) (-I-2 k2+2 w))+(DiracDelta[-k1+p1] DiracDelta[-k2+p2])/(2 (I+2 k1-2 w) (-I-2 k2+2 w))

So the question is: is it a bug or what?

  • 1
    $\begingroup$ How long did it take for you for the first example to evaluate? (where you got zero?) and which version was it? on Version 9.01 on windows, I waited 2 minutes with no result. So I stopped the command. But you are right, the first example should have generated the same result and as fast as the second command. I found that by expanding the first expression, then the result comes out as the second right away. it looks the form of the expression itself gave Mathematica hard time and it did not see the transformation needed. Screen shot: !Mathematica graphics $\endgroup$ – Nasser Oct 15 '13 at 3:19
  • $\begingroup$ Hello @Nasser, yes I did notice that the time of evaluation for these two examples were quite different. The latter was done in a click, but the former took me less than 5 minutes on version 9.0.1 on mac, not particularly long. $\endgroup$ – Leo Fang Oct 15 '13 at 4:56
  • $\begingroup$ getting 0 for both cases on version 8.0.4 on Mac $\endgroup$ – Leo Fang Oct 15 '13 at 22:06
  • $\begingroup$ got 0 in the first case and the correct result in the second one with version 9.0.1 on Linux $\endgroup$ – Leo Fang Oct 22 '13 at 17:31
  • $\begingroup$ In V11.0.0 the first FourierTransform is returned unevaluated. The second still evaluates correctly. $\endgroup$ – mikado Aug 29 '16 at 13:09

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.