# 常微分方程的数值方法

**常微分方程的数值方法**是在无法获得或不便使用闭式解时，在离散点上计算微分方程解之近似值的算法。该领域的核心是初值问题 \( y' = f(t, y), \; y(a) = \alpha \)：给定系统在某一时刻的状态，将解向前推进。在较弱的假设下，即 \( f \) 连续且关于 \( y \) 满足利普希茨条件（即限制函数变化速度的界），该问题具有唯一且适定的解，因此数值方法有一个明确的目标可供逼近<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup>。方法的评判标准包括精度阶数、稳定性以及在计算 \( f \) 时的代价；同一套机制可推广到一阶方程组，只要将高阶方程改写为一阶形式，就会出现这样的方程组<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup>。

| 关键事实 | 详情 |
|---|---|
| 基本问题 | 初值问题 \( y' = f(t,y), \; y(a)=\alpha \)；当 \( f \) 连续且关于 \( y \) 满足利普希茨条件时适定<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup> |
| 欧拉法 | \( w_{i+1} = w_i + h f(t_i, w_i) \)；一阶方法，全局误差为 \( \mathcal{O}(h) \)<sup>[2](https://labs.acme.byu.edu/Volume4/Numerical_IVP/Numerical_IVP.html)</sup> |
| 经典RK4 | 每步计算四次 \( f \)，组合为 \( \mathbf{x}_{i+1} = \mathbf{x}_i + \frac{h}{6}(K_1 + 2K_2 + 2K_3 + K_4) \)；四阶精度<sup>[2](https://labs.acme.byu.edu/Volume4/Numerical_IVP/Numerical_IVP.html)</sup><sup> • </sup><sup>[3](https://dlmf.nist.gov/3.7)</sup> |
| 多步法稳定性 | 线性多步法稳定当且仅当满足根条件；若同时相容，则稳定当且仅当收敛<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup> |
| 刚性 | 显式求解器在刚性问题上变得慢得不可忍受，因为步长是被稳定性而非精度压低的；此时改用BDF和Radau等隐式求解器<sup>[4](https://www.mathworks.com/help/matlab/math/solve-stiff-odes.html)</sup><sup> • </sup><sup>[5](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html)</sup> |
| 达尔奎斯特屏障 | 收敛的显式线性多步法不可能是A稳定的，这是隐式方法在刚性计算中占主导的主要原因<sup>[6](https://ehrhardt.uni-wuppertal.de/NumOde/VL_WS2425_Outline.html)</sup> |
| 误差控制 | 生产级求解器控制的是每步的局部误差，而非全局误差；对于采用标准误差控制的显式龙格-库塔方法，全局误差表现为容差的一个已知有理幂次<sup>[7](https://strathprints.strath.ac.uk/200/)</sup> |

## 一步法：欧拉法、泰勒法与龙格-库塔法

最简单的方法将区间 \([a,b]\) 划分为步长为 \( h \) 的若干步，并利用当前点的导数推进解。欧拉法 \( w_{i+1} = w_i + h f(t_i, w_i) \) 由泰勒定理舍去 \( \frac{h^2}{2} y'' \) 余项得到；它是一阶方法，意味着任意固定时刻的误差与 \( h \) 成正比地缩小<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup><sup> • </sup><sup>[2](https://labs.acme.byu.edu/Volume4/Numerical_IVP/Numerical_IVP.html)</sup>。高阶泰勒法保留展开式中更多的项，但需要 \( f \) 的解析导数，这在实际中代价高昂或无法获得<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup>。

**龙格-库塔方法**通过在每步内若干精心选取的阶段点上计算 \( f \)，并将结果按加权和组合，从而免除了这一要求。欧拉法和中点法都属于这一族，而经典的四阶方法（RK4）以四个阶段迭代：

\[ \begin{aligned} K_1 &= f(\mathbf{x}_i, t_i), \quad K_2 = f\left(\mathbf{x}_i + \tfrac{h}{2} K_1,\, t_i + \tfrac{h}{2}\right), \\ K_3 &= f\left(\mathbf{x}_i + \tfrac{h}{2} K_2,\, t_i + \tfrac{h}{2}\right), \quad K_4 = f\left(\mathbf{x}_i + h K_3,\, t_i + h\right), \\ \mathbf{x}_{i+1} &= \mathbf{x}_i + \tfrac{h}{6}(K_1 + 2K_2 + 2K_3 + K_4). \end{aligned} \]

DLMF对 \( w' = f(z,w) \) 给出了同样的规则，局部余项为 \( O(h^5) \)，在解具有五阶连续导数时成立<sup>[3](https://dlmf.nist.gov/3.7)</sup>。当 \( f \) 不依赖于解时，龙格-库塔方法退化为求积规则：欧拉法变为左矩形规则，中点法变为中点规则，RK4退化为辛普森规则<sup>[2](https://labs.acme.byu.edu/Volume4/Numerical_IVP/Numerical_IVP.html)</sup>。

更高阶意味着每步需要更多次 \( f \) 计算，但在总工作量上更胜一筹。以达到给定精度所需的 \( f \) 计算次数来衡量，高阶方法比用更小步长运行的低阶方法更高效，因为 \( p \) 阶方法的误差表现为 \( E(h) = C h^p \)<sup>[2](https://labs.acme.byu.edu/Volume4/Numerical_IVP/Numerical_IVP.html)</sup>。

## 多步法

一步法只利用当前点，而线性多步法则复用最近若干已完成步骤的信息。一个 \( m \) 步方法具有如下形式

\[ w_{i+1} = w_i a_{m-1} + \cdots + w_{i+1-m} a_0 + h \bigl[ f(t_{i+1}, w_{i+1}) b_m + \cdots + f(t_{i+1-m}, w_{i+1-m}) b_0 \bigr], \]

其中起始值 \( w_0, \ldots, w_{m-1} \) 另行提供。当 \( b_m = 0 \) 时是显式的，否则为隐式<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup>。亚当斯族通过将 \( y' = f \) 在一步上积分并用通过先前值的插值多项式替换 \( f \) 而产生；亚当斯-巴什福思方法为显式成员，亚当斯-莫尔顿方法为更精确的隐式成员<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup><sup> • </sup><sup>[8](https://stewart.sdsu.edu/Career_Historic/BirthOfNA-Nov2009-document.pdf)</sup>。

多步法的稳定性由其特征多项式 \( P(\lambda) = \lambda^m - a_{m-1}\lambda^{m-1} - \cdots - a_0 \) 的根 \( \lambda_1, \ldots, \lambda_m \) 决定。当 \( |\lambda_i| \le 1 \) 且所有模为一的根都是单根时，方法满足根条件；当 \( \lambda = 1 \) 是唯一模为一的根时，方法强稳定；有多个这样的根时弱稳定；根条件不满足时不稳定。多步法稳定当且仅当满足根条件，而相容的方法稳定当且仅当收敛<sup>[1](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)</sup>。

## 刚性与隐式方法

**刚性**描述的是解的各分量在截然不同的时间尺度上变化的问题。在此类问题上，显式方法的步长被稳定性要求压低到不合理的微小水平，即使解曲线光滑处也是如此；穿越一个很短的区间可能需要数百万次函数计算<sup>[4](https://www.mathworks.com/help/matlab/math/solve-stiff-odes.html)</sup>。标准测试方程 \( y' = -\lambda y \) 随 \( |\lambda| \) 增大而越来越刚性；当 \( \lambda = 10^9 \) 时，非刚性求解器举步维艰，而隐式求解器则能高效积分<sup>[9](https://www.mathworks.com/help/matlab/ref/ode15s.html)</sup>。

解决办法是隐式方法，其稳定域大得多，但每步需要求解一个非线性方程组，使单步代价高昂。即便如此，这种权衡在总体上仍可能比显式方法所需的极多步数更便宜<sup>[8](https://stewart.sdsu.edu/Career_Historic/BirthOfNA-Nov2009-document.pdf)</sup>。A稳定，即稳定域包含整个左半平面，是一步法的关键判据，L稳定则是更强的要求；对于多步法，第二达尔奎斯特屏障表明收敛的显式线性多步法不可能是A稳定的，这促使人们采用后向差分公式（BDF）等隐式公式<sup>[6](https://ehrhardt.uni-wuppertal.de/NumOde/VL_WS2425_Outline.html)</sup>。隐式龙格-库塔方法，包括配置法和对角隐式（SDIRK）格式，以及罗森布罗克-瓦纳方法，提供了一步法的替代方案<sup>[6](https://ehrhardt.uni-wuppertal.de/NumOde/VL_WS2425_Outline.html)</sup>。

在大气化学中，刚性常微分方程组描述化学转化，基准测试在七个基准问题上比较了五种专用显式求解器和四种隐式求解器，其中隐式求解器使用稀疏矩阵技术以节省线性代数运算<sup>[10](https://authors.library.caltech.edu/records/wbx07-tym26)</sup>。

## 自适应步长与误差控制

现代求解器估计每步的局部误差，通常通过比较两种不同阶数的方法来实现，仅当估计值满足用户指定的容差时才接受该步；否则以更小的 \( h \) 重试<sup>[11](https://a-warded.org/open-book/university-numerical-analysis/lesson-25)</sup>。这控制的是局部误差，而非整个积分过程中累积的全局误差，二者是不同的量<sup>[7](https://strathprints.strath.ac.uk/200/)</sup>。对于采用任何标准误差控制方案的显式龙格-库塔方法，海厄姆（Higham）表明，忽略高阶项后，全局误差表现为误差容差的一个已知有理幂次，这正是基于容差的软件在实践中具有可预测性的原因<sup>[7](https://strathprints.strath.ac.uk/200/)</sup>。

对于用显式自适应方法求解的刚性问题，所需步数可能极其巨大且几乎与容差无关，因为局部误差和步长都由最快的时间尺度而非所关心的解的行为决定<sup>[12](https://www.math.ntnu.no/emner/TMA4130/2022h/html_notes/NumODE_part2.html)</sup>。

## 保结构积分

对于哈密顿系统和其他具有几何结构的问题，普通方法在长时间内会引入系统性漂移。辛方法和对称方法保持该结构：理论涵盖龙格-库塔、复合、分裂和多步积分器，其长时间行为通过后向误差分析结合KAM理论来分析，其中后向误差分析用邻近修正方程的精确解替代数值解<sup>[13](https://link.springer.com/book/10.1007/3-540-30666-8)</sup>。在行星动力学中，威斯多姆-霍尔曼（Wisdom-Holman）方法等辛积分器已成为长期轨道模拟的标准，因为它们能以良好的精度允许较大的时间步长<sup>[14](https://arxiv.org/abs/1907.11335)</sup>。

## 边值问题

当条件分散在区间的两端而非全部给定于一端时，问题即为边值问题，此时初值问题的机制是被改造而非被取代。打靶法通过猜测缺失的初始数据并修正猜测，将边值问题转化为一系列初值问题；有限差分法则精确施加边界条件并在网格上近似导数，产生一个代数系统；配置法和伽辽金有限元法在函数空间中近似解<sup>[15](https://www.cs.cmu.edu/~ph/859B/www/notes/ode/bvp.html)</sup>。对于线性微分方程，上述任何方法得到的系统都是线性的<sup>[15](https://www.cs.cmu.edu/~ph/859B/www/notes/ode/bvp.html)</sup>。

## 软件与历史发展

通用库将这些方法与自动步长控制一起打包。MATLAB将`ode45`归类为默认的非刚性求解器，`ode23`、`ode113`、`ode78`和`ode89`作为粗略或严格容差下的替代，而`ode15s`、`ode23s`、`ode23t`和`ode23tb`用于刚性问题和微分代数方程<sup>[16](https://www.mathworks.com/help/matlab/math/choose-an-ode-solver.html)</sup>。SciPy的`solve_ivp`提供用于非刚性问题的显式龙格-库塔方法（'RK23'、'RK45'、'DOP853'）和用于刚性问题的隐式方法（'Radau'、'BDF'），其中'DOP853'推荐用于高精度工作，'LSODA'利用刚性检测在亚当斯模式和BDF模式之间自动切换<sup>[5](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html)</sup>。

历史记录从1883年巴什福思（Bashforth）和亚当斯关于多步公式的论文、1895年龙格（Runge）的论文开始，历经霍伊恩（Heun）和库塔（Kutta）的贡献，直到尼斯特伦（Nyström）1925年的工作，后者为龙格-库塔方法的早期发展画上了句号<sup>[17](https://doi.org/10.1016/S0377-0427%2800%2900455-6)</sup>。20世纪电子计算机的发明以及数学建模对高效算法的需求加速了进展，阶条件、隐式方法和稳定性分析的现代理论正是从这一谱系中发展而来<sup>[17](https://doi.org/10.1016/S0377-0427%2800%2900455-6)</sup>。

## References

1. [Chapter 5: Initial-Value Problems for Ordinary Differential Equations, Math 128A lecture slides, UC Berkeley](https://persson.berkeley.edu/math128a/slides/ch5math128a.html)
2. [Numerical Methods for Initial Value Problems, ACME Labs, Brigham Young University](https://labs.acme.byu.edu/Volume4/Numerical_IVP/Numerical_IVP.html)
3. [DLMF §3.7: Ordinary Differential Equations, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/3.7)
4. [Solve Stiff ODEs, MATLAB & Simulink documentation, MathWorks](https://www.mathworks.com/help/matlab/math/solve-stiff-odes.html)
5. [solve_ivp, SciPy v1.18.0 Manual](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html)
6. [Lecture course outline: Numerical Analysis and Simulation I: Ordinary Differential Equations, Bergische Universität Wuppertal](https://ehrhardt.uni-wuppertal.de/NumOde/VL_WS2425_Outline.html)
7. [D. J. Higham (1993). The tolerance proportionality of adaptive ODE solvers. Journal of Computational and Applied Mathematics 45, 227–236.](https://strathprints.strath.ac.uk/200/)
8. [Numerical methods for ordinary differential equations: early days, SDSU historical document](https://stewart.sdsu.edu/Career_Historic/BirthOfNA-Nov2009-document.pdf)
9. [ode15s: Solve stiff differential equations and DAEs, MATLAB documentation, MathWorks](https://www.mathworks.com/help/matlab/ref/ode15s.html)
10. [Benchmarking stiff ODE solvers for atmospheric chemistry problems I: implicit vs explicit, CaltechAUTHORS](https://authors.library.caltech.edu/records/wbx07-tym26)
11. [Adaptive Step-size Control via Runge-Kutta-Fehlberg, A-Warded numerical analysis reference](https://a-warded.org/open-book/university-numerical-analysis/lesson-25)
12. [Numerical solution of ordinary differential equations, part 2, TMA4130 course notes, NTNU](https://www.math.ntnu.no/emner/TMA4130/2022h/html_notes/NumODE_part2.html)
13. [E. Hairer, G. Wanner, C. Lubich. Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations, Springer Series in Computational Mathematics 31](https://link.springer.com/book/10.1007/3-540-30666-8)
14. [High order symplectic integrators for planetary dynamics and their implementation in REBOUND, arXiv:1907.11335](https://arxiv.org/abs/1907.11335)
15. [Boundary Value Problems, course notes, Carnegie Mellon University 859B](https://www.cs.cmu.edu/~ph/859B/www/notes/ode/bvp.html)
16. [Choose an ODE Solver, MATLAB & Simulink documentation, MathWorks](https://www.mathworks.com/help/matlab/math/choose-an-ode-solver.html)
17. [Numerical methods for ordinary differential equations in the 20th century, Journal of Computational and Applied Mathematics](https://doi.org/10.1016/S0377-0427%2800%2900455-6)

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

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Numerical analysis and computation

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/numerical-methods-for-ordinary-differential-equations

English original: https://www.edgepedia.org/numerical-methods-for-ordinary-differential-equations
