Consider the following three lines of Mathematica code and note that input line 1 and 3 are exactly the same (This is the smallest piece of code I found to demonstrate this behaviour).
>> Integrate[Exp[-a^2] Sin[2 p] ((a^2 + b^2) + b*Cos[p] + a*Sin[p]), {p, 0, 2 \[Pi]}]
0
>> $Assumptions = {t > 0};
>> Integrate[Exp[-a^2] Sin[2 p] ((a^2 + b^2) + b*Cos[p] + a*Sin[p]), {p, 0, 2 \[Pi]}]
8/3 Sqrt[a^2+b^2] E^-a^2
Note that the integral should yield 0, like in Mathematica's first answer. The assumption I enter has apparently nothing to do with the integration. Is this a bug (I use Mathematica 8.0)?
Even stranger, if I split the integral into a sum of 2 or 3 integrals, each of them yields 0. Same thing if I take parts out of the integral which do not depend on p.
For me it looks like a bug but if there is something I'm missing, please let me know.
Mathematica is a mathematical computation program used in many scientific, engineering, mathematical, and computing fields. Unlike other systems, Mathematica applies intelligent automation in every part of the system, from algorithm selection to plot layout and user interface design.
You can put comments within an Input line by using the syntax (* put your comments here *). Mathematica automatically groups cells.
Details. can be entered as x∖[NotEqual]y or x != y. lhs≠rhs returns True if lhs and rhs are determined to be unequal by comparisons between numbers or other raw data, such as strings.
Type a subscript with (Insert ▶ Typesetting ▶ Subscript). Exit from typing math with : Exit from a subscript but continue typing math with (Insert ▶ Typesetting ▶ End Subexpression): Typing a subscript in text automatically enters math mode.
In Mathematica 7.0.1 the result is 0, while in 8.0.4 we get
8/3 Sqrt[a^2+b^2] E^-a^2
Thus it has to be a bug, even worse it is an error. Fortunately, one can easily verify the result without a computer, but in case of a more involved integral it would be a major problem.
This seems to have been solved. In 9.0 version, both give results 0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With