Dirac - Maple Programming Help

Dirac

Dirac delta function

 Calling Sequence Dirac(x) Dirac(n, x) Dirac([x1,x2,...,xk]) Dirac([n1,n2,...,nk], [x1,x2,...,xk]) The above represents: the one-dimensional Dirac delta function, the nth derivative of that Dirac function, the k-dimensional Dirac function in Cartesian coordinates, and the partial derivative of order $\mathrm{n1}$ w.r.t. $\mathrm{x1}$ ... $\mathrm{nk}$ w.r.t. $\mathrm{xk}$ of that k-dimensional function.

Parameters

 x - algebraic expression understood to be real n - non-negative integer [x1, x2, ..., xk] - list of algebraic expressions, used when representing a multidimensional Dirac [n1, n2, ..., nk] - list of algebraic expressions having for domain the non-negative integers, used when representing a multidimensional Dirac

Description

 • The Dirac command allows for a compact representation of an n-dimensional Dirac delta function, defined in terms of the product of one-dimensional Dirac functions by

$\mathrm{Dirac}\left(\left[\mathrm{x1},\mathrm{x2},\mathrm{...},\mathrm{xk}\right]\right)=\mathrm{Dirac}\left(\mathrm{x1}\right)\mathrm{Dirac}\left(\mathrm{x2}\right)\mathrm{...}\mathrm{Dirac}\left(\mathrm{xk}\right)$

 where the arguments of the Dirac functions on the right-hand side are understood to be real. To obtain the representations on the left or right-hand sides respectively use the combine and expand commands.
 • In the one-dimensional case, the Dirac 'function' represents a distribution, that is, an object defined not by establishing the relation between the values of the function and those of its argument, but by establishing the rule for integrating its product with sufficiently regular functions. The Dirac function is then defined through

${\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}\mathrm{Dirac}\left(x\right)f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx=f\left(0\right)$

 By a sufficiently regular function, it is meant one that does not vary significantly over an interval of infinitesimal length epsilon around x = 0, or, more strictly, a function that is infinitely differentiable in some open neighborhood of 0.
 • More generally, and for arbitrary real integration limits a and b,

