# 赫维赛德阶跃函数

赫维赛德阶跃函数通常记作 H，是一个单实变量的不连续函数：自变量为负时取值为 0，自变量为正时取值为 1；它也称为单位阶跃函数<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。它表示一个在指定时刻开启并无限期保持开启的信号，最初是在用于求解微分方程的运算微积中发展出来的<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | 当 x < 0 时 H(x) = 0，当 x > 0 时 H(x) = 1；在 0 处的取值取决于约定<sup>[2](https://encyclopediaofmath.org/wiki/Heaviside_function)</sup> |
| 0 处的常见取值 | 1/2（对称约定，H(x) = ½(1 + sgn(x))）、1（右连续）或 0（左连续）<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup> |
| 分布导数 | dH/dx = δ(x)，即狄拉克δ函数<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup> |
| 拉普拉斯变换 | 对于在 t = c 处开启的平移阶跃 u_c(t)，ℒ{u_c(t)} = e^{−cs}/s<sup>[3](https://www.math.hkust.edu.hk/~machas/differential-equations.pdf)</sup> |
| 傅里叶变换 | ℋ{1₊}(ω) = πδ(ω) + pv(1/(jω))，这是一个分布，而不是普通函数<sup>[4](https://link.springer.com/chapter/10.1007/978-3-031-40681-2_4)</sup> |
| 软件约定 | NumPy 的 `heaviside(x1, x2)` 将零点处的值作为参数 x2，通常取 0.5，但也使用 0 和 1；MATLAB 的 `heaviside` 在原点处默认取 1/2<sup>[5](https://numpy.org/doc/stable/reference/generated/numpy.heaviside.html)</sup><sup> • </sup><sup>[6](https://www.mathworks.com/help/symbolic/sym.heaviside.html)</sup> |

## 定义与零点处的取值

《数学百科全书》将 H: ℝ → ℝ 定义为在负半直线 ]−∞, 0[ 上取值 0、在正半直线 ]0, ∞[ 上取值 1，并指出函数在原点处如何定义往往无关紧要<sup>[2](https://encyclopediaofmath.org/wiki/Heaviside_function)</sup>。有三种常见选择，每种都有其理由<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>：

- **H(0) = 1/2** 使图像具有旋转对称性，并使 H(x) − 1/2 关于原点为奇函数；它对所有 x 给出恒等式 H(x) = ½(1 + sgn(x))，其中 sgn 是符号函数<sup>[15](https://mathworld.wolfram.com/HeavisideStepFunction.html)</sup>。这是 MATLAB 的 `heaviside` 所采用的约定，它在 x = 0 处返回 1/2<sup>[6](https://www.mathworks.com/help/symbolic/sym.heaviside.html)</sup>。
- **H(0) = 1** 使 H 右连续，因此 H 是闭半无限区间 [0,∞) 的指示函数 1₍[0,∞)₎(x)；累积分布函数通常取为右连续，采用这种形式<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。
- **H(0) = 0** 使 H 左连续，即开半无限区间的指示函数<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。

由于 H 通常出现在积分内部，而函数在单点的取值不影响其积分，因此这一选择在实践中通常无关紧要<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。当把 H 视为分布或 L^∞ 的元素时，谈论零点处的取值甚至没有意义，因为这类对象只在几乎处处有定义<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。《数学百科全书》补充了半连续性的解读：取 0 使函数下半连续，取 1 使函数上半连续，而取 1/2 与有界变差函数理论中的约定一致，即把逐点值定义为左右极限的平均值；H 是有界变差函数，用勒贝格的术语说是一个跳跃函数<sup>[2](https://encyclopediaofmath.org/wiki/Heaviside_function)</sup>。

软件库使这一选择显式化，而不是固定不变。NumPy 的通用函数 `numpy.heaviside(x1, x2)` 将输出定义为：x1 < 0 时为 0，x1 = 0 时为 x2，x1 > 0 时为 1，因此零点处的值是第二个参数；例如 `np.heaviside([-1.5, 0, 2.0], 0.5)` 返回 `[0., 0.5, 1.]`<sup>[5](https://numpy.org/doc/stable/reference/generated/numpy.heaviside.html)</sup>。MATLAB 将默认值固定为 1/2，但允许用户通过 `sympref` 设置 `"HeavisideAtOrigin"` 更改它<sup>[6](https://www.mathworks.com/help/symbolic/sym.heaviside.html)</sup>。

## 在赫维赛德的运算微积中的起源

该函数以奥利弗·赫维赛德（Oliver Heaviside）命名，他是英国自学成才的物理学家和工程师，发展了运算微积，将其作为分析电报通信的工具<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。《皇家学会会刊A辑》上的一篇纪念文章指出，赫维赛德是一位具有卓越数学能力和物理洞察力的原创思想家，人们主要因他的阶跃函数而记住他，如今该函数用于物理学、数学和工程的许多分支<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC6232577/)</sup>。

赫维赛德的运算方法求解了作为电路理论基础的微分方程；贝尔系统的一篇论文指出，导线中电传输理论大大受惠于这项工作，而且这种受惠正日益得到承认，其中也包括他对电感重要性的坚持<sup>[8](https://www.nokia.com/bell-labs/publications-and-media/publications/the-heaviside-operational-calculus/)</sup>。以后来者的标准看，他的这套微积运算以不严谨而著称；数学史家指出，许多教科书给出的这段历史版本存在严重错误<sup>[9](https://www.cambridge.org/core/journals/mathematical-gazette/article/abs/heaviside-and-the-operational-calculus/EC1E4AE37EFAAE7E5000A511C9D16CE4)</sup>。在运算微积中，阶跃函数作为使微分方程代数化的一种方式出现；对于零初始值和零边值问题，赫维赛德与拉普拉斯变换的表述几乎相同，其中赫维赛德的算子 p 对应于拉普拉斯变量 s<sup>[10](https://osuva.uwasa.fi/server/api/core/bitstreams/7a3fbe3d-8566-4ec0-888a-82f4e9bc8f2b/content)</sup>。

## 与狄拉克δ函数的关系

在分布的意义下，赫维赛德阶跃函数的导数是狄拉克δ函数：dH(x)/dx = δ(x)<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。这是对以下事实的形式化陈述：阶跃从 0 瞬时跳到 1，因此其变化率完全集中在原点。MATLAB 的符号工具箱直接实现了这一点：`diff(heaviside(x), x)` 返回 `dirac(x)`<sup>[6](https://www.mathworks.com/help/symbolic/sym.heaviside.html)</sup>。

这种关系是双向的。对平移后的δ函数积分得到平移后的阶跃函数；这两个函数一起用于建模微分方程中的不连续和脉冲强迫项，而这正是拉普拉斯变换技术最有用的场合<sup>[3](https://www.math.hkust.edu.hk/~machas/differential-equations.pdf)</sup>。

## 在微分方程和变换中的用途

平移阶跃 u_c(t) 在 t < c 时等于 0，在 t ≥ c 时等于 1，它把任意函数 f(t) 变成延迟版本：u_c(t)f(t − c) 在 t = c 之前为 0，此后等于 f(t − c)<sup>[3](https://www.math.hkust.edu.hk/~machas/differential-equations.pdf)</sup>。其拉普拉斯变换可由直接积分得到：

\[ \mathcal{L}\{u_c(t)\} = \int_0^{\infty} e^{-st} u_c(t)\, dt = \int_c^{\infty} e^{-st}\, dt = \frac{e^{-cs}}{s} \]

而平移规则 ℒ{u_c(t)f(t − c)} = e^{−cs}F(s) 把分段定义的强迫函数化为单个代数方程<sup>[3](https://www.math.hkust.edu.hk/~machas/differential-equations.pdf)</sup><sup> • </sup><sup>[11](https://tutorial.math.lamar.edu/Classes/DE/IVPWithStepFunction.aspx)</sup>。一个在区间 [a, b) 上为 1、在其他地方为 0 的脉冲写作 u_a(t) − u_b(t)；在一个算例中，当 5 ≤ t < 20 时等于 1 的强迫项 g(t) 变为 u₅(t) − u₂₀(t)，而 2y″ + y′ + 2y = g(t) 的变换方程为 Y(s) = (e^{−5s} − e^{−20s}) / (s(2s² + s + 2))<sup>[12](https://courses.math.wichita.edu/math555/ch6/4/DiscontinuousForcingFunctions.html)</sup>。

傅里叶变换需要分布语言。把阶跃写成 1₊(t) = ½[1 + sgn(t)]，并利用符号函数的变换，可得

\[ \mathcal{F}\{\textsf{1}_{+}(t)\} = \pi\,\delta(\omega) + \operatorname{pv}\frac{1}{\jmath\omega} \]

其中 pv 表示柯西主值（对发散积分赋值的正则化方式）<sup>[4](https://link.springer.com/chapter/10.1007/978-3-031-40681-2_4)</sup>。ω = 0 处的冲激反映了阶跃的非零均值，而主值项反映了跳变。同样的分解也是阶跃的分布定义的基础：其中 θ 对检验函数 f 的作用为 ∫θ(x)f(x)dx = ∫₀^∞ f(x)dx<sup>[13](https://zbeever.github.io/post/2020-09-16_fourier-transform-of-unit-step/)</sup>。

## 作为一类的阶跃函数

H 是一般阶跃函数类的基础，所有这些函数都可以表示为 H 的平移的线性组合<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。在优化和博弈论中，有时使用一种集值变体，取 H(0) = [0, 1]，以保持极限函数的连续性并确保某些解的存在<sup>[1](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)</sup>。赫维赛德函数的知识还被用于分析具有孤立不连续点的函数在三次样条插值中的收敛性和吉布斯现象<sup>[14](https://www.sciencedirect.com/science/article/pii/S0377042797001994)</sup>。

## References

1. [Section 2.3, The Heaviside step function, lecture notes, University of Belgrade](https://poincare.matf.bg.ac.rs/~miodrag/DiPJBV7new.pdf)
2. [Heaviside function, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Heaviside_function)
3. [J. H. Hubbard? Differential Equations notes, HKUST (Ch. 4, Heaviside and Dirac delta functions)](https://www.math.hkust.edu.hk/~machas/differential-equations.pdf)
4. [Fourier Transform of Distributions, Springer Nature Link, Example 4.9](https://link.springer.com/chapter/10.1007/978-3-031-40681-2_4)
5. [numpy.heaviside, NumPy v2.5 Manual](https://numpy.org/doc/stable/reference/generated/numpy.heaviside.html)
6. [heaviside, Heaviside step function, MATLAB Help Center](https://www.mathworks.com/help/symbolic/sym.heaviside.html)
7. [Oliver Heaviside's electromagnetic theory, Proceedings of the Royal Society A (PMC)](https://pmc.ncbi.nlm.nih.gov/articles/PMC6232577/)
8. [The Heaviside Operational Calculus, Bell Labs / Nokia](https://www.nokia.com/bell-labs/publications-and-media/publications/the-heaviside-operational-calculus/)
9. [Heaviside and the Operational Calculus, The Mathematical Gazette (Cambridge Core)](https://www.cambridge.org/core/journals/mathematical-gazette/article/abs/heaviside-and-the-operational-calculus/EC1E4AE37EFAAE7E5000A511C9D16CE4)
10. [Oliver Heaviside's Operational Calculus: The Foundations of Electrical Engineering](https://osuva.uwasa.fi/server/api/core/bitstreams/7a3fbe3d-8566-4ec0-888a-82f4e9bc8f2b/content)
11. [Differential Equations, Section 4.7: IVP's With Step Functions, Paul's Online Notes](https://tutorial.math.lamar.edu/Classes/DE/IVPWithStepFunction.aspx)
12. [Math 555, Section 6.4: Discontinuous Forcing Functions, Wichita State University](https://courses.math.wichita.edu/math555/ch6/4/DiscontinuousForcingFunctions.html)
13. [The Fourier transform of the Heaviside step function, Z. Beever](https://zbeever.github.io/post/2020-09-16_fourier-transform-of-unit-step/)
14. [Convergence and Gibbs' phenomenon in cubic spline interpolation of discontinuous functions, Journal of Computational and Applied Mathematics](https://www.sciencedirect.com/science/article/pii/S0377042797001994)
15. [Heaviside Step Function -- from Wolfram MathWorld](https://mathworld.wolfram.com/HeavisideStepFunction.html)

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

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Harmonic analysis, transforms, and integral equations

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/heaviside-step-function

English original: https://www.edgepedia.org/heaviside-step-function
