output form of limits is misleading

51 views
Skip to first unread message

Greg1950

unread,
May 13, 2019, 3:39:57 AM5/13/19
to sage-devel
I am using SageMath version 8.7, Release Date 2019-03-23, within a Jupyter notebook.  My operating system is Windows 10.

I know some elementary Python programming, but am certainly not an expert.  I am essentially a newbie to SageMath. 

I defined, as per the S.D.S.U. Sage Tutorial, a function

h(x) = (x^2 + x - 2)/(x - 4)

Upon asking SageMath 8.7 to compute

limit(h, x = 4, dir="right")

I received as answer

x |--> Infinity

While the value of the (right-hand) limit is indeed Infinity, the " x |--> " which precedes it in the "Out" cell suggests that the argument x of the function h is approaching Infinity, while in fact it is the value h(x) of the function which is doing so.  The argument x itself is approaching 4 from the right.

So the form of the answer is misleading.  It would be better if the answer appeared simply as

Infinity

The answers to other limit calculations appear similarly to the above example and may be similarly criticized. 

Emmanuel Charpentier

unread,
May 13, 2019, 5:47:11 AM5/13/19
to sage-devel
Let's see :
sage: h(x)=(x^2+x+2)/(x-4)
sage: h.parent()
Callable function ring with argument x
sage: limit(h,x=4,dir="right").parent()
Callable function ring with argument x
sage: h(x).parent()
Symbolic Ring
sage: limit(h(x),x=4,dir="right").parent()
Symbolic Ring
sage: limit(h(x),x=4,dir="right")
+Infinity

Is that clearer ?

HTH,

Gregory Grunberg

unread,
May 13, 2019, 1:26:16 PM5/13/19
to sage-...@googlegroups.com
Hi Emmanuel,

Thank you for your reply.  Given the preliminary declarations 
x = var("x")
h(x) = (x^2 + x + 2)/(x - 4)    ,
I've discovered that 
limit(h, x=4, dir="right")
gives the confusing answer
 x |--> +Infinity ,
but that by replacing h by h(x) one obtains the desired answer 
+Infinity      .
Put differently, the command I want should be written 
limit(h(x), x=4, dir="right")    .
My confusion was caused in part by the S.D.S.U. SageMath Tutorial, but I was also misled in part by two different styles for writing limits in the mathematical literature.  

Greg Grunberg

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/f5c765f9-ffab-4b4b-895c-ecb5453b431b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages