Skip to main content

calculus and analysis - Bug in mathematica analytic integration?


I found Mathematica provides me a wrong answer for a relatively simple analytically solvable integral:


Integrate[Exp[-I θ]/(1 + b Cos[θ]), {θ, 0, 2 π}, 
Assumptions -> b < 1 && b > -1]

Provides as a result (2π)/b, which is incorrect. The integral can be computed easily writing the integrand as a geometric series.


Additionally, you can compute it numerically


NIntegrate[Exp[-I θ]/(1 + b Cos[θ]), {θ, 0, 2 π}]


which produces the right result, different from (2π)/b.


Is this a very bad bug? or am I doing something wrong? What could be the reason for this error?




Comments