It is not clear what you want from the limit program, in general.
For example, you refer to directions like left, right, plus, minus.
So you mean that limit should only work for f(x) where x is a REAL valued
variable
approaching a (presumably) real value [or infinity?]
Why not allow x to approach a complex value from some arbitrary path, e.g. a
spiral?
Why not allow x to be a vector, eg. x->[infinity,infinity] or maybe an
interval?
Typically "limitands" are composed of real-valued analytic functions, but a
program
could have other more generous specifications. Vladimir Bondarenko typically
makes up such
generous specifications and when the CAS "fails" claims it is a bug.
For example, one might disallow floor() in a limitand, but that would not
necessarily be the case.
One might allow arbitrary other expressions available in a computer algebra
system, including program fragments, like limit( if(f(x)=0) then 1 else 0,
x-> a), which may require that one solve an undecidable predicate, etc.
So is this a bug in the program? A failure to document? A fundamental
barrier like Turing computability? or something else?
RJF
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of William Stein
> Sent: Thursday, July 24, 2008 3:25 AM
> To: sage-support at googlegroups.com; maxima at math.utexas.edu;
> Robert Dodier; sympy at googlegroups.com
> Subject: Re: [Maxima] [sage-support] Re: limit of floor
>
> Hi,
>
> This email is about the fact that Sage (and Maxima and sympy)
> all give the wrong answer for a certain limit, at least if one follows
> the standard definition given at wikipedia of limit. The
> limit in question
> is
>
> lim_{x --> 0 from below} floor(x)
>
> This problem was reported two weeks ago by John Perry (my old
> office might from Northern Arizona Univeristy 14 years ago, by
> the way...)
>
> See below for full details.
>
> > That looks to me like a bug caused by an underlying bug in maxima.
> > maxima: limit(floor(x),x,0,`minus')
> > does not finish,
> > while
> > maxima: limit(floor(x),x,0)
> > 0
> > John Cremona
>
> In maxima it would be limit(floor(x),x,0,minus) -- i.e., no
> quotes, and
> that does finish. However the output directly from maxima
> is still 0. I've cc'd this email to maxima-devel and Robert
> Dodier, in case they have a comment. I've also sent it to
> the sympy list since sympy also gives the wrong answer
> (see below).
>
>
> ---------------------------------------------------
> teragon-2:doc was$ sage -maxima
> Maxima 5.13.0 http://maxima.sourceforge.net
> Using Lisp CLISP 2.46 (2008-07-02)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> This is a development version of Maxima. The function bug_report()
> provides bug reporting information.
> (%i1) limit(floor(x),x,0,minus);
> (%o1) 0
> (%i4) limit(ceiling(x),x,0,plus);
> (%o4) 0
> -------------------------------------------------
>
> If you read the formal definition of limit, e.g., as given at
>
> http://en.wikipedia.org/wiki/Limit_of_a_function
>
> you'll see the output of Maxima (and sage) is just plain wrong.
>
>
> -----
>
> Here's sympy (also wrong):
>
> sage: import sympy
> sage: x = sympy.var('x')
> sage: f = sympy.floor(x)
> sage: f.limit(x, 0, '<')
> 0
> sage: f.limit(x, 0, '>')
> 0
>
>
>
> -----
>
> Maple does exactly the right thing of course, and uses
> better names -- left and right -- (imho) than Sage's
> "minus" and "plus":
>
> sage: maple('limit(floor(x),x=0,left)')
> -1
> sage: maple('limit(floor(x),x=0,right)')
> 0
> sage: maple('limit(floor(x),x=0)')
> undefined
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>