This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Er:Re: Er:Re: [Bug-gsl] discontinuity in dilog function
- From: Jim McElwaine <J dot N dot McElwaine at damtp dot cam dot ac dot uk>
- To: Gerard Jungman <jungman at lanl dot gov>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Tue, 21 Sep 2004 09:07:33 +0100
- Subject: Er:Re: Er:Re: [Bug-gsl] discontinuity in dilog function
- References: <16705.59385.635354.443824@yuki.amtp.cam.ac.uk><1095105715.12458.136.camel@bellerophon.lanl.gov><16711.14100.301839.247520@yuki.amtp.cam.ac.uk><1095451053.12458.228.camel@bellerophon.lanl.gov>
Hi Gerard,
Got the latest cvs and compiled it.
rw-r--r-- 1 jnm11 other 14984 Sep 13 21:05 gsl/specfunc/dilog.c
I've attached two figures.
Each contains dilog evaluated over |Re(z)|<2 |Im(z)|<2
Each figure has four sub figures showing contours of
abs(Li2), arg(Li2), Real(Li2), Imag(Li2)
The first figure (1.png) has -\pi<arg(z)<\pi
the second figure (2.png) calls dilog with pi<arg(z)<3*pi
You can clearly see the discontinuities
My only point about the branch point was that since the argument is
passed as re^{i\theta}, if the definition used is
\int log(z)/(1-z) so the branch point is at the origin
Then the function can be defined over the full Riemann surface using
\theta and no branch cut is necessary.
If you're interested I can give you the matlab file and interface for
generating the figures.
Jim
Gerard Jungman writes:
> On Tue, 2004-09-14 at 12:23, Jim McElwaine wrote:
> >
> > It is now appears to be fine for |q|<pi.
> > I've tested it for continuity and satisfying d/dz = log(1-z)/z
> >
> > It still discontinuous for |q|>pi. I imagine this is easy to fix.
>
> Hmmm. But I added tests for that case too, and it passes.
> I just added a couple more to be absolutely sure; they're
> in CVS. Can you check again and tell me what you are seeing?
>
>
> > I related problem is the definition that is used
> >
> > \int log(1-z)/z dz
> >
> > This has a branch point at z=1 but expressing z = re^{i\theta} is no
> > use for resolving this so a branch cut is necesary
>
> Agreed, Li_2(z) needs a branch cut, which the
> implementation puts in the usual place, [1,+infinity).
>
> > If it used the Abramowitz and Stegun definition of
> > \int log(z)/(1-z) dz then the integral would be well defined for all
> > \theta using z = re^{i\theta}
>
> Just to make sure we are not talking past each other,
> what I have implemented is Li_2(z), which is not the
> Spence function.
> Li_2(x) = \sum_1^\infty x^k / k^2
> Spence(x) = \sum_1^\infty (1-x)^k / k^2
>
> But Spence cannot avoid the branch cut. The branch
> point must be at x = 0, the reflection/translation
> of the branch point for Li_2. The usual place to
> put the branch cut for Spence is (-infinity,0],
> which is a reasonable place to put it and also
> happens to be the reflection/translation of the
> usual Li_2 branch cut. So it is fair to simply
> say
> Spence(z) = Li_2(1-z)
> for all complex z, i.e. the analytic properties
> of each side match exactly.
>
> It is true that the Riemann surface for Spence is
> topologically the same as that for ln(z), which makes
> that structure more familiar. But I don't think anything
> magical happens when going from Li_2 to Spence.
> Am I missing something?
>
> --
> Gerard Jungman <jungman@lanl.gov>
> Los Alamos National Laboratory
>
--
Dr. Jim McElwaine
H0.15, Department of Applied Maths and Theoretical Physics
Centre for Mathematical Sciences, Cambridge University
Wilberforce Road, Cambridge, CB3 0WA
email: jnm11@amtp.cam.ac.uk
http://www.damtp.cam.ac.uk/user/jnm11/
office +44 1223 337858
college +44 1223 339787
home +44 1223 710497