Generalized Functions and Related Objects

In many practical situations it is convenient to consider limits in which a fixed amount of something is concentrated into an infinitesimal region. Ordinary mathematical functions of the kind normally encountered in calculus cannot readily represent such limits. However, it is possible to introduce generalized functions or distributions which can represent these limits in integrals and other types of calculations.

DiracDelta[x]Dirac delta function
HeavisideTheta[x]Heaviside theta function , equal to 0 for and 1 for

Dirac delta and Heaviside theta functions.

Here is a function concentrated around .
In[1]:=
Click for copyable input
Out[1]=
As gets larger, the functions become progressively more concentrated.
In[2]:=
Click for copyable input
Out[2]=
For any , their integrals are nevertheless always equal to 1.
In[3]:=
Click for copyable input
Out[3]=
The limit of the functions for infinite is effectively a Dirac delta function, whose integral is again 1.
In[4]:=
Click for copyable input
Out[4]=
DiracDelta evaluates to 0 at all real points except .
In[5]:=
Click for copyable input
Out[5]=

Inserting a delta function in an integral effectively causes the integrand to be sampled at discrete points where the argument of the delta function vanishes.

This samples the function with argument .
In[6]:=
Click for copyable input
Out[6]=
Here is a slightly more complicated example.
In[7]:=
Click for copyable input
Out[7]=
This effectively counts the number of zeros of in the region of integration.
In[8]:=
Click for copyable input
Out[8]=

The Heaviside function HeavisideTheta[x] is the indefinite integral of the delta function. It is variously denoted , , , and . As a generalized function, the Heaviside function is defined only inside an integral. This distinguishes it from the unit step function UnitStep[x], which is a piecewise function.

The indefinite integral of the delta function is the Heaviside theta function.
In[9]:=
Click for copyable input
Out[9]=
The value of this integral depends on whether lies in the interval .
In[10]:=
Click for copyable input
Out[10]=

DiracDelta and HeavisideTheta often arise in doing integral transforms.

The Fourier transform of a constant function is a delta function.
In[11]:=
Click for copyable input
Out[11]=
The Fourier transform of involves the sum of two delta functions.
In[12]:=
Click for copyable input
Out[12]=

Dirac delta functions can be used in DSolve to find the impulse response or Green's function of systems represented by linear and certain other differential equations.

This finds the behavior of a harmonic oscillator subjected to an impulse at .
In[13]:=
Click for copyable input
Out[13]=
DiracDelta[x1,x2,...]multidimensional Dirac delta function
HeavisideTheta[x1,x2,...]multidimensional Heaviside theta function

Multidimensional Dirac delta and Heaviside theta functions.

Multidimensional generalized functions are essentially products of univariate generalized functions.

Here is a derivative of a multidimensional Heaviside function.
In[14]:=
Click for copyable input
Out[14]=

Related to the multidimensional Dirac delta function are two integer functions: discrete delta and Kronecker delta. Discrete delta is 1 if all the , and is zero otherwise. Kronecker delta is 1 if all the are equal, and is zero otherwise.

DiscreteDelta[n1,n2,...]discrete delta
KroneckerDelta[n1,n2,...]Kronecker delta

Integer delta functions.

New to Mathematica? Find your learning path »
Have a question? Ask support »