Logarithmic Integral li(x) Calculator
Compute the logarithmic integral li(x) and the offset logarithmic integral Li(x). This special function approximates the prime-counting function and is evaluated via the exponential integral Ei.
Input
Compute the logarithmic integral li(x)=∫₀ˣ dt/ln t (principal value for x>1) and the offset Li(x)=li(x)−li(2). It approximates the prime-counting function π(x).
Enter a positive real number. x=1 is a singularity and cannot be computed.
Result
li(100)
30.1261415841
Offset Li(100)
29.080977804
ln x
4.605170186
Input x
100
Li(x)=li(x)−li(2) is commonly used as an approximation of the prime-counting function π(x).
Graph of li(x)
How it works
- The logarithmic integral is defined as li(x)=∫_0^x dt/ln t. Because the integrand diverges at t=1, for x>1 it is taken as the Cauchy principal value.
- This calculator evaluates li(x) through its relation to the exponential integral, li(x)=Ei(ln x). Ei is computed with a power series or asymptotic expansion for positive arguments and a continued fraction for negative arguments.
- The offset logarithmic integral Li(x)=li(x)−li(2) starts the integration at x=2, avoiding the singularity. The constant li(2) is approximately 1.04516378.
- The prime-counting function π(x), the number of primes up to x, is closely approximated by li(x), and Li(x) provides an even better approximation to π(x).
- The input x must satisfy x>0 and x≠1. At x=1 the integrand diverges and li tends to negative infinity.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Logarithmic Integral li(x) Calculator