rtoy / maxima

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

Wrong limit #2231

Open rtoy opened 1 week ago

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-05 21:40:28 Created by sheep_tk on 2011-11-08 06:53:30 Original: https://sourceforge.net/p/maxima/bugs/2291


I am using maxima 5.22.1.

The following happend to me when I was unaware of the difference between "inf" and "infinity". I entered

limit(n*(sqrt(n^2+1)-n),n,infinity);

and got the result

infinity

when I expected 1/2. I now know the difference, and in fact I see that

limit(n*(sqrt(n^2+1)-n),n,inf);

gives 1/2 as expected, but nevertheless, I disagree with the other result. That is, a limit to "inf" is, so to say, a special case of a limit to "infinity", so that, if the limit to "inf" of a certain expression exists and is a finite value, the corresponding limit to "infinity" must either be the same value or "und" (undefined).

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-05 21:40:29 Created by willisbl on 2023-11-19 11:51:09 Original: https://sourceforge.net/p/maxima/bugs/2291/#52e2


With Maxima 5.47, I get

(%i1)   limit(n*(sqrt(n^2+1)-n),n,infinity);
gruntz: direction must be 'plus' or 'minus'; found: false

 -- an error. To debug this try: debugmode(true);

I think the user documentation should explicitly say that the limit point can be a real quantity, minf, or inf, but it cannot be infinity. Also the source code should give an error when the limit point is infinity.