Ticket #10868 (closed defect: fixed)

Opened 2 years ago

Last modified 16 months ago

A wrong (easy) limit

Reported by: jvarona Owned by: burcin
Priority: major Milestone: sage-5.0
Component: calculus Keywords:
Cc: mjo Work issues:
Report Upstream: Fixed upstream, in a later stable release. Reviewers: Aly Deines
Authors: Michael Orlitzky Merged in: sage-5.0.beta3
Dependencies: #12094 Stopgaps:

Description

If we define f(n)=2+1/factorial(n) the answer of sage for limit(1/f(n),n=oo) is 1, that is clearly wrong. However, limit(f(n),n=oo) gives the answer 2, that is correct.

I have seen this problem in (at least) sage 4.6 and sage 4.6.2, in several kind of computers.

Attachments

sage-trac_10868.patch Download (902 bytes) - added by mjo 16 months ago.
Add a doctest for this result. Apply on top of #11483 and #11591 to avoid fuzz.

Change History

comment:1 Changed 2 years ago by kcrisman

  • Report Upstream changed from N/A to Reported upstream. Little or no feedback.
  • Authors jvarona deleted

This is in Maxima.

sage: maxima_console()
;;; Loading #P"/Applications/MathApps/sage/local/lib/ecl/SB-BSD-SOCKETS.fas"
;;; Loading #P"/Applications/MathApps/sage/local/lib/ecl/SOCKETS.fas"
;;; Loading #P"/Applications/MathApps/sage/local/lib/ecl/DEFSYSTEM.fas"
;;; Loading #P"/Applications/MathApps/sage/local/lib/ecl/cmp.fas"
;;; Loading #P"/Applications/MathApps/sage/local/lib/ecl/sysfun.lsp"
Maxima 5.22.1 http://maxima.sourceforge.net
using Lisp ECL 10.4.1
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.
(%i3) limit(2+1/factorial(n),n,inf);
(%o3)                                  2
(%i4) limit(1/(2+1/factorial(n)),n,inf);
(%o4)                                  1

This is still present in the latest Maxima. See  this report.

comment:2 Changed 2 years ago by kcrisman

  • Report Upstream changed from Reported upstream. Little or no feedback. to Fixed upstream, but not in a stable release.

 This report suggests it is fixed in the latest upstream. This would need a patch to verify, once we would update Maxima to that release.

comment:3 Changed 18 months ago by mjo

  • Cc mjo added
  • Dependencies set to #12094
  • Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.

This is fixed in stable maxima 5.24.0:

sage: f(n)=2+1/factorial(n)
sage: limit(1/f(n),n=oo)
1/2
sage: limit(f(n),n=oo)
2
sage: maxima.version()
'5.24.0'

Changed 16 months ago by mjo

Add a doctest for this result. Apply on top of #11483 and #11591 to avoid fuzz.

comment:4 Changed 16 months ago by mjo

  • Status changed from new to needs_review
  • Authors set to Michael Orlitzky

Maxima 5.24 has a positive review now, so here's a doctest. The file maxima_lib.py gets some new doctests in #11483 and #11591 so to avoid fuzz, apply on top of those (we don't require either of them for the result, though).

comment:5 Changed 16 months ago by aly.deines

  • Status changed from needs_review to positive_review
  • Reviewers set to Aly Deines

comment:6 Changed 16 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.0.beta3
Note: See TracTickets for help on using tickets.