# 对数积分函数

对数积分是对于实数 \( x > 1 \) 定义的特殊函数，取柯西主值

\[ \mathrm{li}(x) = \int_{0}^{x} \frac{dt}{\ln t}, \]

其中 \( 1/\ln t \) 在 \( t = 1 \) 处的奇异性，通过让左侧积分的上限与右侧积分的下限从两侧等距趋近1，并取两积分之和的极限来处理<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup><sup> • </sup><sup>[2](https://dlmf.nist.gov/6.2)</sup>。它是在三角函数与对数函数之后遇到的首批超越函数之一：\( \ln t \) 从1到 \( x \) 的积分有闭形式 \( x\ln x - x \)，但 \( 1/\ln t \) 的积分无法用初等函数表达，于是引入新函数 \( \mathrm{li}(x) \) 来命名它<sup>[3](https://jordanbell.info/LaTeX/historical/li/)</sup>。它在数学中的主要角色是作为素数计数函数 \( \pi(x) \)（即不超过 \( x \) 的素数个数）的标准近似<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | 对 \( x > 1 \)，\( \mathrm{li}(x) = \mathrm{PV}\!\int_0^x dt/\ln t \)，在 \( x = 1 \) 处有奇点；\( \mathrm{li}(0) = 0 \)，\( \mathrm{li}(1) = -\infty \)<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup><sup> • </sup><sup>[2](https://dlmf.nist.gov/6.2)</sup> |
| 与 Ei 的关系 | \( \mathrm{li}(x) = \mathrm{Ei}(\ln x) \)，其中 \( \mathrm{Ei} \) 是指数积分；导数 \( d\,\mathrm{li}(z)/dz = 1/\ln z \)<sup>[2](https://dlmf.nist.gov/6.2)</sup><sup> • </sup><sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup> |
| 偏移形式 | 素数定理使用 \( \mathrm{Li}(x) = \int_2^x du/\ln u = \mathrm{li}(x) - \mathrm{li}(2) \)，使得 \( \mathrm{Li}(2) = 0 \)<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup> |
| 索尔德纳常数 | \( \mu = 1.4513692348\ldots \) 是满足 \( \mathrm{li}(\mu) = 0 \) 的唯一正数；\( \mathrm{li}(2) = 1.0451637801174\ldots \)<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup> |
| 素数定理 | \( \pi(x) \sim \mathrm{Li}(x) \)，由阿达马与德·拉·瓦莱·普桑于1896年独立证明<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup> |
| 渐近级数 | \( \mathrm{Li}(n) \sim \sum_{k=0}^{\infty} k!\,n/(\ln n)^{k+1} = n/\ln n + n/(\ln n)^2 + 2n/(\ln n)^3 + \cdots \)<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup> |
| 符号变化 | \( \pi(x) - \mathrm{li}(x) \) 无穷多次变号（李特尔伍德，1914年）；严格工作证明区间 \( [1.39792101 \times 10^{316},\ 1.39847603 \times 10^{316}] \) 中存在某个 \( x \) 满足 \( \pi(x) > \mathrm{li}(x) \)，但未确定首次交叉点<sup>[5](https://mathworld.wolfram.com/SkewesNumber.html)</sup><sup> • </sup><sup>[12](https://eprints.maths.manchester.ac.uk/106/)</sup> |

## 定义与基本性质

被积函数 \( 1/\ln t \) 在 \( t = 1 \) 处趋于无穷，因此对 \( x > 1 \)，积分理解为柯西主值，即当 \( \epsilon \to 0 \) 时在 \( [0, 1-\epsilon] \) 和 \( [1+\epsilon, x] \) 上的两个积分之和的极限<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。特殊值包括 \( \mathrm{li}(0) = 0 \)、\( \mathrm{li}(1) = -\infty \) 以及 \( \mathrm{li}(2) = 1.0451637801174\ldots \)<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。函数有唯一的正零点，

\[ \mu = 1.4513692348\ldots, \]

称为索尔德纳常数（Soldner's constant），因此对 \( x > \mu \)，函数可写成 \( \mathrm{li}(x) = \int_\mu^x dt/\ln t \)<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。

在计算意义上，对数积分并非独立函数：它是指数积分在其自变量对数处的取值，

\[ \mathrm{li}(x) = \mathrm{Ei}(\ln x), \]

其中 \( \mathrm{Ei}(x) = \int_{-\infty}^{x} e^t/t \, dt \) 对 \( x > 0 \) 取主值<sup>[2](https://dlmf.nist.gov/6.2)</sup><sup> • </sup><sup>[6](https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.expi.html)</sup>。其导数为 \( 1/\ln z \)，定义可延拓到复平面<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。尼尔森（Nielsen）证明、斯里尼瓦萨·拉马努金（Srinivasa Ramanujan）独立发现了收敛展开

\[ \mathrm{li}(x) = \gamma + \ln\ln x + \sum_{k=1}^{\infty} \frac{(\ln x)^k}{k!\,k}, \]

其中 \( \gamma \) 为欧拉–马歇罗尼常数<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。

## 两种约定：li 与 Li

两种偏移约定并存。“美国”定义是从0开始的主值积分，在 Wolfram 语言中实现为 `LogIntegral[x]`<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。素数定理中出现的形式，有时称为“欧洲”定义，例如埃德蒙·兰道（Edmund Landau）使用，其偏移使得函数在2处为零：

\[ \mathrm{Li}(x) = \int_2^x \frac{du}{\ln u} = \mathrm{li}(x) - \mathrm{li}(2). \]

两者相差常数 \( \mathrm{li}(2) \approx 1.045 \)，在素数计数所用的大自变量处可忽略<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。记号 \( \mathrm{Li}_n(z) \) 也令人混淆地用于多重对数<sup>[1](https://mathworld.wolfram.com/LogarithmicIntegral.html)</sup>。

## 在素数定理中的作用

素数计数函数 \( \pi(x) \) 计数不超过 \( x \) 的素数<sup>[7](https://dlmf.nist.gov/27.2)</sup>。1792年，15岁的卡尔·弗里德里希·高斯（Carl Friedrich Gauss）提出 \( \pi(n) \sim n/\ln n \)，后来将估计精化为 \( \pi(n) \sim \mathrm{Li}(n) \)<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup>。高斯未发表此工作；他首次在1849年致天文学家约翰·弗朗茨·恩克（Johann Franz Encke）的信中描述，报告早在1792或1793年他就猜想界 \( n \) 以下的素数个数为 \( \int dn/\log n \)，该信于他去世后的1863年发表<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup><sup> • </sup><sup>[8](https://old.maa.org/node/1732760)</sup>。阿德里安-马里·勒让德（Adrien-Marie Legendre）不知高斯的私下工作，发表了自己的猜测，先于1798年，后于1808年以 \( \pi(n) \sim n/(\ln n + B) \) 形式给出，其中 \( B = -1.08366 \)，此值今称勒让德常数；该公式仅首项正确<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup>。

初等分部积分表明 \( \mathrm{Li}(x) \) 渐近等于 \( x/\ln x \)，因此高斯与勒让德的猜想都等价于今称素数定理的命题 \( \pi(x) \sim \mathrm{Li}(x) \)<sup>[9](https://calteches.library.caltech.edu/3832/)</sup>。该定理于1896年由雅克·阿达马（Jacques Hadamard）与夏尔-让·德·拉·瓦莱·普桑（Charles-Jean de la Vallée Poussin）独立首次证明<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup><sup> • </sup><sup>[7](https://dlmf.nist.gov/27.2)</sup>。

**实际精度。** 对数积分是明显优于 \( x/\ln x \) 的估计。在高斯寄给恩克的表中，基于至300万的素数计数，\( \mathrm{Li}(x) \) 的相对误差在每个列表点介于0.10%与0.16%之间；例如在 \( x = 3{,}000{,}000 \) 处真值为216,745，而 \( \mathrm{Li}(x) \) 给出216,970.6<sup>[9](https://calteches.library.caltech.edu/3832/)</sup>。2013年的一项分析从结构上解释这一优势：\( \mathrm{li}(x) \) 来自对相邻素数平方之间区间的筛法的连续近似，而 \( x/\ln x \) 对应于在已完成区域反复筛，这就是它低估 \( \pi(x) \) 的原因<sup>[10](https://arxiv.org/abs/1311.1093)</sup>。

在无穷远处的渐近展开，

\[ \mathrm{Li}(n) \sim \sum_{k=0}^{\infty} \frac{k!\,n}{(\ln n)^{k+1}}, \]

给出 \( n/\ln n + n/(\ln n)^2 + 2n/(\ln n)^3 + \cdots \)，取前三项已被证明比单用 \( n/\ln n \) 更好<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup>。

## π(x) − li(x) 的符号

对所有检查过的小 \( n \)，\( \pi(n) < \mathrm{Li}(n) \)，包括高斯与波恩哈德·黎曼（Bernhard Riemann）在内的著名数学家猜想不等式严格成立。约翰·伊登索尔·李特尔伍德（John Edensor Littlewood）于1914年反驳此说，证明 \( \pi(x) - \mathrm{li}(x) \) 无穷多次变号<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup>。斯坦利·斯丘斯（Stanley Skewes）于1933年证明，在黎曼假设下首次交叉发生在 \( 10^{10^{10^{34}}} \) 之前，此界后由贝斯（Bays）与哈德森（Hudson）于2000年降至 \( 1.39822 \times 10^{316} \) 以下；帕特里克·德米歇尔（Patrick Demichel）提出数值位置约在 \( 1.397162914 \times 10^{316} \) 附近<sup>[5](https://mathworld.wolfram.com/SkewesNumber.html)</sup><sup> • </sup><sup>[12](https://eprints.maths.manchester.ac.uk/106/)</sup>。严格下界亦已知：罗瑟（Rosser）与舍恩菲尔德（Schoenfeld）于1962年证明 \( 10^8 \) 以下无交叉，科特尼克（Kotnik）于2008年改进至 \( 10^{14} \)<sup>[5](https://mathworld.wolfram.com/SkewesNumber.html)</sup>。更早，帕夫努季·切比雪夫（Pafnuty Chebyshev）对大 \( n \) 证明 \( 0.89\,\mathrm{Li}(n) < \pi(n) < 1.11\,\mathrm{Li}(n) \)<sup>[4](https://mathworld.wolfram.com/PrimeNumberTheorem.html)</sup>。

## 计算

因为 \( \mathrm{li}(x) = \mathrm{Ei}(\ln x) \)，数值库通过指数积分求值。SciPy 提供 `scipy.special.expi`，实现 \( \mathrm{Ei} \)，对正自变量取柯西主值并解析延拓至复平面<sup>[6](https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.expi.html)</sup>。一份特殊函数数值求值综述将实自变量对数积分列于 IMSL、SLATEC 和 Scientific Desk 等综合库的可用例程中<sup>[11](https://math.nist.gov/nesf/Sect4-3/Sect4-3.html)</sup>。

## References

1. [Weisstein, Eric W. "Logarithmic Integral." MathWorld](https://mathworld.wolfram.com/LogarithmicIntegral.html)
2. [DLMF §6.2, Definitions and Interrelations, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/6.2)
3. [Bell, Jordan (2016). The logarithmic integral](https://jordanbell.info/LaTeX/historical/li/)
4. [Weisstein, Eric W. "Prime Number Theorem." MathWorld](https://mathworld.wolfram.com/PrimeNumberTheorem.html)
5. [Weisstein, Eric W. "Skewes Number." MathWorld](https://mathworld.wolfram.com/SkewesNumber.html)
6. [scipy.special.expi, SciPy v1.18.0 Manual](https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.expi.html)
7. [DLMF §27.2, Functions, Multiplicative Number Theory, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/27.2)
8. [The Origin of the Prime Number Theorem: A Mini-Primary Source Project, Mathematical Association of America](https://old.maa.org/node/1732760)
9. [A Centennial History of the Prime Number Theorem, Engineering & Science (Caltech), No. 4, 1996](https://calteches.library.caltech.edu/3832/)
10. [Tunstrøm, Kolbjørn (2013). The origin of the logarithmic integral in the prime number theorem. arXiv:1311.1093](https://arxiv.org/abs/1311.1093)
11. [Lozier, D. W. and Olver, F. W. J. Numerical Evaluation of Special Functions, §4.3](https://math.nist.gov/nesf/Sect4-3/Sect4-3.html)
12. [A new bound for the smallest x with \pi(x) > \li(x) - MIMS EPrints](https://eprints.maths.manchester.ac.uk/106/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Number theory › Analytic number theory › Zeta and L-functions › Explicit formulas and prime counting

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/logarithmic-integral-function

English original: https://www.edgepedia.org/logarithmic-integral-function
