2
$\begingroup$

I want to simplify expressions containing DiracDelta products. For example I want to simplify the expression $$\delta(z-2)\delta(k-5)\delta(t-z-k-9)$$ to give the answer $$\delta(z-2)\delta(k-5)\delta(t-16).$$ I have used Simplify but it doesn't work for me.

$\endgroup$
19
  • $\begingroup$ For example if z==k-3, then this product is not defined at all (see the documentation to DiracDelta). Also the question arises: where do such products appear? $\endgroup$ Commented Oct 21, 2023 at 4:58
  • 3
    $\begingroup$ DiracDelta is a distribution; it is not actually a function (see en.wikipedia.org/wiki/Dirac_delta_function). You can get Mathematica to simplify expressions involving DiracDelta by using it inside Integrate. Here is an example of this: Integrate[f[z, k, t] DiracDelta[z - 2] DiracDelta[k - 5] DiracDelta[t - z - k - 9], {z, z1, z2}, {k, k1, k2}, {t, t1, t2}, Assumptions -> {z2 > z1, k2 > k1, t2 > t1}] which evaluates to give f[2, 5, 16] UnitStep[2 - z1] UnitStep[-2 + z2] UnitStep[5 - k1, -5 + k2, 16 - t1, -16 + t2]. $\endgroup$ Commented Oct 21, 2023 at 8:54
  • 2
    $\begingroup$ I am writing from the point of view of someone who used to do LOTS of theoretical particle physics products-of-DiracDelta manipulations. Simplify[DiracDelta[t-5]/t] simplifies to 1/5 DiracDelta[-5 + t] because Mathematica knows that these two (simple) expressions are equivalent when using DiracDelta as a distribution inside an integral. However, Mathematica does NOT know about all equivalences between distributions involving DiracDelta. $\endgroup$ Commented Oct 21, 2023 at 14:27
  • 2
    $\begingroup$ To define transformation rules that address your problem of simplifying expr = DiracDelta[z-2] DiracDelta[k-5] DiracDelta[t-z-k-9] I would start by defining the rule transf = Times[DiracDelta[Plus[u_,z]], DiracDelta[Plus[v__,z]]] :> Times[DiracDelta[Plus[u,z]], DiracDelta[Plus[v,u]]], and then evaluate expr /. transf to check that it does what you want. The trick to constructing rules is to look at FullForm[expr], and to then use whichever part of expr you want to transform as the lefthand side of the rule, inserting appropriate patterns to make the rule as general as you require. $\endgroup$ Commented Oct 21, 2023 at 15:20
  • 1
    $\begingroup$ I do not automatically use the Wolfram documentation as my primary reference source. If you are unsure about how to handle Dirac delta functions, then simply replace them with a convenient alternative representation such as finite width Gaussian bump functions, do whatever manipulations are needed, then take the limit of zero width. If you are solving physics problems, then this approach makes sense. $\endgroup$ Commented Mar 21, 2024 at 16:23

3 Answers 3

1
$\begingroup$

modified

If we look at a simpler example , with only two unknowns (for reasons of visualization)

DiracDelta[z-2]DiracDelta[k-z]

you would conclude

DiracDelta[z-2]DiracDelta[k-z]=?=DiracDelta[z-2]DiracDelta[k-2]

Numerical visualization shows

