This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# UnitStep

 UnitStep[x]represents the unit step function, equal to 0 for and 1 for . UnitSteprepresents 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:
 Out[1]=

 Out[1]=
 Out[2]=

Use UnitStep to construct piecewise functions:
 Out[1]=
 Scope   (4)
The precision of the output does not track the precision of the input:
UnitStep can deal with real-valued intervals:
Multidimensional UnitStep:
 Applications   (6)
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