On 2015-03-10, Dima Pasechnik <[email protected]> wrote:
> On 2015-03-10, M M <[email protected]> wrote:
>> I get different results from Sage when I try to get a numerical 
>> approximation for an expression and if I use evaluate a preparse of the 
>> string. I get different results on different versions of sage as well. Here 
>> are samples:
>
> Integration is done by Maxima, and it is a bloody mess; e.g.
> (with Sage 6.6.beta3)
>
> sage: numerical_integral(x/(x^3-x+1.), 1., 2.)   
> (0.565799916456428, 6.281640945809164e-15)
> sage: integral(x/(x^3-x+1), x, 1, 2).n()         
> 1.11396858782562
> sage: integral(x/(x^3-x+1), x, 1, 2).full_simplify().n()
> 0.168522351678247
> sage: 
>
> Do you know which one is actually correct? 
> It looks like the 2nd one might be right (by looking at
> sage: plot(x/(x^3-x+1), x, 1, 2))

sorry, the 1st looks right (the plot is not from 0 to 2, but from 1 to
2, so the value looks a bit above 1/2).
(and Wolfram Alpha outputs 0.5658)


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to