How to simplify -polylog(2, exp_polar(I*pi))/16 + pi**2/96 ?

37 views
Skip to first unread message

Sébastien Labbé

unread,
Dec 2, 2016, 4:25:47 AM12/2/16
to sympy
Can SymPy tell me that A = 1/64*pi**2 by simplifying the polylog in below example?

>>> from sympy.abc import n
>>> from sympy import summation, oo
>>> A = summation(1/((2*n+1)^2-4)^2, (n, 0, oo))
>>> A
-polylog(2, exp_polar(I*pi))/16 + pi**2/96
>>> A.simplify()
-polylog(2, exp_polar(I*pi))/16 + pi**2/96

because it seems doable:

sage: from sympy.abc import n
sage: from sympy import summation, oo
sage: A = summation(1/((2*n+1)^2-4)^2, (n, 0, oo))
sage: A._sage_()
1/64*pi^2

This came up in https://ask.sagemath.org/question/35839/sage-incorrectly-evaluates-series/

Sébastien

Isuru Fernando

unread,
Dec 2, 2016, 7:43:00 AM12/2/16
to sy...@googlegroups.com
This is a known bug, https://github.com/sympy/sympy/issues/8404

A._sage_() works because exp_polar(I*pi) is -1 in sage and is unevaluated in SymPy.


Isuru Fernando

--
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 sympy+unsubscribe@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
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/1f93f41c-ebf8-4402-990d-cc4f9ca22aa5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sébastien Labbé

unread,
Dec 2, 2016, 8:18:16 AM12/2/16
to sympy
Ok, thank you. I see:

>>> from sympy import *
>>> -polylog(2, exp_polar(I*pi))/16 + pi**2/96
-polylog(2, exp_polar(I*pi))/16 + pi**2/96
>>> exp_polar(I*pi)
exp_polar(I*pi)

Then should not this gives me pi**2/64 ?

>>> -polylog(2, -1)/16 + pi**2/96
pi**2/192

Isuru Fernando

unread,
Dec 2, 2016, 8:24:25 AM12/2/16
to sy...@googlegroups.com
It does give me the correct answer in the latest master, but I get the same incorrect answer in sympy-1.0. It was fixed here, https://github.com/sympy/sympy/pull/10799


Isuru Fernando

--
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 sympy+unsubscribe@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.

Sébastien Labbé

unread,
Dec 2, 2016, 8:56:27 AM12/2/16
to sympy
Indeed, I am using :

>>> import sympy
>>> sympy.__version__
'1.0'

Thank you,
Reply all
Reply to author
Forward
0 new messages