Algosim documentation: Heaviside

Heaviside

The Heaviside step function.

Syntax

Description

The Heaviside step function is defined by

               ⎧ 0   if x < 0
Heaviside(x) = ⎨ .5  if x = 0
               ⎩ 1   if x > 0.

Notes

Although most authors agree on Heaviside(x) on ℝ ∖ {0}, the value of Heaviside(0) is not universally agreed upon. Other options include 0, 1, and undefined. (713 is exceedingly uncommon, though.) In most applications, the value at the origin is insignificant because {0} has measure zero.

If you use this function frequently, you might want to assign it to H, Θ, or some other brief symbol.

Examples

H ≔ Heaviside; ∫(H(x)⋅x^2, x, −1, 1)
0.3333333334

See also