The following code was run using sympy version 1.0, python version 3.4, 
Anaconda installation.


import sympy as spy
import sympy.abc as abc


N, k = spy.symbols('N, k', positive = True)
es = 1 - (1 - 1/(2*N))**k
e = 2*N*es
spy.pprint(e)
c0 = spy.limit(e, N, spy.oo)
spy.pprint(c0)
c1 = spy.limit(N*(e-c0), N, spy.oo)
spy.pprint(c1)
c2 = spy.limit((e-c0-c1/N)*(N*N), N, spy.oo)
spy.pprint(c2)
c2x = spy.limit(e*N*N-c0*N*N-c1*N, N, spy.oo)
spy.pprint(c2x)


It prints
 


    ⎛           k    ⎞
    ⎜  ⎛     1 ⎞     ⎟
2⋅N⋅⎜- ⎜1 - ───⎟  + 1⎟
    ⎝  ⎝    2⋅N⎠     ⎠
k
   2    
  k    k
- ── + ─
  4    4
-∞
 3    2     
k    k    k 
── - ── + ──
24   8    12


As you can see, the result for c2 is wrong, although it is able to 
calculate c2x correctly. 

Can someone please clarify what is going on?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/8dd538f6-5487-4059-bd8c-eb1a86753af8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to