${\int }_{a}^{b}\mathrm{Dirac}\left(x-\mathrm{x0}\right)f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx=\left\{\begin{array}{cc}f\left(\mathrm{x0}\right)& \mathrm{if x0 belongs to the open interval \right]a,b\left[}\\ \frac{f\left(\mathrm{x0}\right)}{2}& \mathrm{if x0=a, or x0=b, and}a

 where by open interval ]a, b[, it is meant the set of real numbers lying between and excluding the endpoints a and b, with a < b.
 • An explicit, formal, definition of the Dirac delta function is given by its integral representation, constructed as an inverse fourier transform:
 $\left[{\mathrm{Dirac}}{}\left({x}\right){=}\frac{{{\int }}_{{-}{\mathrm{\infty }}}^{{\mathrm{\infty }}}{{ⅇ}}^{{I}{}{\mathrm{_k1}}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_k1}}}{{2}{}{\mathrm{\pi }}}{,}{\mathrm{with no restrictions on}}{}\left({x}\right)\right]$ (1)
 • Some possible alternative representations for the Dirac(x) delta function are
 > piecewise(And(-epsilon/2 < x, x < epsilon/2), 1/epsilon, abs(x) > epsilon/2, 0);
 $\left\{\begin{array}{cc}\frac{{1}}{{\mathrm{\epsilon }}}& {-}\frac{{\mathrm{\epsilon }}}{{2}}{<}{x}{\wedge }{x}{<}\frac{{\mathrm{\epsilon }}}{{2}}\\ {0}& \frac{{\mathrm{\epsilon }}}{{2}}{<}\left|{x}\right|\end{array}\right\$ (2)
 > 1/(2*epsilon)*exp(-abs(x)/epsilon);
 $\frac{{{ⅇ}}^{{-}\frac{\left|{x}\right|}{{\mathrm{\epsilon }}}}}{{2}{}{\mathrm{\epsilon }}}$ (3)
 > 1/(Pi)*epsilon/(x^2+epsilon^2);
 $\frac{{\mathrm{\epsilon }}}{{\mathrm{\pi }}{}\left({{\mathrm{\epsilon }}}^{{2}}{+}{{x}}^{{2}}\right)}$ (4)
 > 1/(Pi)*sin(x/epsilon)/x;
 $\frac{{\mathrm{sin}}{}\left(\frac{{x}}{{\mathrm{\epsilon }}}\right)}{{\mathrm{\pi }}{}{x}}$ (5)
 where in all these formulas epsilon represents a sufficiently small real number. In practical applications, as soon as epsilon becomes negligible compared to the distances involved in the problem, it becomes impossible to distinguish between these alternative representations and the usual definition of Dirac as a distribution. In the opposite case, the use of Dirac in the formulation of a problem may be inconvenient, and replacing Dirac(x) by any of these alternative or analogous but more regular representations, with an extremely small epsilon but not strictly zero, may be appropriate.
 • Some basic properties of the Dirac function are
 > 'Dirac(-x)' = Dirac(-x);
 ${\mathrm{Dirac}}{}\left({-}{x}\right){=}{\mathrm{Dirac}}{}\left({x}\right)$ (6)
 > Dirac(c*x) = 1/abs(c)*Dirac(x);
 ${\mathrm{Dirac}}{}\left({c}{}{x}\right){=}\frac{{\mathrm{Dirac}}{}\left({x}\right)}{\left|{c}\right|}$ (7)
 and, more generally:
 > Dirac(g(x)) = Sum(1/abs(D(g)(rho[j]))*Dirac(x-rho[j]),j = 1 .. N);
 ${\mathrm{Dirac}}{}\left({g}{}\left({x}\right)\right){=}{\sum }_{{j}{=}{1}}^{{N}}{}\frac{{\mathrm{Dirac}}{}\left({x}{-}{{\mathrm{\rho }}}_{{j}}\right)}{\left|{\mathrm{D}}{}\left({g}\right){}\left({{\mathrm{\rho }}}_{{j}}\right)\right|}$ (8)
 where rho[j] represents any real and simple zero of g(x) and N is the number of zeros (roots). Note: if g(x) has multiple zeros (hence g' at rho[j] is equal to 0 for some j), the expression Dirac(g(x)) is meaningless.
 The following identity is relevant
 > g(x)*Dirac(x-x0) = g(x0)*Dirac(x-x0);
 ${g}{}\left({x}\right){}{\mathrm{Dirac}}{}\left({x}{-}{\mathrm{x0}}\right){=}{g}{}\left({\mathrm{x0}}\right){}{\mathrm{Dirac}}{}\left({x}{-}{\mathrm{x0}}\right)$ (9)
 so that taking $\mathrm{x0}=0$ we see that the equation $xu\left(x\right)=0$ has for solution $u\left(x\right)=c\mathrm{Dirac}\left(x\right)$, where $c$ is an arbitrary constant.
 • A relevant formula in applications in physics is the fourier transform of Dirac(x)
 > Int(Dirac(x-x0)*exp(-I*x*p), x = -infinity .. infinity) = inttrans[fourier](Dirac(x-x0), x, p);
 ${{\int }}_{{-}{\mathrm{\infty }}}^{{\mathrm{\infty }}}{\mathrm{Dirac}}{}\left({x}{-}{\mathrm{x0}}\right){}{{ⅇ}}^{{-I}{}{x}{}{p}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{{ⅇ}}^{{-I}{}{\mathrm{x0}}{}{p}}$ (10)
 • Derivatives of the Dirac function are denoted by the two-argument Dirac function. In the one-dimensional case, the first argument denotes the order of the derivative. For example, diff(Dirac(x), x\$n) is automatically represented by Dirac(n, x) for any integer n.
 Starting with the definition of Dirac(x) and integrating by parts, the derivative of Dirac(x) is defined as

${\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}\mathrm{Dirac}\left(1,x\right)f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx=-\mathrm{D}\left(f\right)\left(0\right)$

 and is an odd function of x
 > 'Dirac(1,-x)' = Dirac(1,-x);
 ${\mathrm{Dirac}}{}\left({1}{,}{-}{x}\right){=}{-}{\mathrm{Dirac}}{}\left({1}{,}{x}\right)$ (11)
 also satisfying
 > x*Dirac(1,x) = -Dirac(x);
 ${x}{}{\mathrm{Dirac}}{}\left({1}{,}{x}\right){=}{-}{\mathrm{Dirac}}{}\left({x}\right)$ (12)
 More generally,

${\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}\mathrm{Dirac}\left(n,x\right)f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx={\left(-1\right)}^{n}\left({\mathrm{D}}^{\left(n\right)}\right)\left(f\right)\left(0\right)$

 where n represents a non-negative integer.
 • An explicit, formal, definition of the derivative of the Dirac delta function is given by its integral representation:
 $\left[{\mathrm{Dirac}}{}\left({n}{,}{x}\right){=}\frac{{{\int }}_{{-}{\mathrm{\infty }}}^{{\mathrm{\infty }}}{{ⅇ}}^{{I}{}{\mathrm{_k1}}{}{x}}{}{\left({I}{}{\mathrm{_k1}}\right)}^{{n}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_k1}}}{{2}{}{\mathrm{\pi }}}{,}{\mathrm{with no restrictions on}}{}\left({n}{,}{x}\right)\right]$ (13)
 • In the multidimensional case, Dirac is still a function of two arguments, each one being a list, both lists having the same number of operands, the first one containing non-negative integers representing the differentiation order with respect to each of the operands of the second list. This is a natural generalization of the one-dimensional case. In both cases, the differentiation order could also be represented by an arbitrary algebraic expression, whose domain is supposed to be the non-negative integers.
 • The Heaviside function is the anti-derivative of Dirac in that

$\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}Heaviside\left(x\right)=\mathrm{Dirac}\left(x\right)$

 • These functions are frequently used in the context of integral transforms, for example, laplace, mellin, or fourier, or theoretical physics, for example, in quantum mechanics - see ref.[1] at the end.

Examples

One-dimensional case: basic property related to definite integrals

 > ${{∫}}_{-\mathrm{∞}}^{\mathrm{∞}}\mathrm{Dirac}\left(x\right)f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}x$
 ${{\int }}_{{-}{\mathrm{\infty }}}^{{\mathrm{\infty }}}{\mathrm{Dirac}}{}\left({x}\right){}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (14)
 > $\mathrm{value}\left(\right)$
 ${f}{}\left({0}\right)$ (15)
 > $\frac{ⅆ}{ⅆx}\mathrm{Dirac}\left(x\right)$
 ${\mathrm{Dirac}}{}\left({1}{,}{x}\right)$ (16)

