# Different results for double integral in mathematica and on wolframalpha

Posted 10 years ago
6273 Views
|
2 Replies
|
1 Total Likes
|
 HiI am trying to perform definite double integrals on an expression. If I runIntegrate[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 xyHowever, if I run the same thing in wolframalpha:http://tinyurl.com/pu56v7cthen I get a numeric output: 0.000418907Am I doing something wrong in Mathematica?Many thanksGib
2 Replies
Sort By:
Posted 10 years ago
 The integral can be done symbolicallyIntegrate[x^2 + y^2 + x y, {x, 10^-4, 10^-2}, {y, 10^-2, 1/2}]20945345421/50000000000000N[%]0.000418907
Posted 10 years ago
 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.