Possibly wrong limit concerning log

69 views
Skip to first unread message

pcworld

unread,
Jun 1, 2015, 6:33:12 PM6/1/15
to sage-s...@googlegroups.com
lim(27^log(n,3)/n^3, n=infinity)
returns 0.
Is this a bug in Sage?

kcrisman

unread,
Jun 1, 2015, 8:53:18 PM6/1/15
to sage-s...@googlegroups.com, 018...@googlemail.com

lim(27^log(n,3)/n^3, n=infinity)

Indeed, if you use http://en.wikipedia.org/wiki/List_of_logarithmic_identities#Canceling_exponentials you can easily see that the expression equals 1 in the first place! Plotting it yields the same.

But unfortunately Maxima does not seem to have this identity, partly perhaps because it only has the 'natural' logarithm.

However,

(%i7) limit(2^(log(x)/log(2))/x,x,inf);
(%o7)                                  1

so it at least sort of knows this.  I wonder if anyone else has any ideas here?

ssin...@coe.edu

unread,
Jun 3, 2015, 5:29:11 PM6/3/15
to sage-s...@googlegroups.com, 018...@googlemail.com


On Monday, June 1, 2015 at 7:53:18 PM UTC-5, kcrisman wrote:
 I wonder if anyone else has any ideas here?

sympy, too, finds the limit despite not recognizing the identity:
 
%python
from sympy import *
x = symbols('x')
expr = 27**(log(x,3)/x**3)
expr, limit(expr, x, oo)

>>> (27**(log(x)/(x**3*log(3))), 1)

Steve

pcworld

unread,
Jun 4, 2015, 9:37:27 AM6/4/15
to sage-s...@googlegroups.com, 018...@googlemail.com
sympy, too, finds the limit despite not recognizing the identity: 
expr = 27**(log(x,3)/x**3)
expr, limit(expr, x, oo)
Your expression has "1/x^3" in its exponent. The expression from the orginal post would be 27**(log(x,3))/x**3, which SymPy correctly simplifies and finds the correct limit for:
>>> simplify(27**(log(x,3))/x**3)
Integer(1)
>>> limit(27**(log(x,3))/x**3,x,oo)
Integer(1)

Other examples of wrong limits with logarithm in exponent in Sage:
lim((((27**(log(n,3))))/n**3),n=infinity) returns 0 (Wolfram Alpha and Maple return 1).
lim((((27**(log(n,3)+1)))/n**3),n=infinity) returns 0 (Wolfram Alpha and Maple return 27).
lim(((27**(log(n,3)+1)-1)/26+n-log(n,3)-1)/n**3,n=infinity) returns 0 (Wolfram Alpha and Maple return 27/26).
Using SageMathVersion6.7, ReleaseDate:2015−05−17.

(SymPy has issues with these limits too, albeit different ones. I've reported them here.)

kcrisman

unread,
Jun 4, 2015, 9:29:46 PM6/4/15
to sage-s...@googlegroups.com, 018...@googlemail.com

Other examples of wrong limits with logarithm in exponent in Sage:
lim((((27**(log(n,3))))/n**3),n=infinity) returns 0 (Wolfram Alpha and Maple return 1).
lim((((27**(log(n,3)+1)))/n**3),n=infinity) returns 0 (Wolfram Alpha and Maple return 27).
lim(((27**(log(n,3)+1)-1)/26+n-log(n,3)-1)/n**3,n=infinity) returns 0 (Wolfram Alpha and Maple return 27/26).
Using SageMathVersion6.7, ReleaseDate:2015−05−17.

I believe these are all the same Maxima problem. 

kcrisman

unread,
Jun 25, 2015, 12:11:14 PM6/25/15
to sage-s...@googlegroups.com, kcri...@gmail.com
Update - this is fixed upstream! Though I will point out that the fix involves radcan, which not everyone here is enamored of. 
Reply all
Reply to author
Forward
0 new messages