Wrong limits



Thanks for bringing this particular bug to our attention.

Alas, Maxima is not perfect, so bug reports like this are valuable.
Subjectively, limit and definite integration seem to be among the weaker
modules of Maxima; as a general rule, tlimit (which uses taylor) seems to be
better in those cases it handles, but it doesn't handle as many cases as
limit.  As it happens, tlimit gets your problem right.

As for trusting Maxima for limits ... or anything else ... Maxima is
admittedly a fallible tool.  We and our users regularly find bugs in many
parts of the system, some of which are corrected rapidly, others of which
have persisted for years.  I do not know how Maxima's bug frequency,
severity, and time-to-fix compares with the commercial CASs, but I do hear
that bugs are not unknown in them, either.  The commercial Macsyma did
repair many of the older bugs in Maxima, as it received full-time
development resources for many years; but it is apparently no longer
available.

I would not trust any CAS blindly, for anything.  If a cross-check is
possible with other techniques, I would always perform it when the answer is
critical (as opposed to when I'm exploring solution methods): after
factoring, expand the result (but this doesn't tell you if the factorization
was complete); after integrating, differentiate; after inverting a matrix,
multiply out; do sanity checks with specific numerical values; etc.  For
that matter, you might want to use high-precision arithmetic (bfloat) to
check numerical calculations where rounding errors might be an issue.  And
having a colleague review math done on paper can be a good idea...!

               -s

On 11/2/07, Paul Smith <phhs80 at gmail.com> wrote:
>
> (%i1)
> h:-(k^(k/(k-1))*(2*k-1)*2^(k/(k-1)))/((k-1)*(k*2^((2*k)/(k-1))-2^((2*k)/(k-1))-2*k+1))$
> (%i2) limit(h,k,1/3,plus);...
> Both limits are wrong: the first one is +oo and the second one is -oo.
> Can one really trust Maxima regarding the calculation of limits?...