Question: Error in Integrating Heaviside Function

I'm running into a very simple problem with the way that Maple integrates Heaviside functions. Naively, it should act like a step function, but it is not integrating properly. See the attached document.

int(int(Heaviside(-x^2-y^2+1), x = -1 .. 1), y = -1 .. 1)

0

(1)

evalf(Int(Heaviside(-x^2-y^2+1), [x = -1 .. 1, y = -1 .. 1]))

3.141592654

(2)

int(piecewise(-x^2-y^2+1 > 0, 1, 0), [x = -1 .. 1, y = -1 .. 1])

Pi

(3)

``


Note that the symbolic integration of the Heaviside function (defined to be 1 inside the unit circle and 0 outside) gives zero, whereas it should clearly give the area of the unit circle, which the numerical integration does. I even checked that the (suposedly equivalent) piecewise definition symbolically evaluates to the area, and it, too, gets the right answer.

Anyone have any clue as to why the symbolic integration of this Heaviside function is so wrong? My understanding is that if we do the integral as two nested 1D integrals, the returned function (as a function of y) is zero everywhere except at y=0, but that result cannot be right either.

Thoughts?

 

Download Heaviside-error.mw

Please Wait...