# Integral funkiness

GROUPS:
 J K 2 Votes I have a rather curious problem. I'm trying to solve this integral:step1 = Integrate[  Cos[q + ((k2 - k2 Cos[\[Theta]]) \[Rho] Cos[\[Phi]] -        k2 Sin[\[Theta]] \[Rho] Sin[\[Phi]])] \[Rho], {\[Phi], 0,    2 \[Pi]},   Assumptions -> {k2 > 0 && \[Theta] \[Element] Reals && \[Rho] > 0}]The answer it gives me for that is2 \[Pi] \[Rho] Cos[q]This seems to be independent of Theta. However, if I plug in a value for Theta before doing the integral. For example Theta = Pi / 2 gives:2 \[Pi] \[Rho] BesselJ[0, Sqrt[2] k2 \[Rho]] Cos[q]And Theta = Pi gives2 \[Pi] \[Rho] BesselJ[0, 2 k2 \[Rho]] Cos[q]Obviously, the result does depend on Theta then, even though the initial answer has no theta dependence. Is this a bug I stumbled upon in Mathematica 8.0.1.0 for Linux or am I missing something fundamental here?
5 years ago
5 Replies
 Karl Isensee 2 Votes This may be an issue with your version of Mathematica - I was able to reproduce your first result in Mathematica 8.0.1, but was not able to reproduce the result in 8.0.4 or 9.0.1.  Those later versions returned the input unevaluated after a lengthy calculation.
5 years ago
 Ah, thanks. Good to see that I'm not going crazy.