# How to prove that relation with DiracDelta in Mathematica?

Up to Encyclopedia of Mathematics (see example 7 here), the relation $$\delta(\sin x)=\sum\limits_{k\in \mathbb{Z}} \delta(x-k\pi)$$ is valid.

Trying to verify it in Mathematica, I obtain

DiracDelta[Sin[x]] === DiracComb[Pi*x]


False

Also (making use of nonstandard Mathematica notation) the command

Resolve[ForAll[x, DiracDelta[Sin[x]] == DiracComb[Pi*x]], Reals]


fails.

• I would also very much like to teach mathematica to know about such things ! – chris Jan 3 at 20:41
• First of all, === is not the correct thing to use because that checks to see if the expressions are structurally identical, not mathematically equal. Secondly, InverseFourierTransform[FourierTransform[DiracDelta[Sin[x]], x, k], k, x] seems to disagree with your statement. – march Jan 3 at 21:30
• @march: Can you base your statement? I'd like to quote the documentation "lhs===rhs yields True if the expression lhs is identical to rhs, and yields False otherwise ". – user64494 Jan 4 at 3:25
• Expressions being "identical" is not the same as them being mathematically equivalent. Example: Sin[2 x] === 2 Sin[x] Cos[x]; the Head of the lhs is Sin and the Head of the rhs is Times, which are not identical. – Michael E2 Jan 4 at 4:40
• @Michael E2: Many thanks from me to you for your explanation. The documentation to === is too poor. In particular, "identical" is not defined at all. BTW, (2 + 3)^2 === 25 performs True whereas (x + y)^2 === x^2 + 2*x*y + y^2 performs False. – user64494 Jan 4 at 7:30

Due to the bug reported here, the following method actually gets the wrong answer. However, the method is a good one for proving the relation in the OP.

One way to check is to take advantage of the fact that Mathematica's symbolic Fourier transform functionality can deal with these things. Note:

FourierTransform[DiracDelta[Sin[x]], x, k]
(* DiracComb[k]/Sqrt[2 π] *)


and

InverseFourierTransform[DiracComb[k]/Sqrt[2 π], k, x]
(* DiracComb[x/(2 π)]/(2 π) *)


which illustrate the fact that DiracDelta[Sin[x]] and DiracComb[x/(2 π)]/(2 π) are the same. Evidently, $$\delta(\sin(x)) = \frac{1}{2\pi}\sum_{n=-\infty}^{\infty}\delta\left(\frac{x}{2\pi}-n\right),$$ according to the definition of DiracComb in the documentation. This then simplifies to $$\delta(\sin(x)) = \sum_{n=-\infty}^{\infty}\delta\left(x-2\pi n\right).$$

• @user64494 This doesn't agree with the page that you linked. Using the Fejer kernel to numerically approximate the delta function, it seems like the relation in your question is correct. In that case, Mathematica is wrong. For further evidence, this post is relevant. This is likely a bug in Mathematica that is still around in V12. However, if Mathematica didn't have this bug, the method I've outlined is one way to prove the relation, so I'll leave it as is. – march Jan 3 at 21:46
• Thank you for your interest to the question and your work. However, the actions of FourierTransform and InverseFourierTransform on DiracDelta related functions are not reliable and correct in many cases. Here is an example: FourierTransform[t^2*DiracDelta[t - 1], t, s] $$\frac{e^{i s}}{\sqrt{2 \pi }}$$ InverseFourierTransform[%, s, t] $$\delta (t-1)$$ In view of it I do not appreciate your answer. – user64494 Jan 4 at 3:17
• You produce $$\sum_{n=-\infty}^{\infty}\delta\left(x-2\pi n\right)$$ instead of $$\sum_{n=-\infty}^{\infty}\delta\left(x-\pi n\right).$$ – user64494 Jan 4 at 7:23
• My final comment to your answer. I think your statement " Due to the bug reported here mathematica.stackexchange.com/questions/136214/… , the following method actually gets the wrong answer" does not correspond to reality. The Fourier transforms of generalized functions are a subtle matter (see encyclopediaofmath.org/index.php/… as a first reading). – user64494 Jan 4 at 19:21