Heaviside Step Function

Author

Eric W. Weisstein
March 26, 2010

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GeneralizedFunctions/HeavisideStepFunction.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/HeavisideStepFunction.html.

©2010 Wolfram Research, Inc. except for portions noted otherwise

Initialization

MyUnitStep[0]:=1/2
MyUnitStep[x_?NumberQ]:=UnitStep[x]

Notation

UnitStep

?UnitStep

UnitStep[x]//TraditionalForm

<<Utilities`Typesetting`

UnitStep[x]//TraditionalForm

HeavisideTheta

v6

?HeavisideTheta

HeavisideTheta[x]//TraditionalForm

Special Values

UnitStep

UnitStep/@{0,1}

MyUnitStep

MyUnitStep/@{0,1}

HeavisideTheta

v6

HeavisideTheta/@{0,1}

Derivatives

UnitStep

v5.2

UnitStep'[x]

v6.1

UnitStep'[x]

InputForm[%]

HeavisideTheta

v6.1

HeavisideTheta'[x]

Fourier Transform

SetOptions[#,FourierParameters->{0,-2π}]&/@{FourierTransform,InverseFourierTransform};

v5.2

FourierTransform[UnitStep[x],x,k]

FourierTransform[Piecewise[{{1,x≥0}},0],x,k]

v6.1

FourierTransform[UnitStep[x],x,k]

FourierTransform[Piecewise[{{1,x≥0}},0],x,k]

FourierTransform[HeavisideTheta[x],x,k]

Plot

<<Utilities`Plot`

Show[GraphicsArray[{
PlotDiscontinuous[MyUnitStep[x],{x,-1,1},
Discontinuities->{0},
ClosedEndpoints->{0},
PlotStyle->Red,
AxesLabel->TraditionalForm/@{x,H[x]},
DisplayFunction->Identity],
Plot[MyUnitStep[x],{x,-1,1},
PlotStyle->Red,
AxesLabel->TraditionalForm/@{x,H[x]},
DisplayFunction->Identity]
}]]

Convolution

Convolve[HeavisideTheta[x],HeavisideTheta[x],x,t]

Convolve[UnitStep[x],UnitStep[x],x,t]

Relation to other Functions

Boxcar Function

Plot[UnitStep[x+1/2]-UnitStep[x-1/2],{x,-1,1},PlotStyle->Red,AxesLabel->TraditionalForm/@{x,Π[x]}]

Ramp Function

RampR[x_]:=x UnitStep[x]

Simplify[D[RampR[x],x]]

Sign Function

Plot[(Sign[x]+1)/2,{x,-1,1},PlotStyle->Red]

Limits

Limit[1/2+1/π ArcTan[x/t],t->0]

Plot[%,{x,-1,1},PlotStyle->Red]

Integrate[1/t Exp[-u^2/t^2],{u,-x,∞},Assumptions->t>0]

Limit[(1/2) (Sqrt[π]) (1+Erf[(x/t)]),t->0]

Plots of Limits

Limit[#,t->0]&/@{
1/2+1/Pi ArcTan[x/t],
1/2 Erfc[-x/t],
1/2+1/Pi SinIntegral[Pi x/t],
1/(1+Exp[-x/t]),
Exp[-Exp[-x/t]],
(1+Tanh[x/t])/2
}

(lim_(t->0)) ((((tan^(-1))((x/t)))/π)+(1/2))

Limit[1/2+1/Pi ArcTan[x/t],t->0]

Simplify[%,x∈Reals]

Plot[((x+(Sqrt[(x^2)]))/(2 x)),{x,-2,2},PlotStyle->Red]

(lim_(t->0)) (∫_(-x)^∞)(1/t)exp(-((u^2)/(t^2)))du

Integrate[(t^(-1))Exp[-(u^2)/(t^2)],{u,-x,∞},Assumptions->t>0]

Limit[%,t->0]

(1/2) (lim_(t->0)) erfc(-(x/t))

(1/2)Limit[Erfc[-(x/t)],t->0]

(lim_(t->0)) (∫_(-∞)^x)∫((sinc((u/t)))/t)du

Integrate[(t^(-1))Sinc[(u/t)],{u,-∞,x},Assumptions->t>0]

Limit[(π/2)+SinIntegral[(x/t)],t->0]

(lim_(t->0)) (∫_(-∞)^x)((sinc((u/t)))/u)du

Integrate[(1/u)Sinc[(u/t)],{u,-∞,x},Assumptions->t>0&&x∈Reals]

(((lim_(t->0)) Si(((π x)/t)))/π)+(1/2)

(1/2)+(1/π)Limit[SinIntegral[((π x)/t)],t->0]

(lim_(t->0)) Piecewise[(({{(1/2) exp((x/t)), x≤0}, {1-(1/2) exp(-(x/t)), x≥0}}))]

Limit[Piecewise[{{Exp[x/t]/2,x≤0},{1-Exp[-x/t]/2,x≥0}}],t->0]

(lim_(t->0)) (1/(exp(-(x/t))+1))

Limit[(1/(1+Exp[-x/t])),t->0]

(1/2) ((lim_(t->0)) (tanh((x/t))+1))

(1/2)Limit[1+Tanh[(x/t)],t->0]

(lim_(t->0)) (∫_(-∞)^x)UnitTriangle(((x-(t/2))/t))dx

Integrate[UnitTriangle[((x-1/2t)/t)],{x,-∞,x}]

Plots

Plots[f_,x_,t_]:=Plot[Function[{x,t},f][x,#]&/@{.2,.15,.1,.05,.01,.005},{x,-1,1},PlotStyle->{Red,Orange,Yellow,Green,Blue,Purple},Evaluated->True,AxesLabel->{x,HoldForm[Limit[f,t->0]]}]

GraphicsGrid[Partition[Plots[#,x,t]&/@{
1/2+1/Pi ArcTan[x/t],
1/2 Erfc[-x/t],
1/2+1/Pi SinIntegral[Pi x/t],
Piecewise[{{Exp[x/t]/2,x≤0},{1-Exp[-x/t]/2,x>0}}],
1/(1+Exp[-x/t]),
Exp[-Exp[-x/t]],
(1+Tanh[x/t])/2
},3,3,{1,1},{}],ImageSize->850,Spacings->{-50,Automatic}]

1/Sqrt[Pi]Integrate[1/t Exp[-u^2/t],{u,-x,Infinity}]

FullSimplify[D[(Erf[x/t]+1)/2,x]]

1/Sqrt[Pi]Integrate[Exp[-u^2/t^2]/t,{u,-x,Infinity}]

Plot[(Erf[x/t]+1)/2 /. t-> .1,{x,-1,1}]

(∫_(-∞)^x)((sinc((u/t)))/((t u)/t))du

Sin[u/t]/(u/t)/t

Integrate[Sin[u/t]/u,{u,-Infinity,x}]

plots[Integrate[Sin[u/t]/u,{u,-Infinity,x}],{x,t}]

Show[%11,DisplayFunction->$DisplayFunction,PlotRange->{{-1,1},Pi{-.1,1.1}}]

Simplify[{1/2-1/2(1-Exp[x/t]),1/2+1/2(1-Exp[-x/t])}]

f[x_ /; x<=0]:=Exp[x/t]/2
f[x_ /; x>0]:=1-Exp[-x/t]/2

Plot[f[x] /. t->.01,{x,-1,1}]

plots[1/2+Sign[x]1/2(1-Exp[-Sign[x]x/t]),{x,t},DisplayFunction->$DisplayFunction,
PlotRange->{{-1,1},{-.1,1}}]

Show[GraphicsArray[partition[{
		plots[1/2+1/Pi ArcTan[x/t],{x,t}],
		plots[1/2 Erfc[-x/t],{x,t}],
		plots[1/2+1/Pi SinIntegral[Pi x/t],{x,t}],
	  plots[NIntegrate[Sin[u/t]/(u/t)/t,{u,-Infinity,x}],{x,t}],
			plots[Sign[x]/2(1-Exp[x/t]),{x,t}]
		},3]]]

plots[Sign[x]/2(1-Exp[-x/t]),{x,t}]