Actually, i was doing crappy thing
Several times I accidentally got correct output,
which made me think, sage handles discontinuity&c 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 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 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 to find the MWE right now, but i think it would be 
> better, if i at least post there purified version of the code i provided 
> before.
> The simplest form i found right now is:
>
> f(x) = sign(x^2 - 4)
> v = (x*f).integrate(x, 0, 3)
> show(v)
> Which yields (wrong) answer $\frac{-9}{2}$, derived by directly applying 
> Newton-Leibnitz
> That's what Maxima returns
>
> And then we can apply same technique as before
> (multiply $x^2$ by $cos^2+sin^2$)
> to make SAGE magically return correct answer:
> f(x) = sign(x^2*cos(x)^2 + x^2*sin(x)^2 - 4)
> v = (x*f).integrate(x, 0, 3).simplify_full()
> show(v)
> Evaluates to $\frac{1}{2}$ (correct).
> NB: in this case ```integrate``` returns integral expression, which is 
> then simplified into number
>
> понедельник, 11 апреля 2016 г., 17:16:43 UTC+3 пользователь rjf написал:
>>
>> [snipped]
>>
>

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