Heaviside
Heaviside step function
Calling Sequence
Parameters
Description
Examples
Heaviside(x)
x
-
algebraic expression understood to be real
The Heaviside function is the step function,
0x<0undefinedx=010<x
where x is understood to be real. Regarding the value of Heaviside at 0, Maple implements the following convention: Heaviside(0) returns undefined and signals the invalid_operation numeric event. You can change this behavior by catching this event. For details, see NumericEvent and the Examples section below.
The Heaviside function is also the anti-derivative of Dirac in that
ⅆⅆxHeaviside⁡x=Dirac⁡x
The Heaviside and Dirac functions are frequently used in the context of integral transforms, for example, laplace, mellin, or fourier, or in formulations involving differential equation solutions. These functions are also particularly relevant in Theoretical Physics, for example in Quantum Mechanics.
When converting Heaviside to piecewise you may want to have the conversion performed taking Heaviside(0) = 1. For that purpose set the Environment Variable _EnvUseHeavisideAsUnitStep to true - see the example in the next section.
diff⁡Heaviside⁡x,x
Dirac⁡x
Heaviside⁡4
1
Heaviside⁡−24
0
By default, the value of Heaviside at zero is undefined.
Heaviside⁡0
undefined
Convert the Heaviside function to a piecewise function.
convert⁡Heaviside⁡x,piecewise
3⁢Heaviside⁡x
convert⁡3⁢Heaviside⁡x,piecewise
0x<0undefinedx=030<x
convert⁡int⁡Heaviside⁡x,x,piecewise
0x<0undefinedx=0x0<x
To perform this conversion taking Heaviside(0) = 1 you can set a related handler.
NumericEventHandler⁡invalid_operation=`Heaviside/EventHandler`⁡value_at_zero=1:
Heaviside⁡x=convert⁡Heaviside⁡x,piecewise
Heaviside⁡x=0x<010≤x
To set the value of Heaviside(0) to 12 or any other numerical value, replace 1 by this value in the NumericEventHandler input line above. The invalid_operation event handler can be reset as follows.
NumericEventHandler⁡invalid_operation=default:
For the particular case of computing with Heaviside representing a unit step, that is Heaviside(0) = 1, an alternative to setting a handler is to set the value of the Environment variable as seen below.
_EnvUseHeavisideAsUnitStep≔true
_EnvUseHeavisideAsUnitStep≔_EnvUseHeavisideAsUnitStep
See Also
convert/piecewise
Dirac
inttrans[fourier]
inttrans[laplace]
inttrans[mellin]
NumericEvent
Download Help Document