Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbolic.limit wrongly gives ZeroDivisionError #15451

Closed
dkrenn opened this issue Nov 25, 2013 · 12 comments
Closed

symbolic.limit wrongly gives ZeroDivisionError #15451

dkrenn opened this issue Nov 25, 2013 · 12 comments

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Nov 25, 2013

We have

sage: (4-x^2)/(3-sqrt(x^2+5)).limit(x=2)
Traceback (most recent call last):
...
ZeroDivisionError: Symbolic division by zero

but

sage: limit((4-x^2)/(3-sqrt(x^2+5)), x=2)
6

Those two should give the same result (at least the docstring of x.limit says See "sage.calculus.calculus.limit", so it has the appearence that the same functions are called).

CC: @kcrisman

Component: symbolics

Keywords: symbolic, limit, wrong, zero division

Reviewer: Daniel Krenn, Akshay Ajagekar

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

@dkrenn dkrenn added this to the sage-6.1 milestone Nov 25, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@dkrenn
Copy link
Contributor Author

dkrenn commented Apr 16, 2015

comment:5

Still there in 6.6.

@sagetrac-ajagekar-akshay
Copy link
Mannequin

comment:6

I don't understand the issue. In case of

sage: (4-x^2)/(3-sqrt(x^2+5)).limit(x=2)

4-x^2 gets divided by (3-sqrt(x^2+5)).limit(x=2) which is 0, so the ZeroDivisionError. But this works

sage: ((4-x^2)/(3-sqrt(x^2+5))).limit(x=2)
6

@rwst
Copy link

rwst commented Mar 5, 2016

comment:7

Well, it's similar to (sin(x)/x).limit(x=0), isn't it?

https://en.wikipedia.org/wiki/Indeterminate_form

@sagetrac-ajagekar-akshay
Copy link
Mannequin

comment:8

The expression of which limit is evaluated in this case is (3-sqrt(x^2+5)) at x=2 and not the whole expression (4-x<sup>2)/(3-sqrt(x</sup>2+5)) as for the second case limit((4-x<sup>2)/(3-sqrt(x</sup>2+5)), x=2) limit is evaluated for whole expression. proper parenthesis would give correct answer.

@rwst
Copy link

rwst commented Mar 5, 2016

comment:9

So you agree it's user error?

@rwst rwst removed this from the sage-6.4 milestone Mar 5, 2016
@sagetrac-ajagekar-akshay
Copy link
Mannequin

comment:10

Replying to @rwst:

So you agree it's user error?

Yes.

@dkrenn
Copy link
Contributor Author

dkrenn commented Mar 5, 2016

comment:11

I agree as well that it is a user error (sorry, I didn't see this (the wrong parentheses) when opening the ticket).

Feel free to insert your name(s) in the author field.

@dkrenn
Copy link
Contributor Author

dkrenn commented Mar 5, 2016

Reviewer: Daniel Krenn

@sagetrac-ajagekar-akshay
Copy link
Mannequin

Author: Akshay Ajagekar

@kcrisman
Copy link
Member

kcrisman commented Mar 7, 2016

comment:13

Actually, there are no authors if there is no patch, but definitely this is a contribution so I put it in reviewers.

@kcrisman
Copy link
Member

kcrisman commented Mar 7, 2016

Changed reviewer from Daniel Krenn to Daniel Krenn, Akshay Ajagekar

@kcrisman
Copy link
Member

kcrisman commented Mar 7, 2016

Changed author from Akshay Ajagekar to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants