In George Arfken[7th edition]'s Mathematical Methods For Physicists Chapter 14 problem 14.1.13, there was this integral that we needed to calculate with Bessel Functions: $$f(\theta)=-\frac{i\kappa}{2\pi}\int_0^{2\pi}\int_0^R \exp[i\kappa \rho \sin(\theta)\sin(\phi)] \rho *d\rho d\phi.$$
My approach to this was to treat the inner integral [the $\rho$ integral] as being similar to $\int_0^R x\exp(\alpha x)dx$ and then evaluate it out. With integration by parts i reached: $\frac{-\exp(-\alpha x)}{\alpha ^2}(\alpha x+1).$ However, applying the limits and moving to do the outer integral, I do not reach the desired result.
What the Instructor's manual did: $$\int_0^R \rho d\rho\int_0^{2\pi}d\phi[\cos(\kappa \rho \sin(\theta)\sin(\phi))+i\sin(\kappa \rho \sin(\theta)\sin(\phi))].$$ The cosine integral was identified as a Bessel function, which i understand to be $2\pi J_0(\kappa \rho \sin(\theta)),$ while the sine integral would vanish (as we can show from the integral representation of Bessel functions).
But the part I didn't understand was why are we allowed to split the double integral the way it was shown here?
Isn't $\exp[i\kappa \rho \sin(\theta)\sin(\phi)] \rho$ completely a function of $\rho$ as far as the inner integral is concerned? Why can we send the $\rho$ with $d\rho$ while keeping the exponential elsewhere? That is, what was wrong with my approach?
Two steps have been done here:
$$\int_\Phi\int_P f(\rho,\phi)\mathrm{d}\rho\,\mathrm{d}\phi\to \int_P\int_\Phi f(\rho,\phi)\mathrm{d}\phi\,\mathrm{d}\rho\equiv \int_P\mathrm{d}\rho\int_\Phi \mathrm{d}\phi\, f(\rho,\phi).$$
$$\int_\Phi\mathrm{d}\phi\, \rho g(\rho,\phi)=\rho \int_\Phi\mathrm{d}\phi\, g(\rho,\phi).$$
Insert this into the iterated integral above, and you get the desired form:
$$\int_P\rho\,\mathrm{d}\rho \int_\Phi\mathrm{d}\phi\, g(\rho,\phi).$$