Is this a bug in Mathematica 11 ?

2 replies · 2K views · last reply
Chenkb
Messages
38
Reaction score
1
I calculated a simple complex function integration using Mathematica 11.
As the screenshot shows, the only difference between the two inputs is that I set a = 1 in the second one.
However, the two outputs differ by a factor of 2.
What's wrong? Is this a bug?

Two Mathematica In/Out cells: integral of 1/((x - i e)^2 (a x - 1 + i e)) over x from -inf to inf gives i pi a/(a e + e + i)^2; with a=1 integral of 1/((x - i e)^2 (x - 1 + i e)) gives 2 i pi/(2 e + i)^2.
 
Attachments
  • Two Mathematica input and output cells: Integrate of 1/((x - i e)^2 (a x - 1 + i e)) over x from -inf to inf gives i pi a/(a e + e + i)^2; with a = 1, Integrate of 1/((x - i e)^2 (x - 1 + i e)) gives 2 i pi/(2 e + i)^2.
    v2-8db240d37c3f312ff3d6f550c292348d_r.jpg
    28.5 KB · Views: 631
  • Two Mathematica In/Out cells: integral of 1/((x - i e)^2 (a x - 1 + i e)) over x from -inf to inf gives i pi a/(a e + e + i)^2; with a=1 integral of 1/((x - i e)^2 (x - 1 + i e)) gives 2 i pi/(2 e + i)^2.
    ?temp_hash=ad4401c004340a77544e624d179a4915.jpg
    28.5 KB · Views: 1,124
Which version do you have? In 11.2, I get the following:
Four Mathematica input and output cells showing integrals of 1 over (x - i e)^2 times (a x - 1 + i e) or (x - 1 + i e), over x from minus infinity to infinity, with assumptions on e and a, and their evaluated results such as 2 i a pi over (i + e + a e)^2.

You can try and open a new notebook, set its default context to "unique to this notebook," and try and do only this integral.
 
Attachments
  • Four Mathematica input and output cells showing integrals of 1 over (x - i e)^2 times (a x - 1 + i e) or (x - 1 + i e), over x from minus infinity to infinity, with assumptions on e and a, and their evaluated results such as 2 i a pi over (i + e + a e)^2.
    mathematica.jpg
    24 KB · Views: 1,235
DrClaude said:
Which version do you have? In 11.2, I get the following:
View attachment 217062
You can try and open a new notebook, set its default context to "unique to this notebook," and try and do only this integral.

Thanks. I opened a new notebook and did the settings you mentioned, but got the same wrong result.
However, to my surprise, I just changed the variable name from ε to b, and the output changed. :eek:
The version of mine is 11.1
Maybe it's a bug? and fixed in 11.2 :oldconfused:

Mathematica notebook showing Integrate of 1/((x - i e)^2 (a x - 1 + i e)) over x from -inf to inf with PrincipalValue True and assumptions e > 0 and a > 0, output i pi a/(a e + e + i)^2; same integral with b in place of e gives 2 i pi a/(a b + b + i)^2.
 
Attachments
  • Mathematica notebook showing two integrals with PrincipalValue set to True: Integrate of 1/((x - i e)^2 (a x - 1 + i e)) over x from -inf to inf gives i pi a/(a e + e + i)^2, and the same with b in place of e gives 2 i pi a/(a b + b + i)^2.
    M3.PNG
    14.8 KB · Views: 553
  • Mathematica notebook showing Integrate of 1/((x - i e)^2 (a x - 1 + i e)) over x from -inf to inf with PrincipalValue True and assumptions e > 0 and a > 0, output i pi a/(a e + e + i)^2; same integral with b in place of e gives 2 i pi a/(a b + b + i)^2.
    ?temp_hash=79e606c0cb2926f4006ce121c7ea8750.png
    14.8 KB · Views: 691