rtoy / maxima

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

limit( (sin(x)+1)/sin(x), x, inf); -> 1 and not und #1534

Open rtoy opened 2 months ago

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-04 18:07:30 Created by umnikos on 2022-01-15 19:38:29 Original: https://sourceforge.net/p/maxima/bugs/3917


~ $ maxima-sage
;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-20.4.24/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-20.4.24/sockets.fas"
Maxima 5.44.0 http://maxima.sourceforge.net
using Lisp ECL 20.4.24
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) limit( (sin(x)+1)/sin(x), x, inf);
(%o1)                                  1
(%i2) 
rtoy commented 2 months ago

Imported from SourceForge on 2024-07-04 18:07:30 Created by macrakis on 2022-01-15 21:23:06 Original: https://sourceforge.net/p/maxima/bugs/3917/#59c0


Correct limit is und, not ind since expression is unbounded. However, limit(1/sin(x),x,inf) correctly gives und.

More bad cases

The equivalent limit(1+1/sin(x),x,inf) also incorrectly gives 1.

limit(x+1/sin(x),x,inf) incorrectly gives inf, not und.

limit(1/sin(x)+1/cos(x),x,inf) incorrectly gives 0, not und.

(moving less related case to their own ticket)

Tested in Maxima 5.45.1, SBCL 2.0.0

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-04 18:07:34 Created by macrakis on 2022-01-19 20:33:48 Original: https://sourceforge.net/p/maxima/bugs/3917/#7e77


rtoy commented 2 months ago

Imported from SourceForge on 2024-07-04 18:07:38 Created by macrakis on 2022-01-19 20:33:49 Original: https://sourceforge.net/p/maxima/bugs/3917/#24e2


Correct limit is und, not ind since expression is unbounded. However, limit(1/sin(x),x,inf) correctly gives und.

More bad cases

The equivalent limit(1+1/sin(x),x,inf) also incorrectly gives 1.

limit(x+1/sin(x),x,inf) incorrectly gives inf, not und.

limit(1/sin(x)+1/cos(x),x,inf) incorrectly gives 0, not und.

limit(cos(x)*tan(x),x,inf) gives und, which is probably incorrect (depending on how you think about removable singularities).

limit(ceiling(x)-floor(x),x,inf) gives 0; should be ind.

Tested in Maxima 5.45.1, SBCL 2.0.0

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-04 18:07:41 Created by tomasriker on 2022-12-28 03:38:09 Original: https://sourceforge.net/p/maxima/bugs/3917/#e462


With current Maxima (as of 2022-12-28), many of these limits are computed correctly, notably the one mentioned in the initial bug report. Should this ticket be closed?

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-04 18:07:45 Created by umnikos on 2022-12-28 14:08:08 Original: https://sourceforge.net/p/maxima/bugs/3917/#a66f


Maybe it'll be a good idea to turn these cases into unit tests to prevent future regression?