I'm trying to integrate the following function with Mathematica 8:
$$ I(a,b)= \int_0^1 \mathrm{d}x\int_0^1\mathrm{d}y \,\theta(1-x-y) \frac{1}{x a^2-y(1-y)b^2},$$ where $\theta$ is the Heaviside function. However, I find different results with Integrate or NIntegrate and I don't understand why.
More specifically, for a=100 and b=90:
NIntegrate[HeavisideTheta[1 - x - y]/(x a^2 - y (1 - y) b^2), {x, 0, 1}, {y, 0, 1}]
gives
0.0000927294,
while
Integrate[HeavisideTheta[1 - x - y]/( x a^2 - y (1 - y) b^2), {x, 0, 1}, {y, 0, 1}, PrincipalValue -> True]
gives
+0.0000600275+0.000314159 I.
What is the correct result? Why does Integrate give a complex result?
NIntegrate
gives failure-to-converge error messages before giving the answer0.0000927294
. Adding the optionAccuracyGoal -> 20
gives0.
as the answer with no error messages.Integrate
, on the other hand, returns only a partially integrated solution. $\endgroup$ContourPlot[{(x 100^2 - y (1 - y) 90^2) == 0, 1 - x - y == 0}, {y, 0, 1}, {x, 0, 1}]
. It's unclear whether the integral under consideration txists at all. @bbgodfrey counts the iterated integral. $\endgroup$