Another: dirac_delta integration: possible bug?

asked 2020-06-19 23:54:08 +0100

curios_mind gravatar image

updated 2020-06-20 00:10:02 +0100

I think there is another problem with the integration of the dirac_delta in Sage:

(previous problem is discussed in the thread Integration of dirac_delta)

Here is the problem:


returns 1 where it should return 1/|a|



returns 1/|a|, where it should be 1/(2|a|)

edit retag flag offensive close merge delete


I agree with the 1/|a| in the second case, both roots contribute for 1/|2a|. Also you may have noticed that the answer I gave you in your other post produces the right answer in the first case, but 0 in the second one. That's because a<+oo is always False. For it to work you have to put assumptions on a, and also not use infinity as a bound.

Florentin Jaffredo gravatar imageFlorentin Jaffredo ( 2020-06-20 15:11:59 +0100 )edit

I looked at the code and tried to fix it to accomodate this problem but I wasn't very successful (though I learned a lot!) I tried the following with your version, but I am getting 0.


am I using it wrong? (especially the assumptions?)

curios_mind gravatar imagecurios_mind ( 2020-06-21 03:57:16 +0100 )edit

For me it works with x^2-a^2 instead of x^2-a. If you don't take the square, you need to assume a>0, otherwise there is no real root, the the answer is zero.

Florentin Jaffredo gravatar imageFlorentin Jaffredo ( 2020-06-21 12:19:06 +0100 )edit