# 符号积分

符号积分以闭形式计算数学表达式的原函数，给出精确公式，而非近似数值。这是计算机代数系统的核心能力：给定一个初等函数 f(x)，目标是找到一个初等函数 g(x) 使得 g' = f，或者证明这样的 g 不存在——这一任务被称为有限项积分。<sup>[1](https://link.springer.com/chapter/10.1007/978-0-585-33247-5_12)</sup> 这与数值求积有本质区别：数值求积用数值近似定积分，而不产生精确公式。<sup>[1](https://link.springer.com/chapter/10.1007/978-0-585-33247-5_12)</sup> 里斯算法将这一符号任务转化为判定过程：对于指定函数类中的被积函数，它判定该函数类中是否存在原函数，若存在则返回之，否则构造不存在性的证明。<sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 输出 | 闭形式原函数，或所选函数类中不存在原函数的证明，而非数值<sup>[1](https://link.springer.com/chapter/10.1007/978-0-585-33247-5_12)</sup><sup> • </sup><sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup> |
| 中心定理 | 刘维尔定理将任何初等积分的形式限制为导数加上对数导数的常数倍之和<sup>[3](https://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf)</sup> |
| 核心流程 | 埃尔米特约化，然后对对数项进行结式计算，再对指数扩张求解里斯微分方程<sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup> |
| 基准规模 | 2024 年对九个系统测试了 106,812 个积分；Mathematica 解出 97.367%（104,000 个），Rubi 93.136%（99,480 个），SymPy 42.166%<sup>[4](http://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2022/index.pdf)</sup> |
| 基于规则的替代方案 | Rubi 应用超过 6,700 条规则，并在逾 72,000 个已知最优原函数的问题上接受测试<sup>[5](https://rulebasedintegration.org/)</sup> |
| 不可判定领域 | 当表达式中含有 ln 2、π、exp(x) 和 sin(x) 时，判定 \( E < 0 \) 是不可判定的；加入 \( |x| \) 后，判定 \( E = 0 \) 也变得不可判定<sup>[6](https://arxiv.org/html/2501.16457v2)</sup> |
| 常数问题 | 对于判定由指数和对数构成的常数是否为零，尚无通用算法；甚至不知道 e + π 是否为有理数<sup>[7](https://stacks.stanford.edu/file/druid:pv332kh5800/pv332kh5800.pdf)</sup> |

## 工作原理

该理论建立在微分域之上——微分域是配备了一个模仿求导的导子的域，使得初等函数可以用代数方式处理。刘维尔在 1833 年至 1835 年间研究了不定积分能否用代数、对数、指数、三角函数或反三角函数写成有限表达式，据记载，以他命名的定理于 1834 年得到证明。<sup>[8](https://hkumath.hku.hk/~mks/IntegrationFiniteTerms_1996.pdf)</sup> 在现代形式中，若 f 有初等积分，则存在域中的 v、常数 c₁, …, c_k 以及函数 u₁, …, u_k，使得

\[ f = v' + \sum_{i=1}^{k} c_{i} \, \frac{u_{i}'}{u_{i}}. \]

这就是刘维尔原理：积分中唯一需要的新函数是对数扩张的常数倍。<sup>[3](https://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf)</sup><sup> • </sup><sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup> 该原理将积分转化为有限代数问题：先解出看似有理的部分 v，再确定哪些常数 c_i 可以出现。由于每一步都归结为域内的多项式运算和方程求解，对于由有理运算、指数和对数构成的初等函数，该问题是可判定的。<sup>[3](https://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf)</sup> 该准则还给出不可能性证明：应用它可表明高斯钟形曲线积分和对数积分都不是初等函数。<sup>[9](https://math.stanford.edu/~conrad/papers/elemint.pdf)</sup>

## 具体做法

计算机代数系统沿着扩张塔 K(x, θ₁, …, θ_n) 递归工作，一次处理一层。<sup>[10](http://wwwmayr.in.tum.de/konferenzen/Jass07/courses/1/Wuerfl/wuerfl_paper.pdf)</sup> 对于有理函数，埃尔米特约化首先完全在 K(x) 内计算积分的有理部分，迭代一个用扩展欧几里得算法求解的约化步骤，且无需将分母分解为线性或不可约因子。<sup>[11](https://gyires.inf.unideb.hu/KMITT/a51/ch06s04.html)</sup> 剩余部分是对数项之和。罗思坦–特拉格方法用结式刻画对数部分：a(θ)/b(θ) 的积分是初等的，当且仅当

\[ R(z) = \operatorname{res}_{\theta}\left(a(\theta) - z \cdot b(\theta)',\; b(\theta)\right) \]

的所有根都是常数。<sup>[10](http://wwwmayr.in.tum.de/konferenzen/Jass07/courses/1/Wuerfl/wuerfl_paper.pdf)</sup> 拉扎尔–里奥博–特拉格改进利用子结式 PRS 算法在基域上计算同样的量，避免了对代数数进行计算。<sup>[3](https://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf)</sup><sup> • </sup><sup>[11](https://gyires.inf.unideb.hu/KMITT/a51/ch06s04.html)</sup> 同样的模式在每一扩张层反复出现。在指数扩张中，多项式部分归结为里斯微分方程，其中 f、g 已知，y 在前一域中求解；若任何此类方程在域中无解，则积分不是初等的。<sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup><sup> • </sup><sup>[11](https://gyires.inf.unideb.hu/KMITT/a51/ch06s04.html)</sup>

## 起源

有限项积分被确立为一门数学学科。<sup>[12](https://www.ams.org/journals/tran/1969-139-00/S0002-9947-1969-0237477-8/S0002-9947-1969-0237477-8.pdf)</sup> 算法时代始于罗伯特·H·里斯（Robert H. Risch），其论文《有限项积分问题》（*The problem of integration in finite terms*）于 1969 年发表在《美国数学会汇刊》（Transactions of the American Mathematical Society）上。<sup>[13](https://doi.org/10.1090/s0002-9947-1969-0237477-8)</sup> 初等不定积分存在判定算法。<sup>[14](https://www.cs.ru.nl/~freek/courses/mfocs-2012/risch/S0002-9904-1970-12454-5.pdf)</sup>

## 变体

**并行里斯算法（Risch–Norman）。** 该变体直接一步处理域扩张塔，而非递归处理，比递归算法更简单、更高效，并能处理正切扩张，因此三角函数无需转换为复指数形式。<sup>[15](https://dl.acm.org/doi/pdf/10.1145/74540.74567)</sup> 将其转化为完整的判定过程仍是一个未决问题，因此在 Maple 中它作为递归里斯算法之前的启发式方法使用。<sup>[15](https://dl.acm.org/doi/pdf/10.1145/74540.74567)</sup>

**超指数与超几何积分。** 指数扩张的积分归结为上述里斯微分方程；并行变体假设解的结构，更容易处理高次分母和特殊函数。<sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup><sup> • </sup><sup>[16](https://scml.risc.jku.at/conference-2026/presentations/scml2026.43.england.pdf)</sup>

**基于规则的积分。** Rubi 由阿尔伯特·里奇（Albert Rich）、帕特里克·沙伊贝（Patrick Scheibe）和纳赛尔·阿巴西（Nasser Abbasi）于 2018 年在《开源软件杂志》（The Journal of Open Source Software）上描述，它用一棵包含超过 6,700 条规则、按被积函数形式选择规则的决策树取代算法搜索。<sup>[17](https://doi.org/10.21105/joss.01073)</sup><sup> • </sup><sup>[5](https://rulebasedintegration.org/)</sup>

## 应用

**实现。** SymPy 在 `sympy/integrals/risch.py` 中实现了里斯算法的超越情形，里斯微分方程求解器位于 `rde.py`，参数问题位于 `prde.py`，使用表示扩张塔的 `DifferentialExtension` 对象；它包括埃尔米特约化（麦克的线性版本）和对数部分的拉扎尔–里奥博–罗思坦–特拉格结式约化，但无法积分代数扩张。<sup>[18](https://github.com/sympy/sympy/blob/master/sympy/integrals/risch.py)</sup> FriCAS、Maxima、Maple 和 Mathematica 也实现了里斯式积分，该过程在 30 多年间反复改进，并存在于大多数主流系统中。<sup>[3](https://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf)</sup>

**基准性能。** 独立的 12000.org 测试于 2022 年对系统在约 85,865 个积分上进行评分：Mathematica 13.1 解出 97.999%，Rubi 4.16.1 为 94.208%，Maple 为 84.582%，FriCAS 为 79.355%，Giac 为 58.609%，Maxima 为 57.048%，Mupad 为 56.256%，SymPy 为 42.09%。<sup>[4](http://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2022/index.pdf)</sup> Rubi 的代码库报告称，在逾 7 万个具有最优原函数的被积函数套件上，它优于 Maple 和 Mathematica，并能展示每一步所用的确切规则。<sup>[19](https://github.com/RuleBasedIntegration/Rubi)</sup>

**定积分。** 对于定积分，没有可与里斯过程相媲美的通用算法；开发者依赖模式匹配启发式方法和特殊函数，未决问题包括求和的拆分或合并、在积分路径上搜索奇点、发出条件结果以及评估收敛性。<sup>[20](https://dl.acm.org/doi/10.1145/2016567.2016569)</sup> 一种方法将被积函数转换为梅耶尔 G 函数表示，应用梅耶尔 G 函数乘积定积分的已知公式，并在可能时转换回标准函数。<sup>[2](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)</sup>

## 局限与替代方案

**不可判定性与常数问题。** 理查森定理表明，对于含有 ln 2、π、exp(x) 和 sin(x) 的表达式，判定 \( E < 0 \) 是否成立是不可判定的；加入 \( |x| \) 后，判定 \( E = 0 \) 是否成立也变得不可判定。<sup>[6](https://arxiv.org/html/2501.16457v2)</sup> 另外，对于判定涉及指数和对数的常数是否为零，尚无通用算法；甚至不知道 \( e + \pi \) 是否为有理数——这一空白影响了里斯算法的假设。<sup>[7](https://stacks.stanford.edu/file/druid:pv332kh5800/pv332kh5800.pdf)</sup>

**非初等积分。** 判定过程仅覆盖初等原函数。SIN 早已确定 \( e^{x^{2}} \) 的积分不能用闭形式表示，<sup>[7](https://stacks.stanford.edu/file/druid:pv332kh5800/pv332kh5800.pdf)</sup> 而刘维尔准则对高斯钟形曲线积分和对数积分证明了同样的事情。<sup>[9](https://math.stanford.edu/~conrad/papers/elemint.pdf)</sup> 此类积分转而用数值求积处理，后者产生面积函数而非精确公式。<sup>[1](https://link.springer.com/chapter/10.1007/978-0-585-33247-5_12)</sup>

**启发式与算法式积分器。** 由于完整的里斯实现并不完备，生产系统混合多个阶段：先进行基于模式的重写，然后使用类特定方法，最后使用启发式分部积分和里斯算法等通用方法。<sup>[7](https://stacks.stanford.edu/file/druid:pv332kh5800/pv332kh5800.pdf)</sup>

**2023 年以来的机器学习。** 序列到序列模型被训练为直接输出原函数，但此类模型尽管测试准确率高，泛化能力却很差，因为它们必须机械地学习部分分式分解等运算；AlphaIntegrator（2024）则改用变换器模型在逐步积分证明上进行动作搜索。<sup>[21](https://arxiv.org/html/2410.02666)</sup> 为支持这项工作，巴凯（Barket）、英格兰（England）和格哈德（Gerhard）于 2023 年发表了可积表达式生成器<sup>[22](https://doi.org/10.48550/arxiv.2306.15572)</sup>，并于 2024 年发表了刘维尔生成器。<sup>[23](https://doi.org/10.48550/arxiv.2406.11631)</sup>

## References

1. [The Risch Integration Algorithm (Geddes, Czapor, Labahn, Algorithms for Computer Algebra, 1992)](https://link.springer.com/chapter/10.1007/978-0-585-33247-5_12)
2. [Symbolic Integration survey (Keith Geddes, Waterloo course notes)](https://cs.uwaterloo.ca/~kogeddes/papers/Integration/IntSurvey1.html)
3. [Symbolic Integration Tutorial (Bronstein, ISSAC 1998)](https://www-sop.inria.fr/cafe/Manuel.Bronstein/publications/issac98.pdf)
4. [Computer Algebra Independent Integration Tests, Summer 2022 report](http://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2022/index.pdf)
5. [Welcome to Rubi, A Rule-based Integrator](https://rulebasedintegration.org/)
6. [Symbolic Mathematical Computation 1965–1975: The View from a Half-Century Perspective](https://arxiv.org/html/2501.16457v2)
7. [Symbolic integration lecture notes (Stanford)](https://stacks.stanford.edu/file/druid:pv332kh5800/pv332kh5800.pdf)
8. [Integration in Finite Terms (HKU lecture notes, 1996)](https://hkumath.hku.hk/~mks/IntegrationFiniteTerms_1996.pdf)
9. [Elementary integration and Liouville's criterion (Keith Conrad)](https://math.stanford.edu/~conrad/papers/elemint.pdf)
10. [Basic Concepts of Differential Algebra (Würfl, JASS 2007)](http://wwwmayr.in.tum.de/konferenzen/Jass07/courses/1/Wuerfl/wuerfl_paper.pdf)
11. [Symbolic integration (textbook chapter, University of Debrecen)](https://gyires.inf.unideb.hu/KMITT/a51/ch06s04.html)
12. [The Problem of Integration in Finite Terms (Risch, 1969, Transactions of the AMS)](https://www.ams.org/journals/tran/1969-139-00/S0002-9947-1969-0237477-8/S0002-9947-1969-0237477-8.pdf)
13. [Robert H. Risch (1969). The problem of integration in finite terms. Transactions of the American Mathematical Society.](https://doi.org/10.1090/s0002-9947-1969-0237477-8)
14. [The Solution of the Problem of Integration in Finite Terms (Risch, 1970, Bulletin of the AMS)](https://www.cs.ru.nl/~freek/courses/mfocs-2012/risch/S0002-9904-1970-12454-5.pdf)
15. [On the Risch-Norman Integration Method and Its Implementation in MAPLE](https://dl.acm.org/doi/pdf/10.1145/74540.74567)
16. [Machine Learning Symbolic Integration Algorithm Selection (SCML 2026)](https://scml.risc.jku.at/conference-2026/presentations/scml2026.43.england.pdf)
17. [Albert Rich, Patrick Scheibe, Nasser Abbasi (2018). Rule-based integration: An extensive system of symbolic integration rules. The Journal of Open Source Software.](https://doi.org/10.21105/joss.01073)
18. [SymPy risch.py source code](https://github.com/sympy/sympy/blob/master/sympy/integrals/risch.py)
19. [RuleBasedIntegration/Rubi GitHub repository](https://github.com/RuleBasedIntegration/Rubi)
20. [Symbolic definite (and indefinite) integration: methods and open issues](https://dl.acm.org/doi/10.1145/2016567.2016569)
21. [AlphaIntegrator: Transformer Action Search for Symbolic Integration Proofs](https://arxiv.org/html/2410.02666)
22. [Barket, Rashid, England, Matthew, Gerhard, Jürgen (2023). Generating Elementary Integrable Expressions. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2306.15572)
23. [Barket, Rashid, England, Matthew, Gerhard, Jürgen (2024). The Liouville Generator for Producing Integrable Expressions. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2406.11631)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Integrals and integration theory

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/symbolic-integration

English original: https://www.edgepedia.org/symbolic-integration
