I would like to use Dilogarithm Li2(x) in one of my fitting procedures. However, there is no dilogarythm in the list of Igor Pro's special functions. In principle, dilogarithm can be expressed either directly via integration (Integrate1D) or via hypergeometric functions (hyperGPFQ) available in Igor Pro, but this is quite a time consuming calculation especially if this is required for a fitting procedure. Is there another way to express dilogarithm, providing a faster calculation in Igor Pro, which I did not think of?
I'd start by estimating the range of the function that you need in your fitting process. Next you can compute once, before starting the fit, the full range of the function sampled at equal intervals. Store the results in a wave, e.g., li2Wave. Then, in your fitting function use the li2Wave(x) to interpolate for the particular value of x. Alternatively you can try writing a user function for one of the rational approximations. Here again you create (only once) two waves containing the coefficients of the numerator and denominator respectively and use the built-in Poly() when computing the approximation.
I hope this helps,
A.G.
WaveMetrics, Inc.
April 2, 2013 at 03:58 pm - Permalink