Re: [sage-devel] Definite Integral wrong

2020-08-05 Thread Samuel Lelievre
2020-08-05 18:59:01 UTC, rjf: > > There are two square roots. In this (classic) integration > example/bug, a choice has to be made. You know that 4 has > two square roots, -2 and 2. The integrand, which also can > be rewritten as sqrt ( 4-4*cos(x/2)^2) , has 2 square > roots. Therefore there a

Re: [sage-devel] Definite Integral wrong

2020-08-05 Thread Michael Orlitzky
On 2020-08-05 15:49, NicoJG wrote: > @rjf Isn't the square root defined to be positive? > Sure: x^2=y <=> x=+/-sqrt(y) > But I think you would never consider f(x):=sqrt(x) to have the codomain > of all negative numbers. > At least I would expect a CAS to interpret a square root to be positive. >

Re: [sage-devel] Definite Integral wrong

2020-08-05 Thread Nils Bruin
On Wednesday, August 5, 2020 at 12:49:37 PM UTC-7, NicoJG wrote: > > @rjf Isn't the square root defined to be positive? > Sure: x^2=y <=> x=+/-sqrt(y) > But I think you would never consider f(x):=sqrt(x) to have the codomain of > all negative numbers. > With complex numbers, there's no concept

Re: [sage-devel] TypeError in term_order

2020-08-05 Thread Nils Bruin
On Wednesday, August 5, 2020 at 2:16:37 PM UTC-7, Reimundo Heluani wrote: > > So the problem is simply that Sage does accept the string "wdegrevlex" as > a > term order but does not assign degrees. Calling it the right way works: > > sage: R = PolynomialRing(QQ, 'x0,x1,x2', > order=TermOrder('w

Re: [sage-devel] TypeError in term_order

2020-08-05 Thread 'Reimundo Heluani' via sage-devel
On Aug 05, 'Reimundo Heluani' via sage-devel wrote: This actually does look like a bug in Sage: sage: R = PolynomialRing(GF(2), 'x0,x1,x2', order='wdegrevlex') sage: R.inject_variables() Defining x0, x1, x2 sage: J = R.ideal([x0*x1+x2]) sage: J ) failed: TypeError: zip argument #2 must support i

Re: [sage-devel] TypeError in term_order

2020-08-05 Thread 'Reimundo Heluani' via sage-devel
This actually does look like a bug in Sage: sage: R = PolynomialRing(GF(2), 'x0,x1,x2', order='wdegrevlex') sage: R.inject_variables() Defining x0, x1, x2 sage: J = R.ideal([x0*x1+x2]) sage: J ) failed: TypeError: zip argument #2 must support iteration> R. On Aug 05, 'Reimundo Heluani' via sa

Re: [sage-devel] Definite Integral wrong

2020-08-05 Thread Dave Morris
I agree with the general analysis, but I think the statement "Any answer that supplies only one answer is wrong." goes too far. It may be the case that sage works inherently in the complex domain, and is unable to understand that elementary calculus and certain other fields want to remain in t

Re: [sage-devel] Definite Integral wrong

2020-08-05 Thread NicoJG
@rjf Isn't the square root defined to be positive? Sure: x^2=y <=> x=+/-sqrt(y) But I think you would never consider f(x):=sqrt(x) to have the codomain of all negative numbers. At least I would expect a CAS to interpret a square root to be positive. rjf schrieb am Mittwoch, 5. August 2020 um 20:

Re: [sage-devel] Definite Integral wrong

2020-08-05 Thread rjf
There are two square roots. In this (classic) integration example/bug, a choice has to be made. You know that 4 has two square roots, -2 and 2. The integrand, which also can be rewritten as sqrt ( 4-4*cos(x/2)^2) , has 2 square roots. Therefore there are two potential different values for t

Re: [sage-devel] TypeError in term_order

2020-08-05 Thread 'Reimundo Heluani' via sage-devel
On Aug 05, 'Reimundo Heluani' via sage-devel wrote: I went to try to answer a question posted today in sage-support and found this: sage: P = PolynomialRing(QQ, 'x0,x1,x2') sage: P = PolynomialRing(GF(2), 'x0,x1,x2') sage: P.inject_variables() Defining x0, x1, x2 sage: I = P.ideal(x0*x1+x2) sag

[sage-devel] TypeError in term_order

2020-08-05 Thread 'Reimundo Heluani' via sage-devel
I went to try to answer a question posted today in sage-support and found this: sage: P = PolynomialRing(QQ, 'x0,x1,x2') sage: P = PolynomialRing(GF(2), 'x0,x1,x2') sage: P.inject_variables() Defining x0, x1, x2 sage: I = P.ideal(x0*x1+x2) sage: I.reduce(x2) x2 sage: R = PolynomialRing(GF(2), '