rtoy / maxima

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

\"integrate\" asks if FALSE is pos, neg, or zero #1563

Closed rtoy closed 2 days ago

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:37 Created by robert_dodier on 2003-05-06 13:50:30 Original: https://sourceforge.net/p/maxima/bugs/308


"integrate((1+erf(sqrt(1/u).(u-1)))/2,u,0,inf);" asks if FALSE is positive, negative, or zero. That doesn't seem like a meaningful question.

Since sqrt(1/u).(u-1) increases like sqrt(u), the integrand approaches a positive constant (namely one) and so the answer ought to be INF, I think.

I am running Maxima 5.9.0 on RedHat Linux 7.2.

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:38 Created by robert_dodier on 2004-11-25 17:22:28 Original: https://sourceforge.net/p/maxima/bugs/308/#fee2


rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:42 Created by robert_dodier on 2005-05-16 04:53:17 Original: https://sourceforge.net/p/maxima/bugs/308/#423b


Logged In: YES user_id=501686

Trying this with commutative multiplication instead of noncommutative (i.e. integrate((1+erf(sqrt(1/u)*(u-1)))/2,u,0,inf);) yields a noun form, without asking a question.

Bug is still present in 5.9.1cvs from 3/31/2005 (clisp 2.33, linux).

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:45 Created by robert_dodier on 2006-04-10 04:09:08 Original: https://sourceforge.net/p/maxima/bugs/308/#b4f1


rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:49 Created by hgeyer on 2007-06-08 16:09:45 Original: https://sourceforge.net/p/maxima/bugs/308/#414a


Logged In: YES user_id=929336 Originator: NO

It seem's the original problem has gone quite some time ago. I couldn't reproduce it under 5.11.0 nor 5.12.0. Now maxima asks an other (a little bit more meaningful) question:

(%i2) integrate(1+erf(sqrt(u).(u-1)),u,0,inf); Is 'limit((1/sqrt(u)) . (1/u),u,0,plus) positive, negative, or zero? pos; (%o2) 'integrate(erf(sqrt(u) . (u-1))+1,u,0,inf)

This seems to be the minimal example, where maxima asks this kind of question:

(%i9) integrate(1+erf((u .u^2)),u,0,inf); Is 'limit(u . u^2,u,inf) positive, negative, or zero?pos; (%o9) 'integrate(erf(u . u^2)+1,u,0,inf)

One might argue, that this question is ok, since it makes sense if the integral makes any sense at all. OTOH the handling of "." in integrals seems somewhat strange to me. Not sure whether this bug should be closed or not.

This are futher cases:

(%i17) integrate(1+erf((u^3 .u^2)),u,0,inf); Is 'limit(u^3 . u^2,u,inf) positive, negative, or zero?pos; (%o17) 'integrate(erf(u^3 . u^2)+1,u,0,inf)

(%i18) integrate(1+erf((u^3 .u^n)),u,0,inf); Is 'limit(u^3 . u^n,u,inf) positive, negative, or zero?pos; (%o18) 'integrate(erf(u^3 . u^n)+1,u,0,inf)

(%i11) integrate(1+erf((u .a)),u,0,inf); Is 'limit(u . a,u,inf) positive, negative, or zero?pos; (%o11) 'integrate(erf(u . a)+1,u,0,inf)

In this cases maxima return a noun form or an actual answer without asking questions:

(%i16) integrate(1+erf((u^2 .u^2)),u,0,inf); (%o16) 'integrate(erf((u^2)^^2)+1,u,0,inf)

(%i12) integrate(1+erf((b .a)),u,0,inf); Integral is divergent -- an error. To debug this try debugmode(true); ... at least this is no worse than with other symbols.

(%i8) integrate(1+erf((u^^2 .u^2)),u,0,inf); (%o8) 'integrate(erf(u^^2 . u^2)+1,u,0,inf)

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:52 Created by dgildea on 2007-12-15 19:14:58 Original: https://sourceforge.net/p/maxima/bugs/308/#5c0f


rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:41:56 Created by dgildea on 2007-12-15 19:14:58 Original: https://sourceforge.net/p/maxima/bugs/308/#cde1


Logged In: YES user_id=1797506 Originator: NO

I think the current behavior (described below) is fine.