On Monday, 11 November 2013 05:58:04 UTC+1, George Gerber wrote: > > Good day, > > The integration of a piecewise function below results in a single numeric > number, instead of producing a piecewise equation containing the symbols > 'C1', 'C2' and 'C3'. > Is this a bug? > > Yes, definitely. Turns out that the code doing the evaluation of the antiderivative of Piecewise functions was doing a major assumption: if a condition was an inequality, it was assumed to be of the form "x > something". The code was looking for the integration variable "x" on one side of the inequality, and taking the other side of the inequality as the value to compare to. But one should first isolate "x" on one side of the inequality. I've just opened https://github.com/sympy/sympy/pull/2585 to fix this. The good news is that once we put this fix in, SymPy won't return a wrong result for your example anymore, but the bad news is that SymPy cannot solve your integral and will return an unevaluated Integral object instead.
Thanks for the report, Cheers, Julien -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
