Limit applyed to a very long expression



Your comment is rigth, I have no way to check if expression is
rational in _bk. Anyway, because _bk is only used to impose linear
dependence conditions on the coefficient matrix, results will be
rational in _bk. If I am rigth, only integer powers of _bk will
appear, therefore in this particular case ratsimp is a good solution.
Only for such expressions ratsimp will be used, so I hope not to be
wrong to apply it without check the expression.
For other situations I will use tlimit. But because here I know "a
priori" that vector of unknowns will be rational in _bk, I think that
this method is ok, Moreover, ratlimit is only used in internal
calculations in my program, and users will not use it. It is used
"under the hood".

I agree with your comment, but I hope it's ok if used in this way. For
particular situations, 10-20 of such limits will be calculated, and
ratsimp can greatly improve performances.

Stefano




2009/8/25 Stavros Macrakis <macrakis at alum.mit.edu>:
> 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
>