I have a long list (about 10000) of positive numbers (here simply denoted list), for which I want to find the positions of elements lying between 0.5 and the first zero of the Bessel function of the first kind of order 1, as shown below:
Flatten[Position[ list, _?(0.5 <= # <= 3.83171 &)], 1]; Flatten[Position[ list, _?(0.5 <= # <= N[BesselJZero[1, 1]] &)], 1]; The first code runs in a fraction of a second whereas the second takes about a minute and I can't figure out why. Please can someone advise what's going wrong? I really want to use the second line of code because I'm extending it to many ranges involving zeros of Bessel functions, but currently it's taking far too long. Thanks in advance for any help.


