[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-11 Thread rjf
in Maxima, let y: x*signum(x^2-4); integrate(y,x,0,3) returns -9/2 integrate(y,x,0,2) + integrate(y,x,2,3) returns 1/2 if you want to see the large amount of work that goes into this, do trace(sign) in Maxima. Is there a bug in this, someone can look for a hint. In general, the

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-11 Thread Sergey V Kozlukov
Actually, i was doing crappy thing Several times I accidentally got correct output, which made me think, sage handles discontinuity in such cases It doesn't. Btw, i'd like to see this info in ```help(integrate)``` It's, probably, complicated or intractable to determine every such case, in order

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-11 Thread Sergey V Kozlukov
> It looks to me like you reported a discrepancy which everyone else would startby considering a bug Well, at the time of writing, title and post itself seemed to me rather neutral. My fault > Demo is hardly the simplest I admit, i should have reported it in more readable form. I don't have

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-11 Thread Nils Bruin
On Monday, April 11, 2016 at 7:31:53 AM UTC-7, rjf wrote: [large dialogue with Dima] > > So I stay with my criticism of Sage -- you are always talking about > python this-and-that, but the large bodies of code that (apparently) > you depend upon and that (apparently) don't do exactly what you

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-11 Thread rjf
On Sunday, April 10, 2016 at 8:48:24 AM UTC-7, Dima Pasechnik wrote: > > > (RJF) >> Finally, this message demonstrates a major defect in the idea behind Sage. >> That is, people involved in the project might find a problem, but they >> have >> insufficient expertise to do anything substantive

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-11 Thread rjf
On Sunday, April 10, 2016 at 1:16:35 AM UTC-7, Sergey V Kozlukov wrote: > > Why so offensive? > > Well, i didn't "report a bug", i started discussion > And there is "simple demo" in the first post > It looks to me like you reported a discrepancy which everyone else would start by considering a

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-10 Thread Dima Pasechnik
On Sunday, April 10, 2016 at 5:01:38 AM UTC+1, rjf wrote: > > I don't know what nonsense you are trying out, but > f(r,phi):=signum(r^2-4) is a function that does not > depend on phi. > > If you want to integrate functions that are discontinuous, there are two > processes > involved. One:

Re: [sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-10 Thread Johan S . R . Nielsen
> Why so offensive? Don't worry - rjf is always spectacularly offensive. His tone is not representative of how the rest of us write on this list. Thanks for taking the time to start this discussion (on which I have no technical input). Best, Johan -- You received this message because you are

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-10 Thread Sergey V Kozlukov
Why so offensive? > $f$ does not depend on phi So what? The reason for such function --- i was trying to replicate things i was doing in sage (and in sage i was trying to imitate generic behaviour) > if you want to report a bug, it is polite to find the simplest demonstration of the defect

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-09 Thread rjf
I don't know what nonsense you are trying out, but f(r,phi):=signum(r^2-4) is a function that does not depend on phi. If you want to integrate functions that are discontinuous, there are two processes involved. One: find the continuous pieces and break up the problem. Two, integrate, as

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-09 Thread Dima Pasechnik
maxima's definite integration is quite buggy, we see dozens bugs like this a year, and report them upstream, with limited success... On Saturday, April 9, 2016 at 7:17:09 PM UTC+1, Sergey V Kozlukov wrote: > > (%i1) f(r,phi) := signum(r^2 - 4); >

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-09 Thread Sergey V Kozlukov
(%i1) f(r,phi) := signum(r^2 - 4); 2 (%o1) f(r, phi) := signum(r - 4) (%i2) integrate(integrate(r*f(r,phi), r, 0, 3), phi, 0, 2*%pi); (%o2) - 9 %pi That's strange суббота, 9 апреля 2016 г.,

[sage-devel] Re: Integration of function and it's simplified version yields different results

2016-04-09 Thread Dima Pasechnik
Try these computations directly in Maxima, and see whether it's still a discrepancy there. On Saturday, April 9, 2016 at 1:31:44 PM UTC+1, Sergey V Kozlukov wrote: > > x, y, r, phi = var('x y r phi') > f(x, y) = sign(x^2 + y^2 - 4) > T(r, phi) = [r*cos(phi), r*sin(phi)] > J =