Comment #8 on issue 2130 by [email protected]: wrong limit
http://code.google.com/p/sympy/issues/detail?id=2130
vks: sum is now summation
>>> limit(summation(1/k, (k, 1, n))-log(n), n, oo)
-oo
re #6: the NotImplementedError is raised for a bare Sum, but a separate
issue is how to properly handle something like the above since you
basically have oo - oo which should be NaN (according to sympy). Can
someone who understands sizes of infinity comment on whether that summation
should be considered a smaller infinity. According to the sampling below it
looks like it approaches 0:
h[3] >>> for n in range(10,1000,100):
... print n,(summation(1/k, (k, 1, i))-log(i)).subs(i, n).n()
...
10 0.626383160974208
110 0.581754232451561
210 0.579594727642023
310 0.578827700975970
410 0.578434681360285
510 0.578195736668925
610 0.578035113078606
710 0.577919724942563
810 0.577832821839011
910 0.577765014819027
returning NaN is now implemented for Pow, tan, cot, and exp (when changing
E to 0, a valid substitution -- but maybe in this case the function
shouldn't be treated like a power?)
see [ https://github.com/sympy/sympy/pull/61 ] for review of code.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.