# 有限差分法

有限差分法（FDM）是一种数值技术，用于求解微分方程，其做法是用在离散点网格上求值的差商代替导数，从而将微分问题转化为代数方程组。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup> 它与有限元法同属两大类最常用于数值求解偏微分方程边值问题的方法家族。<sup>[2](https://www.cambridge.org/core/journals/bulletin-of-the-australian-mathematical-society/article/finite-difference-versus-the-finite-element-method-for-the-solution-of-boundary-value-problems/4CD94B2C8C74A710AD550F4553BD1CF0)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心思想 | 用网格或网罩上的差商代替方程中的导数，在适当的节点上写出差分方程。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup> |
| 二阶导数 | 二阶中心差分 \( u''(x) = \frac{u(x+h) - 2u(x) + u(x-h)}{h^{2}} + O(h^{2}) \) 具有二阶精度。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup> |
| 一阶导数 | 前向和后向差商具有一阶精度；中心差分的局部截断误差为 \( O(h^{2}) \)。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup><sup> • </sup><sup>[3](https://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node9.html)</sup> |
| 输出 | 对于边值问题，离散化产生一个代数方程组，一次性求解；这与初值问题不同，后者是随时间推进求解的。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup> |
| 收敛理论 | 拉克斯等价定理：对于适定线性初值问题的一个相容有限差分格式，稳定性是收敛的充分必要条件。<sup>[4](https://persson.berkeley.edu/math228b/html/finite_difference_methods_for_PDEs.html)</sup> |
| 历史渊源 | 理论起点是库朗、弗里德里希斯和卢伊1928年关于用有限差分求解数学物理问题的论文。<sup>[5](https://doi.org/10.1016/s0377-0427(00)00507-0)</sup> |
| 软件支持 | PETSc通过DMDA和DMSTAG模型类提供结构化网格的有限差分支持。<sup>[6](https://petsc.org/release/manual/dmbase/)</sup> |

## 方法如何运作

**离散化。** 第一步是在区域上覆盖网格或网罩。在一维情形下，将诸如[0, 1]这样的区间分成若干长度为h的子区间，节点位于 \( x = i \cdot h \) 处；未知量是这些节点上的近似解值 \( u_i \approx u(x_i) \)。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup><sup> • </sup><sup>[7](https://cseweb.ucsd.edu/~baden/classes/cse262_wi02/lectures/Lec04/Lec04.html)</sup> 间距h称为网格间距。<sup>[7](https://cseweb.ucsd.edu/~baden/classes/cse262_wi02/lectures/Lec04/Lec04.html)</sup>

**差商。** 然后用有限差分近似导数，通常由泰勒级数导出。前向差分 \( u'(x) \approx \frac{u(x+h) - u(x)}{h} \) 和后向差分 \( u'(x) \approx \frac{u(x) - u(x-h)}{h} \) 各具有一阶精度。二阶中心差分

\[ u''(x) = \frac{u(x+h) - 2u(x) + u(x-h)}{h^{2}} + O(h^{2}), \]

具有二阶精度；其推导过程中 \( h^{3} \) 项相互抵消。它也可以通过将一阶导数的前向和后向近似作差得到，故称二阶差分。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup> 一阶导数的中心近似 \( \frac{C_{i+1} - C_{i-1}}{2h} \) 同样带有 \( O(h^{2}) \) 的局部截断误差。<sup>[3](https://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node9.html)</sup>

**模板。** 有限差分近似通常用其所使用的网格点图示来形象描述，称为该方法的模板；二阶中心差分是一个三点模板。<sup>[1](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)</sup> 在二维情形下，泊松方程使用一个节点及其四个邻居的简单离散化是五点中心差分离散化，而九点加权中心差分离散化在适当实现时可达到 \( O(h^{4}) \) 收敛。<sup>[8](https://climate.ucdavis.edu/AM452.pdf)</sup>

## 边值问题

对于两点边值问题（BVP），例如在[0, b]上满足两端边界条件的 \( y'' = f(x, y, y') \)，标准流程有四步：通过选择网格点离散化区域；在内部用有限差分离散化微分方程；离散化边界条件并按需修改内部方程；求解所得方程组。与打靶法不同，整个解是一次性求解的，这避免了辅助初值问题中可能出现的不稳定性。<sup>[9](https://sites.math.duke.edu/~jtwong/math563-2020/lectures/Lec9-BVPs.pdf)</sup>

在狄利克雷边界条件下，解值在两端被指定，边界值已知，未知量为内部值，得到关于 \( u_1, \ldots, u_{N-1} \) 的 \( N-1 \) 个方程组成的方程组。<sup>[9](https://sites.math.duke.edu/~jtwong/math563-2020/lectures/Lec9-BVPs.pdf)</sup> 处理导数边界条件需要更加小心。对于区域末端的无通量（诺伊曼）条件，中心差分公式会引用区域外的一个节点；标准补救办法是将区域延伸一个虚拟节点，写出额外方程，求解扩大后的方程组，然后舍弃虚拟值。<sup>[3](https://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node9.html)</sup>

边值问题的离散化产生一个线性或可能非线性的方程组，然后用通常的线性代数工具求解。<sup>[10](https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/15BVPs/finite_diff/theory.html)</sup><sup> • </sup><sup>[11](https://web.ma.utexas.edu/users/zihengchen/blob/numerical_II_notes.pdf)</sup> 对于线性例子 \( u''(x) = 8 \) 在[0, 1]上满足 \( u(0) = u(1) = 0 \)，每个内部值也可以在迭代格式中作为其两个邻居的函数进行更新。<sup>[7](https://cseweb.ucsd.edu/~baden/classes/cse262_wi02/lectures/Lec04/Lec04.html)</sup>

## 精度、稳定性与收敛性

当格式的局部截断误差随网格尺寸趋于零时，称格式是相容的；当离散化矩阵的逆的范数独立于h而有界时，称格式是稳定的。对于一维椭圆问题的标准二阶离散化，截断误差满足 \( \|T^{h}\|_{2} \le \frac{1}{12} h^{2} c_{T} \)，其中 \( c_{T} = \max_{x \in [0,1]} |u^{(4)}(x)| \)，逆矩阵的2-范数被 \( \pi^{-2} \) 所界，因此该方法在2-范数下以二阶收敛。<sup>[8](https://climate.ucdavis.edu/AM452.pdf)</sup>

拉克斯等价定理是该领域的基本结果：给定一个应用于适定线性初值问题的有限差分格式，且该格式相容地近似该问题，稳定性保证其网格函数在网格间距趋于零的极限下收敛到精确解，反之亦然。<sup>[12](https://people.maths.ox.ac.uk/suli/lecture_notes.pdf)</sup> 在用于时间相关问题的形式中，相容的线性方法收敛当且仅当它是拉克斯-里奇迈耶稳定的。<sup>[4](https://persson.berkeley.edu/math228b/html/finite_difference_methods_for_PDEs.html)</sup> 该理论仅适用于线性偏微分方程；对于非线性偏微分方程，该原理仍然有用，但理论更具挑战性，因为非线性效应可能改变稳定性。<sup>[13](https://sites.math.duke.edu/~jtwong/math563-2020/lectures/Lec10-PDEs.pdf)</sup>

稳定性可能限制时间步长。对于时间上用前向欧拉、空间上用中心差分离散化的热方程（FTCS方法），该方法仅在限制 \( k \le h^{2}/2 \) 下稳定且收敛，其中k为时间步长；克兰克-尼科尔森方法对任意 \( k > 0 \) 都稳定。<sup>[4](https://persson.berkeley.edu/math228b/html/finite_difference_methods_for_PDEs.html)</sup> 双曲问题的稳定性与CFL条件有关，1928年库朗-弗里德里希斯-卢伊的论文表明该条件是收敛的必要条件。<sup>[5](https://doi.org/10.1016/s0377-0427(00)00507-0)</sup>

## 与其他离散化方法的关系

有限差分法和有限元法是边值问题最常用的两大类方法，两者都已发展出广泛的数学误差分析。查尔姆斯理工大学数学教授维达尔·托梅在1984年的一次演讲中论证说，一些数值分析学家对某一种方法的强烈偏爱在历史上是不合理的，因为熟悉两者能为构造和分析离散化格式提供更广泛的技术手段。<sup>[2](https://www.cambridge.org/core/journals/bulletin-of-the-australian-mathematical-society/article/finite-difference-versus-the-finite-element-method-for-the-solution-of-boundary-value-problems/4CD94B2C8C74A710AD550F4553BD1CF0)</sup> 两种方法有许多共同思想，在某些简单情形下它们重合；有限元法凭借其更系统地使用变分方法、更大的几何灵活性以及更容易的误差分析，已成为数值分析学家和应用中的主导方法。<sup>[5](https://doi.org/10.1016/s0377-0427(00)00507-0)</sup> 正则性要求不同：库朗元的有限元误差估计要求解具有二阶导数，而五点有限差分法则需要四阶导数。<sup>[5](https://doi.org/10.1016/s0377-0427(00)00507-0)</sup>

与有限体积（控制体积）格式相比，博特、里特和怀特的比较发现，当边界条件为狄利克雷型、方程组为线性且使用笛卡尔坐标时，两种方法的截断误差相同。当两个边界条件都包含导数项（罗宾或诺伊曼型）时，有限差分法在少量节点下未能保持质量守恒，而控制体积格式在这些情形下保持了质量守恒；对于相邻区域之间存在界面的问题，有限差分法更精确。<sup>[14](https://research.cec.sc.edu/ralph-white/publications/comparison-finite-difference-and-control-volume-methods-solving-differential-equations)</sup>

## 历史

该方法的数学理论始于库朗、弗里德里希斯和卢伊1928年的论文，该文使用五点近似为拉普拉斯方程的狄利克雷问题构造了有限差分近似，并确立了网格宽度趋于零时的收敛性。其目的是证明解的存在性而非计算解，且未导出误差估计或收敛阶。20世纪50年代和60年代，初值问题和抛物型问题的有限差分理论得到密集发展，当时通过拉克斯等价定理和克赖斯矩阵引理探讨了稳定性。有限元法约在1960年出现，此后在该领域占据了越来越多的关注。<sup>[5](https://doi.org/10.1016/s0377-0427(00)00507-0)</sup>

## References

1. [Finite Difference Methods for Boundary Value Problems (Chapter 6), Peterson, Florida State University](https://people.sc.fsu.edu/~jpeterson/bvp_notes.pdf)
2. [Vidar Thomée (1984). The finite difference versus the finite element method for the solution of boundary value problems. Bulletin of the Australian Mathematical Society 29(2), 267-288.](https://www.cambridge.org/core/journals/bulletin-of-the-australian-mathematical-society/article/finite-difference-versus-the-finite-element-method-for-the-solution-of-boundary-value-problems/4CD94B2C8C74A710AD550F4553BD1CF0)
3. [Boundary Value Problems: The Finite Difference Method, MIT 10.001 Course Notes](https://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node9.html)
4. [Finite Difference Methods for PDEs, Math 228B, University of California, Berkeley](https://persson.berkeley.edu/math228b/html/finite_difference_methods_for_PDEs.html)
5. [From finite differences to finite elements: A short history of numerical analysis of partial differential equations. Journal of Computational and Applied Mathematics 128 (2001), 1-54.](https://doi.org/10.1016/s0377-0427(00)00507-0)
6. [DM Basics, PETSc documentation](https://petsc.org/release/manual/dmbase/)
7. [CSE 262 Lecture 4: Boundary value problems, UC San Diego](https://cseweb.ucsd.edu/~baden/classes/cse262_wi02/lectures/Lec04/Lec04.html)
8. [Finite Difference Methods, AM 452 notes, UC Davis](https://climate.ucdavis.edu/AM452.pdf)
9. [Math 563 Lecture Notes, Lecture 9: BVPs and finite differences, Duke University](https://sites.math.duke.edu/~jtwong/math563-2020/lectures/Lec9-BVPs.pdf)
10. [Topic 15.1: Finite-Difference Method (Theory), University of Waterloo](https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/15BVPs/finite_diff/theory.html)
11. [Lecture Notes for Numerical Analysis: Differential Equations, University of Texas at Austin](https://web.ma.utexas.edu/users/zihengchen/blob/numerical_II_notes.pdf)
12. [Lecture Notes on Numerical Analysis of Partial Differential Equations, Endre Süli, University of Oxford](https://people.maths.ox.ac.uk/suli/lecture_notes.pdf)
13. [Math 563 Lecture Notes, Lecture 10: PDEs, Duke University](https://sites.math.duke.edu/~jtwong/math563-2020/lectures/Lec10-PDEs.pdf)
14. [Botte, G. G., Ritter, J. A., White, R. E. (2000). Comparison of finite difference and control volume methods for solving differential equations. Computers and Chemical Engineering 24(12), 2633-2654.](https://research.cec.sc.edu/ralph-white/publications/comparison-finite-difference-and-control-volume-methods-solving-differential-equations)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 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/finite-difference-method

English original: https://www.edgepedia.org/finite-difference-method
