Post Reply 
Spence function
01-14-2021, 01:55 PM (This post was last modified: 01-14-2021 03:10 PM by Albert Chan.)
Post: #10
RE: Spence function
(01-12-2021 11:24 PM)Albert Chan Wrote:  I was playing around, and tried integrating using Li2(2) as base.
0 to 2+3i → 0 to 2, then 2 to 2+3i

Turns out, we have to use the conjugate of the base.
Anyone knows how and when we apply the conjugate ?

By experiments, I figured out how and when to apply conjugate, but don't know why ...
Consider only imaginery part. If Spence integral limits has 1 positive, but the other not, apply conjugate.

>>> from mpmath import *
>>> mp.pretty = True
>>> Li2 = lambda x: polylog(2, x)
>>> F = lambda a, b: quad(lambda x: -ln(1-x)/x, [a, b])

>>> Li2(2+3j)
(-0.28098805537806 + 3.01725120636941j)
>>> F(0, 2+3j)
(-0.28098805537806 + 3.01725120636941j)

>>> conj(Li2(2)) + F(2, 2+3j)                       # 2 is real, no positive imaginery part
(-0.280988055378061 + 3.01725120636941j)

Say, we have Li2(1-1j), how to correct it to Li2(2+3j) ?
We interpolate (1-1j), (2+3j) at the real axis.

x = x1 - y1*(x1-x2)/(y1-y2) = 1 - (-1)*(1-2)/(-1-3) = 1.25

>>> a, b, x = 1-j, 2+3j, 1.25
>>> conj(Li2(a) + F(a,x)) + F(x,b)                # == conj(Li2(x)) + F(x,b)
(-0.28098805537806 + 3.01725120636941j)

---

Without a close reference, we could use these identities to convert argument.

#1: Li2(z) + Li2(z/(z-1)) = -ln(1-z)^2/2
#2: Li2(z) + Li2(1-z) =  pi^2/6 - ln(z) * ln(1-z)
#3: Li2(z) + Li2(1/z) = -pi^2/6 - ln(-z)^2/2


We have to be careful with #3 to get Li2(z), if Li2(z) is real, but Li2(1/z) is complex.
This may be why https://mathworld.wolfram.com/Dilogarithm.html excluded it.

>>> z = 0.95
>>> Li2(z) , -pi**2/6 - ln(-z)**2/2 - Li2(1/z)       # bad
(1.44063379697004, (1.44063379697004 + 0.322285273652695j))
>>> z = 1/0.95
>>> Li2(z) , -pi**2/6 - ln(-z)**2/2 - Li2(1/z)       # ok
((1.84791883570185 - 0.161142636826347j), (1.84791883570185 - 0.161142636826347j))

For b = 2+3j, it is ok to apply. 1/b is tiny enough we can sum, instead of integrate.

>>> x = 1/b
>>> s = sum(x**k/(k*k) for k in range(24,0,-1)) # Li2(x)
>>> -pi**2/6 - ln(-b)**2/2 - s
(-0.280988055378061 + 3.01725120636941j)      # Li2(b)

The other 2 identities seems safe ...

#1: Li2(2+3j) = -ln(-1-3j)^2/2 - Li2(1.1-.3j)
#2: Li2(1.1-.3j) = pi^2/6 - ln(1.1-.3j)*ln(-.1+.3j) - Li2(-.1+.3j)

>>> x = -.1 + .3j
>>> s = sum(x**k/(k*k) for k in range(24,0,-1)) # Li2(x)
>>> s = pi**2/6 - ln(1.1-.3j)*ln(-.1+.3j) - s        # Li2(1-x)
>>> -ln(-1-3j)**2/2 - s                                      # Li2(b)
(-0.28098805537806 + 3.01725120636941j)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Spence function - Albert Chan - 01-11-2021, 06:13 PM
RE: Spence function - Albert Chan - 01-11-2021, 06:16 PM
RE: Spence function - Albert Chan - 01-12-2021, 02:17 PM
RE: Spence function - Albert Chan - 01-12-2021, 05:41 PM
RE: Spence function - Albert Chan - 01-13-2021, 05:47 PM
RE: Spence function - C.Ret - 01-12-2021, 05:28 PM
RE: Spence function - Albert Chan - 01-12-2021, 07:49 PM
RE: Spence function - C.Ret - 01-12-2021, 08:24 PM
RE: Spence function - Albert Chan - 01-12-2021, 11:24 PM
RE: Spence function - Albert Chan - 01-14-2021 01:55 PM
RE: Spence function - Albert Chan - 01-14-2021, 03:30 PM
RE: Spence function - Albert Chan - 01-31-2021, 03:24 PM
RE: Spence function - Albert Chan - 04-04-2021, 10:57 PM
RE: Spence function - Albert Chan - 04-05-2021, 03:24 AM
RE: Spence function - Albert Chan - 04-05-2021, 04:58 PM
RE: Spence function - Albert Chan - 04-11-2021, 03:22 AM
RE: Spence function - Albert Chan - 05-04-2021, 03:17 PM
RE: Spence function - Albert Chan - 03-20-2022, 04:33 PM



User(s) browsing this thread: 1 Guest(s)