Items tagged with heaviside


Correct computatiton for

for reasonable expressions f(x,y), g(x,y) would be very useful in double integrals.

For the moment this is not possible. Too many bugs:

int(Heaviside(1-x^2-y^2), x=-infinity..infinity, y=-infinity..infinity); #should be Pi
int(Heaviside(1-x^2-y^2), x=-1..1, y=-1..1); #should be Pi
int(Heaviside(y-x^2), x=-1..1, y=-1..1); #should be 4/3

int(Heaviside(y-x^2), y=-1..1, x=-1..1); #This one is OK!







I am not sure how to find the Heaviside Laplace transform 







Thank you:)



I am having trouble getting a pattern match to the Heaviside function.

patmatch(Heaviside(x), Heaviside(a::algebraic))

returns "false" whereas I would expect it to return true.

On the other hand:

patmatch(Heaviside(x), Heaviside(x::algebraic))

returns true.


What am I missing?




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)



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



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




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.




Page 1 of 1