DiracDelta[x]
represents the Dirac delta function
.
DiracDelta[x1,x2,…]
represents the multidimensional Dirac delta function
.
DiracDelta
DiracDelta[x]
represents the Dirac delta function
.
DiracDelta[x1,x2,…]
represents the multidimensional Dirac delta function
.
Details
- DiracDelta[x] returns 0 for all real numeric x other than 0.
- DiracDelta can be used in integrals, integral transforms, and differential equations.
- Some transformations are done automatically when DiracDelta appears in a product of terms.
- DiracDelta[x1,x2,…] returns 0 if any of the xi are real numeric and not 0.
- DiracDelta has attribute Orderless.
- For exact numeric quantities, DiracDelta internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
Examples
open all close allBasic Examples (3)
DiracDelta vanishes for nonzero arguments:
DiracDelta[1 / 2]DiracDelta stays unevaluated for
:
DiracDelta[0]Plot over a subset of the reals:
Plot[DiracDelta[x], {x, -2, 2}, AxesOrigin -> {0, -1}]Use DiracDelta in an integral:
Integrate[DiracDelta[x] Cos[x], {x, -Infinity, Infinity}]Scope (22)
Numerical Evaluation (4)
DiracDelta[-1]DiracDelta[Pi, 8, 1 / 3]DiracDelta always returns an exact 0:
DiracDelta[.1]DiracDelta[.1435345345678990]Evaluate efficiently at high precision:
DiracDelta[1 / 74, 1 / 8, 1 / 3`100]//TimingDiracDelta[1 / 9, 1 / 8, 1 / 3`10000000];//TimingDiracDelta threads over lists:
DiracDelta[{-.5, 0, .5}]Specific Values (3)
As a distribution, DiracDelta does not have a specific value at 0:
DiracDelta[0]DiracDelta[∞]DiracDelta[-∞]FunctionExpand[DiracDelta[x ^ 5 - 1]]FunctionExpand[DiracDelta[x, y]]Function Properties (4)
Function domain of DiracDelta:
FunctionDomain[DiracDelta[x], x]It is restricted to real arguments:
FunctionDomain[DiracDelta[z], z, Complexes]DiracDelta is an even function:
DiracDelta[-x]DiracDelta has unit area despite being zero everywhere except the origin:
Integrate[DiracDelta[x], {x, -∞, ∞}]TraditionalForm formatting:
DiracDelta[x]//TraditionalFormDifferentiation (3)
DiracDelta is differentiable, but its derivative does not have a special name:
D[DiracDelta[x], x]Differentiate the multivariate DiracDelta:
D[DiracDelta[x, y, z], y]Differentiate a composition involving DiracDelta:
D[DiracDelta[x, f[y], z], y]Integration (4)
Integrate[DiracDelta[x], x]Integrate over finite domains:
Integrate[DiracDelta[x - a], {x, 0, y}, Assumptions -> a∈ℝ && y > 0]Integrate[DiracDelta[x Cos[x]], {x, -5, 5}]Integrate over infinite domains:
Integrate[DiracDelta[x - a] f[x], {x, -∞, ∞}, Assumptions -> a∈Reals]Integrate[DiracDelta[x ^ 2 + x Cos[x]], {x, -∞, ∞}]Integrate expressions containing derivatives of DiracDelta:
Integrate[DiracDelta'''[x - a] f[x], {x, -Infinity, Infinity}, Assumptions -> a∈Reals]Integral Transforms (4)
Find the FourierTransform of DiracDelta:
FourierTransform[DiracDelta[x], x, t]Find the FourierTransform of a shifted DiracDelta:
FourierTransform[DiracDelta[x - a], x, t]Find the LaplaceTransform of DiracDelta:
LaplaceTransform[DiracDelta[x - a], x, t]Find the MellinTransform of DiracDelta:
MellinTransform[DiracDelta[x - a], x, t]DiracDelta is the identity element of Convolve:
Convolve[f[x], DiracDelta[x], x, y]Applications (8)
Find classical harmonic oscillator Green function:
gf[z_] = w[z] /. DSolve[{w''[z] + k^2 w[z] == DiracDelta[z], w[0] == 0, w'[0] == 1}, w[z], z][[1]] /. {HeavisideTheta[0] -> 1}Solve the inhomogeneous ODE through convolution with Green's function:
ds = Integrate[gf[z - ζ]Exp[-ζ], {ζ, 0, z}, Assumptions -> z > 0]Compare with the direct result from DSolve:
gf[z_] = w[z] /. First[DSolve[{w''[z] + k^2 w[z] == Exp[-z], w[0] == 0, w'[0] == 0}, w[z], z]] //SimplifyDefine a functional derivative:
𝒟[functional_, f_[y_]] := Assuming[ Element[y, Reals],
Limit[((functional /. f :> Function[x, f[x] +
ε DiracDelta[x - y]]) - functional) / ε, ε -> 0]]Calculate the functional derivative for an example functional:
𝒟[f[x]^2, f[y]]Calculate the phase space volume of a harmonic oscillator:
Integrate[DiracDelta[q ^ 2 + p ^ 2 - 1], {q, -∞, ∞}, {p, -∞, ∞}]Find the distribution for the third power of a normally distributed random variable:
Assuming[μ ∈Reals && σ > 0 && y∈Reals, FullSimplify[Integrate[PDF[NormalDistribution[μ, σ], x]DiracDelta[x ^ 3 - y], {x, -∞, ∞}, Assumptions -> μ∈Reals && σ > 0 && y∈Reals]]]Plot[% /. {μ -> 0, σ -> 1}, {y, -3, 3}]Fundamental solution of the Klein–Gordon operator
:
𝒟[t_, x_List] := (1/2π)HeavisideTheta[t]DiracDelta[t^2 - x.x] - (m/4π)HeavisideTheta[t - Sqrt[x.x]](BesselJ[1, mSqrt[t^2 - x.x]]/Sqrt[t^2 - x.x])Visualize the fundamental solution. It is nonvanishing only in the forward light cone:
Plot3D[-𝒟[t, {0, 0, z}] /. m -> 1, {z, -3, 3.02}, {t, -3, 3.01}, Exclusions -> {{t ^ 2 == z ^ 2, t ≥ 0}}]A cusp‐containing solution of the Camassa–Holm equation:
chOp[x_, t_] := (Subscript[∂, t]# - Subscript[∂, x, x, t]# + 3 # Subscript[∂, x]# - 2 Subscript[∂, x]# Subscript[∂, x, x]# - # Subscript[∂, x, x, x]#)&u[x_, t_] := Exp[-(x - t)(HeavisideTheta[x - t] - HeavisideTheta[t - x])]Higher derivatives will contain DiracDelta:
D[u[x, t], x, x]//FullSimplifyPlot the solution and its derivative:
{Plot3D[u[x, t] , {x, -3, 3}, {t, 0, 3}], Plot3D[Evaluate[D[u[x, t], x, t]] , {x, -3, 3}, {t, 0, 3}]}//QuietDifferentiate and integrate a piecewise defined function in a lossless manner:
pwF[x_] := 2HeavisideTheta[x - 1] - 2HeavisideTheta[-x - 1]Plot[pwF[x], {x, -3, 3}]Differentiating and integrating recovers the original function:
D[pwF[x], x]Integrate[%, x]Using Piecewise does not recover the original function:
pwF2[x_] = PiecewiseExpand[pwF[x] /. HeavisideTheta -> UnitStep]D[pwF2[x], x]Integrate[%, x]Solve a classical second‐order initial value problem:
DSolve[{y''[x] + y[x] == Sin[x], y[0] == y0, y'[0] == y1}, y[x], x]//SimplifyIncorporate the initial values in the right‐hand side through derivatives of DiracDelta:
DSolve[{y''[x] + y[x] == HeavisideTheta[x] Sin[x] + y0 DiracDelta'[x] + y1 DiracDelta[x]}, y[x], x] /. _C -> 0 //Simplify[#, x > 0]&Properties & Relations (4)
Expand DiracDelta into DiracDelta with linear arguments:
DiracDelta[x ^ 3 + x ^ 2 + 1]//FunctionExpandSimplify expressions containing DiracDelta:
{x DiracDelta[x], x DiracDelta'[x]}Simplify[%]FourierTransform[DiracDelta[y], y, x]InverseFourierTransform[%, y, x]LaplaceTransform[DiracDelta[x], x, s]InverseLaplaceTransform[%, s, x]Possible Issues (8)
Only HeavisideTheta gives DiracDelta after differentiation:
{HeavisideTheta[x], UnitStep[x], (Sqrt[x ^ 2] / x + 1) / 2, (Abs[x] / x + 1) / 2}Plot[#, {x, -1, 1}]& /@ %D[%%, x] // TogetherThis also holds for the multivariate case:
(D[#, x, x] + D[#, y, y] + D[#, z, z])&[(1/Sqrt[x^2 + y^2 + z^2])]//TogetherDiracDelta[0] is not an "infinite" quantity:
DiracDelta[0] > 20DiracDelta can stay unevaluated for numeric arguments:
DiracDelta[-1 - 2 E - E^2 + (1 + E)^2 + Exp[-Exp[E] ^ 2] ]Simplify[%]Products of distributions with coinciding singular support cannot be defined:
Integrate[HeavisideTheta[x] DiracDelta[x], {x, -1, 1}]Integrate[Sqrt[DiracDelta[x] ^ 2], {x, -1, 1}]DiracDelta cannot be uniquely defined with complex arguments:
DiracDelta[1 + 2I]Numerical routines will typically miss the contributions from measures at single points:
NIntegrate[DiracDelta[x], {x, -2, 1}]Limit does not produce DiracDelta as a limit of smooth functions:
Limit[ε / (x ^ 2 + ε ^ 2), ε -> 0]Integrate never gives DiracDelta as an integral of smooth functions:
Integrate[Exp[I k x], {x, -∞, ∞}, Assumptions -> k∈Reals]FourierTransform can give DiracDelta:
FourierTransform[Exp[I k x], x, y]Neat Examples (1)
Calculate the moments of a Gaussian bell curve:
moment[n_ ? EvenQ] := Integrate[x^n E^-x^2, {x, -∞, ∞}, Assumptions -> n ≥ 0]Do it using the dual Taylor expansion expressed in derivatives of DiracDelta:
dualMoment[n_ ? EvenQ] := Integrate[ x^n(Sqrt[π]/2^n(n / 2)!)Derivative[n][DiracDelta][x], {x, -∞, ∞}]The two sequences of moments are identical:
Table[{moment[n], dualMoment[n]}, {n, 0, 10, 2}]See Also
HeavisideTheta DiracComb Convolve PrincipalValue Limit KroneckerDelta DiscreteDelta GreenFunction
Function Repository: DiracMatrix
Tech Notes
Related Guides
Related Links
History
Introduced in 1999 (4.0)
Text
Wolfram Research (1999), DiracDelta, Wolfram Language function, https://reference.wolfram.com/language/ref/DiracDelta.html.
CMS
Wolfram Language. 1999. "DiracDelta." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiracDelta.html.
APA
Wolfram Language. (1999). DiracDelta. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiracDelta.html
BibTeX
@misc{reference.wolfram_2026_diracdelta, author="Wolfram Research", title="{DiracDelta}", year="1999", howpublished="\url{https://reference.wolfram.com/language/ref/DiracDelta.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_diracdelta, organization={Wolfram Research}, title={DiracDelta}, year={1999}, url={https://reference.wolfram.com/language/ref/DiracDelta.html}, note=[Accessed: 12-June-2026]}