The relation with Heaviside upon indefinite integration

 > $∫\mathrm{Dirac}\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$
 ${\mathrm{Heaviside}}{}\left({x}\right)$ (17)
 > $\frac{\partial }{\partial x}$
 ${\mathrm{Dirac}}{}\left({x}\right)$ (18)

Note that this relation does not fix the value of Heaviside at zero.

Multidimensional case: basic properties

 > $\mathrm{Dirac}\left(\left[x,y,z\right]\right)$
 ${\mathrm{Dirac}}{}\left(\left[{x}{,}{y}{,}{z}\right]\right)$ (19)
 > $\mathrm{expand}\left(\right)$
 ${\mathrm{Dirac}}{}\left({x}\right){}{\mathrm{Dirac}}{}\left({y}\right){}{\mathrm{Dirac}}{}\left({z}\right)$ (20)
 > $\mathrm{combine}\left(\right)$
 ${\mathrm{Dirac}}{}\left(\left[{x}{,}{y}{,}{z}\right]\right)$ (21)
 > ${{∫}}_{-\mathrm{∞}}^{\mathrm{∞}}{{∫}}_{-\mathrm{∞}}^{\mathrm{∞}}{{∫}}_{-\mathrm{∞}}^{\mathrm{∞}}f\left(x,y,z\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}x\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}y\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}z$
 ${\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{Dirac}}{}\left(\left[{x}{,}{y}{,}{z}\right]\right){}{f}{}\left({x}{,}{y}{,}{z}\right){,}{x}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{y}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{z}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right)$ (22)
 > $\mathrm{value}\left(\right)$
 ${f}{}\left({0}{,}{0}{,}{0}\right)$ (23)

The derivative of the multidimensional Dirac

 > $\mathrm{Dirac}\left(\left[x,y,z\right]\right)$
 ${\mathrm{Dirac}}{}\left(\left[{x}{,}{y}{,}{z}\right]\right)$ (24)
 > $\frac{{\partial }^{4}}{\partial z\partial {y}^{2}\partial x}$
 ${\mathrm{Dirac}}{}\left(\left[{1}{,}{2}{,}{1}\right]{,}\left[{x}{,}{y}{,}{z}\right]\right)$ (25)
 > $\mathrm{expand}\left(\right)$
 ${\mathrm{Dirac}}{}\left({1}{,}{x}\right){}{\mathrm{Dirac}}{}\left({2}{,}{y}\right){}{\mathrm{Dirac}}{}\left({1}{,}{z}\right)$ (26)
 > $\mathrm{combine}\left(\right)$
 ${\mathrm{Dirac}}{}\left(\left[{1}{,}{2}{,}{1}\right]{,}\left[{x}{,}{y}{,}{z}\right]\right)$ (27)
 > 

References

 Cohen-Tannoudji, C.; Diu, B.; and Laloe, F. Quantum Mechanics, Appendix II. Paris: Hermann, 1977.