分段函数是在一系列区间上定义的函数。一个常见的例子是绝对值,
![|x|={-x for x<0; 0 for x=0; x for x>0.](/images/equations/PiecewiseFunction/NumberedEquation1.svg) |
(1)
|
分段函数在 Wolfram 语言 中实现为Piecewise[![{](/images/equations/PiecewiseFunction/Inline1.svg)
val1, cond1
,
val2, cond2
, ...
].
其他分段函数包括 Heaviside 阶跃函数、矩形函数 和 三角形函数。
分号和逗号有时用于左列或右列的末尾,具体的用法显然取决于作者。“if”和“for”这两个词有时用于右列,而“otherwise”用于最后的(默认)情况。
例如,Knuth(1996,第 175 页和 180 页)使用了以下符号
左列带逗号和不带逗号的都有。同样,Arfken(1985,第 488-489 页)使用了
![delta_n(x)={0, x<-1/(2n); n, -1/(2n)<x<1/(2n),; 0, 1/(2n)<x
delta_n(x)={0, x<0; ne^(-nx), x>0
lim_(a->infty)2/piint_(x_1)^(x_2)f(u+x)(sin(ax))/xdx
={f(u+0)+f(u-0), x_1<0<x_2; f(u+0), x_1=0<x_2; f(u-0), x_1<0=x_2; 0 x_1<x_2<0 or 0<x_1<x_2,](/images/equations/PiecewiseFunction/NumberedEquation2.svg) |
(5)
|
其中缺少分号,但有时也缺少右列逗号。
在这项工作中,不使用逗号和分号。
另请参阅
Heaviside 阶跃函数,
Iverson 括号,
分段常数函数,
分段线性函数
使用 Wolfram|Alpha 探索
参考文献
Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, 1985.Knuth, D. E. The TEXBook. Boston, MA: Addison-Wesley, 1996.
Rytin, M. "Integration of Piecewise Functions with Applications." http://library/infocenter/MathSource/5117.在 Wolfram|Alpha 上被引用
分段函数
请引用为
Weisstein, Eric W. "Piecewise Function." 来自 MathWorld—— Wolfram Web 资源。 https://mathworld.net.cn/PiecewiseFunction.html
主题分类