Function reference · Math

heaviside

Returns the Heaviside step: 0 for negative values, 1/2 at zero, and 1 for positive values.

For a symbol, assumptions can decide it. Compare step, which is 1 at zero.

Notation

heaviside(args)

Write it in an expression: nerdamer('heaviside(-2)'), or in the Playground.

nerdamer.heaviside

nerdamer.heaviside(...args: [x]): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

Negative.

heaviside(-2)
// → 0
Open in Playground

1/2 at zero.

heaviside(0)
// → 1/2
Open in Playground

Positive.

heaviside(3)
// → 1
Open in Playground

With an assumption.

assume(x>0); heaviside(x)
// → 1
Open in Playground

← Back to Function reference