You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> x = symbols('x')
>>> f = Function('f')
>>> limit(f(x)/exp(x), x, oo)
0
The problem appears to be in the mrv function: mrv(f(x), x) declares x to be the most rapidly varying subexpression of f(x). It should raise NotImplementedError instead, since there is no way to tell how rapidly f(x) varies.
Some known functions indeed satisfy the condition that log|f(x)| / \log|x| has finite limit as x-> infinity, and for them the answer is correct.
This sort of thing is responsible for #13750 and probably #14072.
The text was updated successfully, but these errors were encountered:
In terms of Gruntz thesis (Definition 5.1), all functions are assumed to be tractable by mrv.
One can't use limit( log|f(x)| / log|x|) to test this, since doing so will lead to infinite recursion.
Should we decorate all the functions with "tractable"? Or intractable_at with a list of points where it is not tractable? Most functions are tractable at finite points (i.e., don't have essential singularities). Many are intractable at infinity, and some require different rewrites to become tractable at different infinite points.
I suspect any attempt to repair this will result in many limits that were previously evaluated correctly (by luck) being not evaluated anymore.
My current idea is to use rewrite_as_tractable for this purpose. It should receive a hint indicating which variable tends to oo, and based on that, make a determination whether the function is tractable already (return None), or can be made tractable (return tractable form), or raise NotImplementedError. In particular, for undefined functions it should just raise NotImplementedError.
The problem appears to be in the
mrv
function:mrv(f(x), x)
declares x to be the most rapidly varying subexpression of f(x). It should raise NotImplementedError instead, since there is no way to tell how rapidly f(x) varies.Some known functions indeed satisfy the condition that log|f(x)| / \log|x| has finite limit as x-> infinity, and for them the answer is correct.
This sort of thing is responsible for #13750 and probably #14072.
The text was updated successfully, but these errors were encountered: