9
$\begingroup$

I'm trying to do this integral, which is shown on the Wikipedia page on the Hankel transformation:

$$\int_0^{2\pi}\mathrm d\varphi\;e^{\mathrm im\varphi}e^{\mathrm ikr\cos(\varphi)}$$

The answer is supposed to be

$$2\pi\mathrm i^m J_m(kr)$$

Mathematica cannot seem to do this integral; it simply gives me the input back:

Integrate[
    Exp[I m phi] Exp[I k r Cos[phi]],
    {phi, 0, 2 Pi},
    Assumptions -> Element[m, Integers]
]

Why can't this be done? It can do it for explicit values of m = 0 and m = 1, but after that it begins reporting the answer in terms of polynomials times a zero-order Bessel function or something similar. Perhaps I'm expecting too much of the software, but I'd expect it to be able to verify integrals listed on Wikipedia pages. Is there something I'm overlooking?

$\endgroup$
3
  • 1
    $\begingroup$ I've had problems like this. If you only want to verify the known result, have you tried evaluating "Integral minus solution", to see if it simplifies to zero? $\endgroup$
    – Jonas Heidelberg
    Commented Feb 18, 2012 at 13:23
  • $\begingroup$ I will wager that the reluctance of Mathematica to evaluate your integral generically is due to the differing behavior of the integral of the components Cos[m phi + k r Cos[phi]] and Sin[m phi + k r Cos[phi]], depending on whether m is odd or even. Try executing Assuming[k > 0 && r > 0, Table[Integrate[{Cos[m phi + k r Cos[phi]], Sin[m phi + k r Cos[phi]]}, {phi, 0, 2 Pi}], {m, 0, 5}]], for instance. $\endgroup$ Commented Feb 19, 2012 at 0:08
  • 1
    $\begingroup$ "...after that it begins reporting the answer in terms of polynomials times a zero-order Bessel function or something similar." - yes, because it seems that Mathematica internally uses the recursion formulae for Bessel function within Integrate[] to simplify things. Unfortunately, it looks as if FullSimplify[] is ignorant of this very recursion formula, so... $\endgroup$ Commented Feb 19, 2012 at 0:10

1 Answer 1

13
$\begingroup$

The answer is simply that integrating with the assumption that a variable comes from the class of integers is really difficult. What Integrate does with Assumptions -> Element[m, Integers] is try to generically integrate without the assumption and then apply the assumption to the result to try and simplify it. I've asked around about this before and there doesn't seem to be a good way to make a generic algorithm that actually handles assumptions like Element[m, Integers].

You can find many cases where Assumptions -> Element[something, Integers] doesn't produce the expected simplification. Most of the cases I've seen of integrals where a variable is assumed to be an integer are where the integrand is the product of two orthogonal functions. In these cases,the way these are solved on paper doesn't generalize easily.

$\endgroup$

Your Answer

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