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.

Dirac delta and Heaviside theta functions.

Here is a function concentrated around x==0:

Plot[Sqrt[50/Pi] Exp[-50 x^2],{x,-2,2},PlotRange->All]

As n gets larger, the functions become progressively more concentrated:

Plot[Evaluate[Sqrt[n/Pi] Exp[-n x^2]/.n->{1,10,100}],{x,-2,2},PlotRange->All]

For any n>0, their integrals are nevertheless always equal to 1:

Integrate[Sqrt[n/Pi] Exp[-n x^2],{x,-Infinity,Infinity},Assumptions->n>0]

The limit of the functions for infinite n is effectively a Dirac delta function, whose integral is again 1:

Integrate[DiracDelta[x],{x,-Infinity,Infinity}]

(RefLink[DiracDelta, paclet:ref/DiracDelta]) evaluates to 0 at all real points except x==0:

Table[DiracDelta[x],{x,-3,3}]

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 f with argument 2:

Integrate[DiracDelta[x-2] f[x],{x,-4,4}]

Here is a slightly more complicated example:

Integrate[DiracDelta[x^2-x-1],{x,0,2}]

This effectively counts the number of zeros of cos(x) in the region of integration:

Integrate[DiracDelta[Cos[x]],{x,-30,30}]

The Heaviside function (RefLink[HeavisideTheta, paclet:ref/HeavisideTheta])[x] is the indefinite integral of the delta function. It is variously denoted H(x), θ(x), μ(x), and U(x). As a generalized function, the Heaviside function is defined only inside an integral. This distinguishes it from the unit step function (RefLink[UnitStep, paclet:ref/UnitStep])[x], which is a piecewise function.

The indefinite integral of the delta function is the Heaviside theta function:

Integrate[DiracDelta[x],x]

The value of this integral depends on whether a lies in the interval (-2,2):

Integrate[f[x] DiracDelta[x-a],{x,-2,2},Assumptions->a ∈ Reals]

(RefLink[DiracDelta, paclet:ref/DiracDelta]) and (RefLink[HeavisideTheta, paclet:ref/HeavisideTheta]) often arise in doing integral transforms.

The Fourier transform of a constant function is a delta function:

FourierTransform[1,t,ω]

The Fourier transform of cos(t) involves the sum of two delta functions:

FourierTransform[Cos[t],t,ω]

Dirac delta functions can be used in (RefLink[DSolve, paclet:ref/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 t==0:

DSolve[{x''[t]+r x[t]==DiracDelta[t],x[0]==0,x'[0]==1},x[t],t]/.{HeavisideTheta[0]-> 1}

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:

D[HeavisideTheta[x,y,z],x]

Related to the multidimensional Dirac delta function are two integer functions: discrete delta and Kronecker delta. Discrete delta δ((Subscript[n, 1]),(Subscript[n, 2]),…) is 1 if all the (Subscript[n, i])==0, and is zero otherwise. Kronecker delta (Subscript[δ, (Subscript[n, 1])(Subscript[n, 2])…]) is 1 if all the (Subscript[n, i]) are equal, and is zero otherwise.

Integer delta functions.