Comment #15 on issue 2128 by asmeurer: cannot integrate piecewise function numerically
http://code.google.com/p/sympy/issues/detail?id=2128

Maple can do it:

p:=piecewise(x - y < 0, 1, 0);
                          p :=  / 1      x - y < 0
                               {
                                \ 0      otherwise
integrate(p, y);
                             /   0         y <= x
                            {
                             \ -x + y      x < y
integrate(p, y=-infinity..infinity);
                                  infinity

I'm not entirely sure what's going on, but it's clear that it can be done. Anyway, even if we keep that error, the message needs to be improved. It isn't clear at all what sym is referring to. Better would be to use %s and put the part of the expression itself in the message. Also, it should use NotImplementedError(message) style syntax.

Feel free to implement something that lets you only do a subs in the main part of the piecewise, though are you sure that that is indeed mathematically what you want?

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to