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 appropriate.

So if your system is unable to find the continuous pieces, it is not a
problem in integration, really.  

If I had a complicated expression S(x) that I thought was identically zero,
but I couldn't prove it,  I could make it into an integration problem...

integrate(S(x),x,a,b)     

which would be zero for all a and b.

So now should I report a failure to return a specific answer as an 
integration problem??

Moral of the story: if  you want to report a bug, it is polite to find the 
simplest demonstration
of the defect that you can.


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 about it.  If there are
bugs in Maxima, go learn about Maxima.  Maybe fix it.  

On Saturday, April 9, 2016 at 12:19:31 PM UTC-7, Dima Pasechnik wrote:
>
> maxima's definite integration is quite buggy, we see dozens bugs like this 
> a year, and report them upstream, with limited success...
>  
>
If you learned some Lisp, and maybe something about algorithms for 
integration
you could fix them yourself.
 

>
> On Saturday, April 9, 2016 at 7:17:09 PM UTC+1, Sergey V Kozlukov wrote:
>>
>> (%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 г., 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')
>>>> 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)), latex(int_f)))
>>>> Returns correct answer: $\pi$, while
>>>> 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)), latex(int_f)))
>>>> Yields $-9\pi$
>>>> The only thing simplify_full() changes here is it applies identity 
>>>> $\sin^2 + \cos^2 = 1$
>>>>
>>>> Code was executed in SMC worksheet
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to