符号函数 |
![](//chped.net/https/upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Signum_function.png/220px-Signum_function.png) |
性质 |
奇偶性 | 奇函数 |
定义域 | (-∞,∞) |
到达域 | |
周期 | N/A |
特定值 |
当x=0 | 0 |
当x=+∞ | 1 |
当x=-∞ | -1 |
最大值 | 1 |
最小值 | -1 |
其他性质 |
渐近线 | N/A |
根 | 0 |
临界点 | N/A |
拐点 | N/A |
不动点 | 0,1,-1 |
符号函数(蓝色)、符号函数的微分(橘色),其中,符号函数的微分正好是2倍的
狄拉克δ函数
符号函数(Sign function,简称sgn)是一个逻辑函数,用以判断实数的正负号。为避免和英文读音相似的正弦函数(sine)混淆,它亦称为Signum function。其定义为:
![{\displaystyle \operatorname {sgn} x=\left\{{\begin{matrix}-1&:&x<0\\0&:&x=0\\1&:&x>0\end{matrix}}\right.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6ed658b2b97871cfc800316980da7c87a77899b5)
用艾佛森括号定义:
![{\displaystyle \operatorname {sgn} x=-[x<0]+[x>0]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9e4db033f5a770e059bb55e90bf6b05f15767567)
任何实数都可以表示为其绝对值和符号函数的积:
![{\displaystyle x=(\operatorname {sgn} x)|x|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/135470e69e85dd989ee9b276976e01906bccd190)
若x不为零,可以由上式得出符号函数的另一个定义:
![{\displaystyle \operatorname {sgn} x={x \over |x|}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7a184a4acf5d78d55004eb42072e528eb2136e44)
符号函数是绝对值函数的导数:
![{\displaystyle {\frac {d|x|}{dx}}={\frac {x}{|x|}}=\operatorname {sgn} x}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c9470eb14dfb1ae18f5d7cad9ed30c41029284b3)
除了在0,符号函数可微分,其导数为0。透过一般化微分概念,可以说符号函数的导数是狄拉克δ函数的两倍:
![{\displaystyle {d\ \operatorname {sgn} x \over dx}=2\delta (x)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5a0af22b47fbca543c0fe02352c3a078e86412f2)
它和单位步阶函数的关系:
![{\displaystyle \operatorname {sgn} x=2H_{1/2}(x)-1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/fac60fca37c9995bd22b5c12721936c9121841bb)
推广到复数[编辑]
符号函数可以推广到复数:对于任意
,
![{\displaystyle \operatorname {sgn} z={\frac {z}{|z|}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2374c73ee5e35f66d55b77e324ec4be97cc0d4b0)
对于任何z ∈
,除了z = 0以外。复数z的符号函数,是复平面上中心为原点的单位圆上距离z最近的点。那么,对于z ≠ 0,有:
![{\displaystyle \operatorname {sgn} z=\exp(i\arg z)\,,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/58641732fb7c47c96f60de421b838ebe09db4ef9)
其中arg表示辐角。
出于对称的原因,并且为了实现对实数的符号函数的适当推广,对于z = 0,也常常在复数域中定义:
![{\displaystyle \operatorname {sgn} 0=\operatorname {sgn}(0+0i)=0.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e98ad4e09afa6dda781fd8a8ffc32953e9fe6768)
符号函数在复数范围的另外一个推广是csgn函数,定义为:
![{\displaystyle \operatorname {csgn} (z)={\begin{cases}1&{\text{if }}\Re (z)>0\lor (\Re (z)=0\land \Im (z)>0),\\-1&{\text{if }}\Re (z)<0\lor (\Re (z)=0\land \Im (z)<0),\\0&{\text{if }}\Re (z)=\Im (z)=0.\end{cases}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/997f88ce5f63ae2adaf3346d41758b68d04720f0)
即是在一四象限及 xy 轴正半轴为1,二三象限及 xy 轴负半轴为-1,原点为0。
对于 csgn,我们有(除了z = 0以外):
![{\displaystyle \operatorname {csgn} (z)={\frac {z}{\sqrt {z^{2}}}}={\frac {\sqrt {z^{2}}}{z}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/80928ebc95130b13743463767a32e8f0efd6c111)