### 10.1.7 Replacing signum with Heaviside step function and vice versa

The sign2Heaviside command rewrites signum function (see Section 8.3.2) to Heaviside step function (see Section 8.3.2) in an expression by using the identity sign(x)=2θ(x)−1.

- sign2Heaviside takes expr, an expression.
- sign2Heaviside(expr) returns expr with all instances of signum function replaced according to the above formula.

The Heaviside2sign command has the same syntax but does the opposite of sign2Heaviside, i.e. it replaces all instances of Heaviside function by signum according to the identity θ(x)=sign(x)+1/2.