Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong limit(x / (x + 2^x + cos(x)), x=-oo) #26060

Closed
pelegm opened this issue Aug 14, 2018 · 24 comments
Closed

Wrong limit(x / (x + 2^x + cos(x)), x=-oo) #26060

pelegm opened this issue Aug 14, 2018 · 24 comments

Comments

@pelegm
Copy link
Contributor

pelegm commented Aug 14, 2018

Up to Sage 8.7 this limit returns "und" for "undefined":

sage: limit(x / (x + 2^x + cos(x)), x=-infinity)
und

while it should clearly be 1.

SymPy returns the correct result:

sage: limit(x / (x+2^x + cos(x)), x=-infinity, algorithm='sympy')
1

Reported to Maxima on 2018-08-15
as Maxima bug 3459,
fixed there
by Maxima commit 0c5c018
on 2018-08-30, fix included
in Maxima 5.42.2
to which we upgrade in #26625, merged in Sage 8.8.beta7.

In Sage >= 8.8 we get the correct value for this limit:

sage: limit(x / (x + 2^x + cos(x)), x=-infinity)
1

This ticket adds a doctest for that limit computation.

Depends on #26625

Upstream: Fixed upstream, in a later stable release.

CC: @slel

Component: calculus

Keywords: limit, maxima

Author: Samuel Lelièvre

Branch/Commit: 7f96496

Reviewer: Karl-Dieter Crisman

Issue created by migration from https://trac.sagemath.org/ticket/26060

@pelegm pelegm added this to the sage-8.4 milestone Aug 14, 2018
@kcrisman
Copy link
Member

Upstream: Reported upstream. No feedback yet.

@kcrisman
Copy link
Member

comment:1

Apparently yes.

$ sage --maxima
<snip>
Maxima 5.41.0 http://maxima.sourceforge.net
using Lisp ECL 16.1.2
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(x / (x+2^x+cos(x)),x,-inf)       ;
(%o1)                                 und

I've reported this at Maxima bug 3459.

@kcrisman
Copy link
Member

Changed upstream from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

@kcrisman
Copy link
Member

Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.

@kcrisman
Copy link
Member

comment:4

(That was pretty fast work!)

@slel
Copy link
Member

slel commented Feb 19, 2019

Changed upstream from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented Feb 19, 2019

Dependencies: #26625

@slel
Copy link
Member

slel commented Feb 19, 2019

comment:5

After the upgrade to Maxima 5.42.2 in #26625, we should add a doctest here.

@slel slel modified the milestones: sage-8.4, sage-8.7 Feb 19, 2019
@embray
Copy link
Contributor

embray commented Mar 25, 2019

comment:6

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

@embray embray modified the milestones: sage-8.7, sage-8.8 Mar 25, 2019
@embray
Copy link
Contributor

embray commented Jun 14, 2019

comment:7

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

@embray embray removed this from the sage-8.8 milestone Jun 14, 2019
@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 29, 2020

comment:8

Works in 9.2.beta10

@kcrisman
Copy link
Member

comment:9

Doctest

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented Sep 16, 2020

comment:10

Doctest added. Please review.


New commits:

7f9649626060: doctest for limit after Maxima upgrade

@slel
Copy link
Member

slel commented Sep 16, 2020

Branch: public/ticket/26060

@slel
Copy link
Member

slel commented Sep 16, 2020

Commit: 7f96496

@slel slel added this to the sage-9.2 milestone Sep 16, 2020
@slel

This comment has been minimized.

@slel slel changed the title Wrong limit calculation Wrong limit(x / (x + 2^x + cos(x)), x=-oo) Sep 16, 2020
@kcrisman
Copy link
Member

comment:14

Looks fine to me (assuming patchbot says it's fine), though all the other changes in typesetting could have occurred on another ticket. Thanks for doctesting!

@kcrisman
Copy link
Member

Reviewer: Karl-Dieter Crisman

@kcrisman
Copy link
Member

Author: Samuel Lelievre

@slel
Copy link
Member

slel commented Sep 16, 2020

Changed author from Samuel Lelievre to Samuel Lelièvre

@kcrisman
Copy link
Member

comment:18

Sorry! Haven't been keeping "Trac" as much lately.

@vbraun
Copy link
Member

vbraun commented Sep 23, 2020

Changed branch from public/ticket/26060 to 7f96496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants