最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Why can't SymPy calculate the Sum(1((k + 1) ** 4 + 1), (k,-oo,oo)) when it appears to converge? - Stack Overflo

programmeradmin5浏览0评论

I'm using Sympy for some numeric calculations, specifically for infinite summations. The following code returns 0:

import sympy as sp
from sympy.abc import k

sp.summation(1 / ((k + 1) ** 4 + 1), (k, -sp.oo, sp.oo))

However, all elements of this sum are positive. The docs say that if the sum is incalculable, it will be returned as-is, however that's not the case here. Makes me wonder if there are other cases when SymPy is wrong.

In which cases does SymPy not guarantee correctness of calculations?

Edit: This sum is calculable (can be calculated without special functions e.g. via the residual theorem, any modern LLM can guide you through the process); it converges to a positive number. Most likely, SymPy would not be able to handle it, but I expect it to at least admit that it cannot instead of returning a false answer.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论