Message Boards Message Boards


Different results for double integral in mathematica and on wolframalpha

Posted 10 years ago
2 Replies
1 Total Likes

I am trying to perform definite double integrals on an expression. If I run
Integrate[x^2 + y^2 + xy, {x, 0.0001, 0.01}, {y, 0.01, 0.5}]
in Mathematica v9.0.1.0 I get an expression as output:
0.00041266 + 0.004851 xy

However, if I run the same thing in wolframalpha:

then I get a numeric output: 0.000418907

Am I doing something wrong in Mathematica?

Many thanks
POSTED BY: g.hemani
2 Replies
The integral can be done symbolically
Integrate[x^2 + y^2 + x y, {x, 10^-4, 10^-2}, {y, 10^-2, 1/2}]
POSTED BY: Frank Kampas
I believe that what you actually want to do is this:
Integrate[x^2 + y^2 + x y, {x, 0.0001, 0.01}, {y, 0.01, 0.5}]

Note that there is whitespace between the x and y at the end of the integrand.  That whitespace is necessary - if the whitespace is not there, Mathematica will interpret your input as the single symbol xy.  With whitespace, you get the symbol x multiplied by the symbol y.

I get 0.000418907 once I add the whitespace in Mathematica.
POSTED BY: Karl Isensee
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract