Opened 6 years ago
Last modified 7 weeks ago
#17709 needs_work defect
Maxima limit() regression
Reported by: | rws | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.3 |
Component: | calculus | Keywords: | limit |
Cc: | tmonteil | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Reported upstream. Developers acknowledge bug. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
var('n'); u = (1+sqrt(n))^(-n); limit(u(n=n+1)/u,n=infinity)
: this was reported in http://ask.sagemath.org/question/25647/cannot-calculate-limit/ and worked at least in Sage-4.7
Change History (13)
comment:1 Changed 6 years ago by
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
comment:2 Changed 3 months ago by
- Cc tmonteil added
- Milestone changed from sage-6.5 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
Seems fixed in 9.2.beta10 - 0 is returned
comment:3 Changed 3 months ago by
(The upstream bug in maxima is still present; it seems we are using something else for computing the limit.)
comment:4 follow-up: ↓ 6 Changed 3 months ago by
- Status changed from needs_review to needs_work
My guess is that we now, as with integration, go through several "algorithms"/programs to get limits.
I guess technically this is still a Sage bug, then, if that is true and one then specifies the algorithm
? Otherwise I'd at the very least add a doctest.
comment:5 Changed 7 weeks ago by
- Keywords limit added
comment:6 in reply to: ↑ 4 Changed 7 weeks ago by
Replying to kcrisman:
My guess is that we now, as with integration, go through several "algorithms"/programs to get limits.
Not yet, as nobody did it..
I guess technically this is still a Sage bug, then, if that is true and one then specifies the
algorithm
? Otherwise I'd at the very least add a doctest.
comment:7 Changed 7 weeks ago by
Hmm, that is interesting. Maxima returns a nounform 'limit((sqrt(n)+1)^n*(sqrt(n+1)+1)^((-n)-1),n,inf)
inside of Sage 9.2.beta1
Maxima 5.42.2 http://maxima.sourceforge.net using Lisp ECL 16.1.2
But I don't have the most recent Maxima. Can you test this?
sage -maxima <messages about Maxima 5.44, hopefully> (%i1) limit((1+sqrt(n+1))^(-n-1)/(1+sqrt(n))^(-n),n,inf);
If you get zero then they fixed it, and then a doctest suffices. Otherwise we may have something really weird going on in our own processing, though I don't see what would have changed - Frédéric is right about that, as far as I can tell.
comment:8 Changed 7 weeks ago by
Can you also test this in maxima_calculus
in the most recent Sage rc? Upstream says it is not fixed. I still get
sage: maxima_calculus("limit((1+sqrt(n+1))^(-n-1)/(1+sqrt(n))^(-n),n,inf)") 'limit((sqrt(n)+1)^n*(sqrt(n+1)+1)^((-n)-1),n,inf)
comment:9 Changed 7 weeks ago by
I get
sage: banner() ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.2.rc2, Release Date: 2020-10-12 │ │ Using Python 3.8.5. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Warning: this is a prerelease version, and it may be unstable. ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ sage: maxima_calculus("limit((1+sqrt(n+1))^(-n-1)/(1+sqrt(n))^(-n),n,inf)") 'limit((sqrt(n)+1)^n*(sqrt(n+1)+1)^((-n)-1),n,inf)
EDIT: with
Maxima 5.44.0 http://maxima.sourceforge.net using Lisp ECL 20.4.24
comment:10 Changed 7 weeks ago by
That is really weird. I really can't find any branch of the code that should just avoid Maxima completely without adding an algorithm
. Can you confirm Matthias' contention that
var('n'); u = (1+sqrt(n))^(-n); limit(u(n=n+1)/u,n=infinity)
now returns zero in that rc version?
comment:11 Changed 7 weeks ago by
no, this does not return 0. Maybe Matthias was looking at something else ?
comment:12 Changed 7 weeks ago by
I cannot confirm my claim from comment 2 above either. I don't know what I may have tested there.
comment:13 Changed 7 weeks ago by
- Milestone changed from sage-duplicate/invalid/wontfix to sage-9.3
- Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
Ok, thanks - setting back settings then. At least now Maxima has acknowledged bug :-)
Upstream here.