This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

UnitStep

UnitStep[x]
represents the unit step function, equal to 0 for and 1 for .
UnitStep
represents the multidimensional unit step function which is 1 only if none of the are negative.
  • Some transformations are done automatically when UnitStep appears in a product of terms.
  • UnitStep provides a convenient way to represent piecewise continuous functions.
  • For exact numeric quantities, UnitStep internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
Evaluate numerically:
Use UnitStep to construct piecewise functions:
Evaluate numerically:
In[1]:=
Click for copyable input
Out[1]=
 
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Use UnitStep to construct piecewise functions:
In[1]:=
Click for copyable input
Out[1]=
The precision of the output does not track the precision of the input:
UnitStep threads element-wise over lists:
UnitStep can deal with real-valued intervals:
TraditionalForm formatting:
Generate a square wave:
Compute a step response for a continuous-time system:
Using transform methods:
Compute a step response for a discrete-time system:
Using transform methods:
Solve the time-independent Schrödinger equation with piecewise analytic potential:
This gives the probability of the random variable being in the interval :
Here is the resulting probability plotted:
Construct the :
Expand into UnitStep of linear factors:
Convert into Piecewise:
Integrate over finite and infinite domains:
Symbolic preprocessing of functions containing UnitStep can be time-consuming:
Limit does not give UnitStep as a limit of smooth functions:
Differentiating Abs does not yield UnitStep:
New in 4