Mathwords logoMathwords

Logarithmic Integral — Definition, Formula & Examples

The logarithmic integral, denoted li(x)\operatorname{li}(x), is a special function defined as the integral of 1lnt\frac{1}{\ln t} from 0 to xx. It arises naturally in calculus and is famous for approximating the number of primes up to a given value.

For real x>0x > 0, x1x \neq 1, the logarithmic integral is defined as li(x)=0xdtlnt\operatorname{li}(x) = \int_0^x \frac{dt}{\ln t}, where the singularity at t=1t = 1 is handled as a Cauchy principal value. A common variant, the offset logarithmic integral, is Li(x)=2xdtlnt\operatorname{Li}(x) = \int_2^x \frac{dt}{\ln t}, which avoids the singularity entirely.

Key Formula

li(x)=0xdtlnt,Li(x)=2xdtlnt\operatorname{li}(x) = \int_0^x \frac{dt}{\ln t}, \qquad \operatorname{Li}(x) = \int_2^x \frac{dt}{\ln t}
Where:
  • xx = A positive real number (with x ≠ 1 for li)
  • tt = Variable of integration
  • lnt\ln t = Natural logarithm of t

How It Works

The integrand 1lnt\frac{1}{\ln t} has no elementary antiderivative, so li(x)\operatorname{li}(x) cannot be expressed in terms of standard functions. You evaluate it numerically or via series expansions. The offset form Li(x)=li(x)li(2)\operatorname{Li}(x) = \operatorname{li}(x) - \operatorname{li}(2) is preferred in number theory because it starts counting from 2, matching the smallest prime. The prime number theorem states that π(x)Li(x)\pi(x) \sim \operatorname{Li}(x) as xx \to \infty, where π(x)\pi(x) counts the primes up to xx.

Worked Example

Problem: Estimate the offset logarithmic integral Li(10) and compare it to the actual count of primes up to 10.
Set up the integral: Write the offset logarithmic integral with upper limit 10.
Li(10)=210dtlnt\operatorname{Li}(10) = \int_2^{10} \frac{dt}{\ln t}
Evaluate numerically: Since there is no closed-form antiderivative, use numerical integration (e.g., Simpson's rule or a calculator). The result is approximately:
Li(10)5.12\operatorname{Li}(10) \approx 5.12
Compare to the prime count: The primes up to 10 are 2, 3, 5, and 7, so π(10) = 4. The approximation Li(10) ≈ 5.12 is reasonably close, and the accuracy improves dramatically for larger x.
π(10)=4\pi(10) = 4
Answer: Li(10)5.12\operatorname{Li}(10) \approx 5.12, which approximates π(10)=4\pi(10) = 4. The estimate becomes increasingly accurate for large xx.

Why It Matters

The logarithmic integral is central to analytic number theory: the prime number theorem asserts that Li(x)\operatorname{Li}(x) is the best simple approximation to the prime counting function π(x)\pi(x). It also appears in physics and engineering contexts involving exponential-integral-type functions.

Common Mistakes

Mistake: Confusing li(x) with Li(x).
Correction: The notation li(x) integrates from 0, while Li(x) integrates from 2. Most number theory results use Li(x), the offset version, which differs from li(x) by the constant li(2) ≈ 1.045.