I had the same problem with my 2004 X3.
Hesitation occured when under hard acceleration between 2800-3000 rpm. Would not throw a code for a long time, but finally did so 7 months ago. The problem was with one of the pre-catalytic converter O2 sensors. It was replaced, the problem disappeared and the X3 has been smooth as silk ever since.