Opened 10 years ago
Last modified 7 years ago
#13221 needs_work defect
Limit should not depend on dummy variable.
Reported by: | kcrisman | Owned by: | burcin |
---|---|---|---|
Priority: | minor | Milestone: | sage-pending |
Component: | calculus | Keywords: | |
Cc: | novoselt | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
See #12438 as well.
Somewhere between Sage 4.4.4 and 4.8 we changed behavior - not correctly, I'd say.
$ Downloads/sage-4.8/sage ---------------------------------------------------------------------- | Sage Version 4.8, Release Date: 2012-01-20 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: f(x) = x^2 sage: limit(f,x=1) x |--> 1 sage: limit(f(x),x=1) 1 sage: Exiting Sage (CPU time 0m1.15s, Wall time 0m10.57s). $ Desktop/sage-4.4.4-mcbc/sage ---------------------------------------------------------------------- | Sage Version 4.4.4, Release Date: 2010-06-23 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- Loading Sage library. Current Mercurial branch is: hackbranch sage: f(x) = x^2 sage: limit(f,x=1) 1 sage: limit(f(x),x=1) 1
Change History (10)
comment:1 Changed 10 years ago by
- Cc novoselt added
comment:2 Changed 9 years ago by
- Description modified (diff)
comment:3 Changed 9 years ago by
comment:4 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:5 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:8 Changed 7 years ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
I don't see this behaviour anymore. Please confirm and close.
comment:9 Changed 7 years ago by
- Milestone changed from sage-duplicate/invalid/wontfix to sage-pending
- Status changed from needs_review to needs_work
I do get the reported behaviour in 6.5beta
sage: f(x) = x^2 sage: limit(f,x=1) x |--> 1
This is coming from the fact that sage does this transformation (well, it's a side-effect of the implementation above):
limit( E.function(t), t=1) ---> E.limit(t=1).function(t)
That transformation really has no merit whatsoever. The thing that's hard about this is that the type of E.function(t)
is just SymbolicExpression
. The callable bit is entirely stored in the parent.
Another way would be to subclass to CallableSymbolicExpression? and override things like limit
and integral
to produce errors instead (or do something useful if there is a reasonable choice).
Arithmetic on callable expressions in general seems pretty sane:
sage: f(x)=x^2 sage: g(y)=1+y sage: f+g (x, y) |--> x^2 + y + 1
comment:10 Changed 7 years ago by
And why should it be (x,y)
instead of (y,x)
? What if one depends on (a, b)
and the other on (alpha, beta)
, what should the result be? I think that in such cases the result should be a symbolic expression (which is unambiguous), but without any default order of variables. This is why polynomials in different variables cannot be added - ordering is non-canonical.
The problem is that
limit
ends withand functions depending on certain variables have limits depending on the same variables. I wonder where else such a behaviour may pop-up and what would be a good generic way to handle it.