Using New SymPy Assumptions

I'm having some problems with current SymPy assumptions. Check out this thread. One of the hints said to use the adoption module (link here ).

I tried to do the following calculation: $ \ lim_ {x \ to \ infty} \ frac {\ ln {x}} {x ^ k} $. I want to evaluate this limit for $ k> 0 $.

So, I tried this:

with assuming(k>0): limit((log(x))/(x**k),x,oo) 

I also tried this:

 eval(limit((log(x))/(x**k),x,oo),k>0) 

But regardless, I get this error:

 NotImplementedError: Result depends on the sign of -sign(k) 

When

 with assume(k>0): limit((log(x))/(x**k),x,oo) 

I get this error:

 TypeError: 'module' object is not callable 

Any ideas what I'm doing wrong?

+1
source share
1 answer

It seems to work. The first answer in the topic you pointed out says that "the SymPy assumptions system is now a mess." I'm not sure if this has changed since then.

 k = Symbol('k', positive=True) print limit((log(x))/(x**k),x,oo) 
+1
source

All Articles