I am new to mathematica and I hope this is a simple problem. I have two identical functions that only differ by the variable names:

PolarInverseFT[f_, p_, u_, r_, t_] := 
  p f Exp[-I 2 π r p Cos[u - t]], {p , 0, ∞}, {u, 0, 2 π} ]

PolarInverseFT2[f_, r_, t_, p_, u_] := 
  r f Exp[-I 2 π  p r Cos[t - u]], {r, 0, ∞}, {t, 0, 2 π} ]

I would expect them to behave identically. However,

PolarInverseFT[λ^2/(λ^2 + 4 π^2 p^2), p, u, r, t]

returns the error

-I Sin[2 p π r #1] is not a valid variable


PolarInverseFT2[λ^2/(λ^2 + 4 π^2 r^2), r, t, p, u]

gives the correct answer. For other f_ both can return an answer without failing, but the answers differ!

Any help would be greatly appreciated.

  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – user9660
    Mar 6, 2015 at 11:20
  • $\begingroup$ You can format inline code and code blocks by selecting it and clicking the {} button above the edit window. The edit window help button ? is also useful for learning how to format your questions and answers. $\endgroup$
    – Michael E2
    Mar 6, 2015 at 11:34
  • $\begingroup$ In general, why including your integration variables in the arguments ? $\endgroup$ Mar 6, 2015 at 13:02
  • $\begingroup$ @b.gatessucks that was my first thought as well. The integration variables appear in the first argument, so this makes sense ( the second and third arguments in each case must be passed in as undefined symbols ). That said, I obtain different results for the two cases, starting with a clean kernel each time. (not the same error though, the first case returns an unevaluated integral w/v9) $\endgroup$
    – george2079
    Mar 6, 2015 at 15:05
  • $\begingroup$ @b.gatessucks True, but besides the point. I note that the integrals themselves (executed directly and not through the above definitions) exhibit the same strange behavior. $\endgroup$ Mar 6, 2015 at 15:22

1 Answer 1


not an answer, just a simpler demonstration of the issue ( version 9.01 )

Integrate[r (1/(1 + 4 Pi^2 r^2)) Exp[-I 2 Pi  r Cos[t - u]],
       {r, 0, Infinity}, {t, 0, 2 Pi}]

enter image description here

In the second case I've just copied the expression and changed t to z .. puzzling. It seems in the first case u has been assumed real and the second not.

  • 2
    $\begingroup$ In 10.0.0 both expressions return the (same) unevaluated integral. $\endgroup$ Mar 6, 2015 at 15:33
  • 1
    $\begingroup$ This should probably just be a comment... $\endgroup$
    – rm -rf
    Mar 6, 2015 at 16:12
  • $\begingroup$ 10.1 gives a different second answer to 9.0.1 $\endgroup$ Apr 5, 2015 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.