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

2016-04-11 Thread Sergey V Kozlukov
such case, in order to throw exception (because maxima can return wrong answer), or split integral But notice in docstring would make it less confusing понедельник, 11 апреля 2016 г., 19:41:44 UTC+3 пользователь Sergey V Kozlukov написал: > > > It looks to me like you reported a discrepan

[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 time

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

2016-04-10 Thread Sergey V Kozlukov
m(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&#x

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

2016-04-09 Thread Sergey V Kozlukov
19:14:49 UTC+3 пользователь 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

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

2016-04-09 Thread Sergey V Kozlukov
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 = diff(T).det().simplify_full() T_f = f.substitute(x=T[0], y=T[1]) int_f = integral(integral(T_f*abs(J), r, 0, 3), phi, 0, 2*pi).simplify_full () show(r"$\iint\limits_\Omega%s = %s$"%(latex(f(x)), l