rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

integrate asks about (y-1)(y+1) after assume(y^2>1) #2165

Closed rtoy closed 3 months ago

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-05 20:35:04 Created by aghitza on 2008-02-22 05:47:17 Original: https://sourceforge.net/p/maxima/bugs/1356


Here is the problematic session:

Maxima 5.13.0 http://maxima.sourceforge.net Using Lisp CLISP 2.41 (2006-10-13) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. This is a development version of Maxima. The function bug_report() provides bug reporting information. (%i1) assume(y^2>1); 2 (%o1) [y > 1] (%i2) integrate(log(x^2+y^2),x,0.0001414,1.);

`rat' replaced 0.9998586 by 7071/7072 = .9998585972850679

`rat' replaced 1.414E-4 by 81/572843 = 1.413999996508642E-4

`rat' replaced 0.9998586 by 7071/7072 = .9998585972850679

`rat' replaced 0.9998586 by 7071/7072 = .9998585972850679

`rat' replaced 1.414E-4 by 81/572843 = 1.413999996508642E-4

`rat' replaced 0.9998586 by 7071/7072 = .9998585972850679

`rat' replaced 0.9998586 by 7071/7072 = .9998585972850679

`rat' replaced 1.414E-4 by 81/572843 = 1.413999996508642E-4

`rat' replaced 0.9998586 by 7071/7072 = .9998585972850679 Is (y - 1) (y + 1) positive, negative, or zero?

positive; 2 2 Is y + x + 2 x + 1 positive or negative?

positive; 2 2 1 (%o2) - 1.414E-4 log(1.0 y + 1.999396E-8) + log(y + 1) + 2 atan(-) y y 1.414E-4 - 2.0 atan(--------) y - 1.9997172 y (%i3)

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-05 20:35:06 Created by rtoy on 2008-02-22 14:16:39 Original: https://sourceforge.net/p/maxima/bugs/1356/#0d14


Logged In: YES user_id=28849 Originator: NO

Note that is((y-1)*(y+1)>0) returns unknown. If you say assume(y>1), integrate doesn't ask about that anymore. But it still asks about y^2+x^2+2*x+1. It should know that x > 0 and y > 0 here.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-05 20:35:09 Created by rtoy on 2008-02-22 14:16:54 Original: https://sourceforge.net/p/maxima/bugs/1356/#6641


Logged In: YES user_id=28849 Originator: NO

Note that is((y-1)*(y+1)>0) returns unknown. If you say assume(y>1), integrate doesn't ask about that anymore. But it still asks about y^2+x^2+2*x+1. It should know that x > 0 and y > 0 here.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-05 20:35:13 Created by crategus on 2009-06-02 23:07:29 Original: https://sourceforge.net/p/maxima/bugs/1356/#8940


After the last changes to the code of rectform and absarg in rpart.lisp we now get:

(%i4) integrate(log(x^2+y^2),x,0,1); (%o4) log(y^2+1)+2*atan(1/y)*y-2

We no longer get a question for this type of integral. The example above has a different lower value for the integral and works too:

(%i5) integrate(log(x^2+y^2),x,0.0001414,1); (%o5) -1.414E-4*log(1.0*y^2+1.999396E-8)+log(y^2+1)+2*atan(1/y)*y -2.0*atan(1.414E-4/y)*y-1.9997172

Closing this bug report as fixed.

Dieter Kaiser

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-05 20:35:17 Created by crategus on 2009-06-02 23:07:29 Original: https://sourceforge.net/p/maxima/bugs/1356/#d24f