[R] logarithmic integrals in R?

Hans W. Borchers hwborchers at googlemail.com
Sat May 29 15:15:29 CEST 2010


Oliver Kullmann <O.Kullmann <at> swansea.ac.uk> writes:

> 
> Hello,
> 
> I couldn't find information on whether the logarithmic integrals
> 
> Li_m(x) = integral_0^x log(t)^(-m) dt
> 
> for x >= 0 are available in R?

I saw your request only this weekend.
The first logarithmic integral can be computed using the exponential
integral Ei(x) per

    li(x) = Ei(log(x))

and elliptic integrals are part of the 'gsl' package, so

    library('gsl')
    x <- seq(2, 10, by=0.5)
    y <- expint_Ei(log(x))
    y

See e.g. the Handbook of Mathematical Functions for how to reduce higher
logarithmic integrals.
Another possibility is to use the Web API of 'keisan', the calculation
library of Casio.

Regards
Hans Werner

> Best wishes
> 
> Oliver
> 
>



More information about the R-help mailing list