[Maxima] Limit applyed to a very long expression

Stavros Macrakis macrakis at alum.mit.edu
Tue Aug 25 16:25:38 CDT 2009


This ratlimit function may be better for this particular case, but I would
really hesitate before including it in any code I wrote, because it is too
brittle. For example, ratlimit(exp(x)/x,x,inf) will blithely return 0.
Years of sad experience shows that code that doesn't check that its
arguments are of the correct form will inevitably be called on arguments
which are of incorrect form, and return incorrect results with no warning to
the user.

If tlimit is fast enough for your application, I would stick to it.

                -s

On Tue, Aug 25, 2009 at 4:57 PM, Stefano Ferri <ferriste at gmail.com> wrote:

> Here there is an improved version, to avoid quotient by zero if f=0
>
>
> ratlimit(f,x,l) := block([d,n,dd],
>        if f=0 then 0
>        else (
>                 d:denom(f),
>                n:denom(1/f),
>                 dd : hipow(d,x),
>                d : tlimit(x^(-dd)*d,x,l),
>                n : tlimit(x^(-dd)*n,x,l),
>                n/d
>        )
> )$
>
> Stefano
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20090825/0069f3a1/attachment.htm 


More information about the Maxima mailing list