Why does Mathematica give the wrong answer when integrating?
Looks like a bug that ran off in the development version of Mathematica.
In[1]:= Integrate[Exp[I Cos[b - c]] Cos[b], {b, 0, 2 Pi}]//InputForm
Out[1]//InputForm= (2*I)*Pi*BesselJ[1, 1]*Cos[c]
In[2]:= %/.c->.5
Out[2]= 0. + 2.42645 I
This bug appears to have been known for over a year now! See the mathGroup archive
Edit
To explain why I consider these bugs to be equivalent, I'll re-write the two integrals using the integration variable x
. In the present question, we have $$I_1(c)=\int_0^{2\pi}\exp(i\cos(x-c))\cos x\,dx$$
On the other hand, the MathGroup post I linked here considers the integral $$I_2(c)=\int_{-\pi}^{\pi}\exp(i\cos(x-c))\exp(ix-ic)\,dx$$ where I specialized to the case giving the same Bessel argument in the result. Pulling out the constant factor, using the periodicity of the integrand and making a substitution of variables, one finds $$I_2(c)=e^{-ic}\left[I_1(c)+i\, I_1(c-\frac{\pi}{2})\right]$$
Therefore, if Wolfram fixed the bug in the calculation of $I_2$ but still gets an incorrect result for $I_1$, that fix was itself incorrect. This argument generalizes to integer Bessel indices other than 1 (which is what this question has).
Finally, the question is whether it is a bug fix to return the integrals unevaluated. I would argue that because these are such ubiquitous integrals, Mathematica should definitely know what to do with them. But I may not have all the information as to why this bug is so hard to fix... I just wanted to briefly clarify my thinking in case anyone cares.