dirac = Function[{x, eps}, Exp[-(x^2/(2 eps))]/Sqrt[2 Pi eps]] Plot3D[dirac[z - 2, #] dirac [k - 2, #] - (dirac[z - 2, #] dirac [k - z, #]), {z, 1, 3}, {k,1, 3}, PlotRange -> All, PlotPoints -> 100] &[.01] 

enter image description here

difference (distributial difference) between these two expressions!

Final check

NIntegrate[dirac[z - 2, #] dirac[k - 2, #] - (dirac[z - 2, #] dirac[k - z, #]), {z, 1, 3}, {k, 1,3}, Method -> "LocalAdaptive"] &[.01] (*-1.46645*10^-8*) 

evaluates to zero, though conclusion seems to be is correct!

addendum

Back to your original question:

Catch the arguments of DiracDelta's and force them to be zero

Cases[DiracDelta[z - 2] DiracDelta[k - 5] DiracDelta[t - z - k - 9],DiracDelta[p_] :> p, -1] sol = Solve[% == 0, Variables[%]][[1]] Map[DiracDelta[#] &, sol /. Rule -> Subtract] /. List -> Times (*DiracDelta[-5 + k] DiracDelta[-16 + t] DiracDelta[-2 + z]*) 
$\endgroup$
9
  • $\begingroup$ DiracDelta(z-2) is exactly zero except at z=2. Also DiracDelta(k-z) equals zero except at k=0. Then the whole expression is zero except at k=z=2 and hence the answer is TRUE. $\endgroup$ Commented Oct 21, 2023 at 13:22
  • $\begingroup$ Also you may find the Laplace transform of the expression to verify the answer. $\endgroup$ Commented Oct 21, 2023 at 13:23
  • $\begingroup$ @MohamedMostafa That might be all true. But my visualization shows a "distributional difference" between the two expressions. Not more. $\endgroup$ Commented Oct 21, 2023 at 13:39
  • $\begingroup$ Because you plotted an approximation of it. $\endgroup$ Commented Oct 21, 2023 at 13:46
  • 1
    $\begingroup$ No I got your point. Your conclusion is correct it intergation around the "peak" vanishs. I'll modify my answer $\endgroup$ Commented Oct 21, 2023 at 14:04
0
$\begingroup$

You probably are supposing, the set of Schwarz distributions is forming an algebra with respect to the set of operation (+,*, evaluate at a point) as we use the algebra of functions with rules of addition and multiplication.

Its an extension of functional algebra with severe limitations for distributions with discontiniuties.

This idea rest on the assumptions, that as for

$$(f⊕g)(x)=f(x)+g(x),(f⊗g)(x)=f(x)∗(g(x))$$

which is going ot work everywhere except for local evalution on the support of discontinuities of any of the distribution. The simples non working examples ar $\delta(x) \Theta[x], \delta^2(x)$, while $\theta^2 = \theta$ is working.

The central point is order of evaluation and the continuity there on different paths to the evaluation point.

$$ \delta_x( f ) = f(x), \delta_x (\delta_y f) = \delta_x (f(y)) = f(y)(x) != f(y,x)$$ $$ \delta_y (\delta_x f) = \delta_y (f(x)) = f(x)(y) != f(x,y)$$ This problem of evaluation order with definite order of the arguments of a function by named symbols is not only conceptual , but fundamental.

Incontrast to vs 6 (the deleted post), at least since vs 13 Mathematica the problem is known. The list of all 6 permutations of evaluations of an integral with a function of three named variables with definite positions: The integration remains unevaluated, if two $\delta$'s with the same argument collide in a step of integration per dimension.

The problem of multidimensional integration is tied to the theorem of Fubini.

In vs 13.3 the evaluation on any of the different orders of integration yields

 ((# -> (int = Integrate[ DiracDelta[z - 2] DiracDelta[k - 5] DiracDelta[t-z-k-9] * f[z, k, t], #1, #2, #3] &) @@ Permute[{{z, -\[Infinity], \[Infinity]}, {k, -\[Infinity], \[Infinity]}, {t, -\[Infinity], \[Infinity]}}, #] &) /@ Permutations[{1, 2, 3}]) /. {_Integrate :> \[Integral]\[Delta][x] f[x] \[DifferentialD]x} 

$$\{1,2,3\}\ \to \ f(2,5,16),\qquad \{1,3,2\}\to \int f(x) \delta (x) \, dx,\qquad \{2,1,3\}\ \to \ f(2,5,16) $$

$$ \{2,3,1\}\ \to \ \int f(x) \delta (x) \, dx,\qquad \{3,1,2\}\ \to \ \int f(x) \delta (x) \, dx, \qquad \{3,2,1\}\ \to \ \int f(x) \delta (x) \, dx$$

History: When Heaviside introduced distributional algebra, for some time, he was the only one able to apply his set of rules producing mathematically correct results. Then he started to study pure mathematics.

Only after Laurent Schwarz introduced distributions as vectors, elements in the dual linear space of evaluation procedures $\mathit S'$ on his Schwarz vector space of smooth functions with compact support $\mathit S_0$, it became clear, what a complex machinery Heaviside had developed in his distribution calculus.

By this theory, product of distributions of different variables are identified as evaluators at a point by their Fourier transformation formulas. Disturbing: The space of distributions contains nearly all integrable, piecewise functions as a core. But limits of series of such functions not converging pointwise everywhere, too.

The multidimensional Schwarz distribution calculus rests on the fact, that for all integrals, order of integration is free. That is Fubini and is working on the space of smooth functions, integrals over all of 1..n-space existing, only.

$\endgroup$
2
  • $\begingroup$ Fubini's theorem does not deal with distributions at all. $\endgroup$ Commented Oct 23, 2023 at 4:38
  • $\begingroup$ Is this a question? How to calculate $\delta(x) \delta(y)$ in polar coordinates? There is no other way as to use $\delta (x,y) = Fourier(e^ {i (k x+ l y}) $ $\endgroup$ Commented Oct 23, 2023 at 5:35
0
$\begingroup$

Here's an extension of @Ulrich's solution, taking into account the Jacobian of the transformation:

diracProductReduce // ClearAll; diracProductReduce::nonlinear = "Some DirectDelta arguments are nonlinear."; diracProductReduce::nonsquare = "The number DirectDelta functions does not equal the number of \ variables `1`."; diracProductReduce[ prod : Verbatim[Times][deltas : DiracDelta[_] ..]] := Module[{args}, args = First /@ {deltas}; diracProductReduce[prod, Variables[args]] ]; diracProductReduce[prod : Verbatim[Times][deltas : DiracDelta[_] ..], vars_] := Module[{args, ca, bvec, jacobian, scale, vars0}, args = First /@ {deltas}; If[Length[args] == Length[vars], ca = CoefficientArrays[args, vars]; If[Length[ca] == 2, {bvec, jacobian} = ca; scale = Det[jacobian]; If[scale =!= 0 && scale =!= 0., vars0 = Simplify@LinearSolve[jacobian, -bvec]; (* Result *) ConditionalExpression[ 1/ Abs@scale (Times @@ MapThread[DiracDelta[#1 - #2] &, {vars, vars0}]), scale != 0 // Simplify], Message[diracProductReduce::sing, jacobian]; (* Failed result *) prod ], Message[diracProductReduce::nonlinear]; (* Failed result *) prod ], Message[diracProductReduce::nonsquare, vars]; (* Failed result *) prod ] ]; 

Examples:

diracProductReduce[ DiracDelta[x - 5] DiracDelta[t - y - 1] * DiracDelta[t + z + y - 3] DiracDelta[t + z + x - y - 3]] (* 2 DiracDelta[-7 + 2 t] DiracDelta[-5 + x] * DiracDelta[-5 + 2 y] DiracDelta[3 + z] *) diracProductReduce[ (* specify variables (t is a parameter) *) DiracDelta[x - 5] DiracDelta[t - y - 1] DiracDelta[t + z + y - 3], {x, y, z}] (* DiracDelta[-5 + x] DiracDelta[1 - t + y] DiracDelta[-4 + 2 t + z] *) diracProductReduce[ (* conditional reduction *) DiracDelta[x - 5] DiracDelta[t - y - 1] DiracDelta[t z + y - 3], {x, y, z}] (* ConditionalExpression[( DiracDelta[-5 + x] DiracDelta[1 - t + y] DiracDelta[1 - 4/t + z])/ Abs[t], t != 0] *) 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.