sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

Wrong answer for a simple limit #17878

Open videlec opened 9 years ago

videlec commented 9 years ago

As reported in ask.sagemath.org we have

sage: f = exp(-x) / (2 + sin(x))
sage: f.limit(x=+infinity)
und

but it is clearly defined. And sympy gives the expected answer

sage: import sympy
sage: sympy.limit(f,x,+oo)
0

Upstream: Not yet reported upstream; Will do shortly.

CC: @kcrisman

Component: calculus

Keywords: bug, limit

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

videlec commented 9 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,7 @@
 As reported in [ask.sagemath.org](http://ask.sagemath.org/question/25970/) we have

-sage: f = (e^(-x))/(2+ sin(x)) +sage: f = exp(-x) / (2 + sin(x)) sage: f.limit(x=+infinity) und

videlec commented 9 years ago

Description changed:

--- 
+++ 
@@ -5,4 +5,10 @@
 sage: f.limit(x=+infinity)
 und

-but it is clearly defined! +but it is clearly defined. And sympy gives the expected answer + + +sage: import sympy +sage: sympy.limit(f,x,+oo) +0 +

zimmermann6 commented 6 years ago
comment:4

here is another example of wrong limit (thanks Manuel Eberl, here with Sage 8.2):

sage: f=log(log(x + e^(log(x)*log(log(x)))))/log(log(log(x + e^x + log(x))))
sage: f.limit(x=+infinity)
0

The correct answer is 1. See https://sourceforge.net/p/maxima/bugs/3393/

fchapoton commented 4 years ago

Changed keywords from bug to bug, limit