But my naive implementation fails to evaluate this to zero:
In[366]:= testFunction2[(I*DiracDelta[#]) &]
Is there a way to implement this so that Mathematica will recognize that the conjugate of (the product of a complex-number and DiracDelta) equals the product of (the conjugate of the complex-number) and DiracDelta? This axiom is true in conventional theories of generalized functions, no?
I am not familiar with generalized functions. Have you reasons to believe that Integrate[Conjugate[signal[x]], {x, -Infinity, +Infinity}] may not be the same as Conjugate[Integrate[signal[x], {x, -Infinity, +Infinity}]]?
Mathematica includes a description (if you are curious):
One example of a generalized function is DiracDelta. On all non-zero arguments, the function’s value is 0, but on an argument of 0 the function’s value is infinite in a sense. A motivation for the theory is that when you integrate DiracDelta over (-Infinity,+Infinity), the result should be 1. Both replies in this other thread offer insight into Wolfram’s implementation of generalized functions.
Have you reasons to believe that… may not be the same as…?
No, those two expressions should be equal, in my non-expert opinion. Regrettably, I made a mistake when formulating testFunction for the purpose of this thread. I originally wrote:
So while your proposed solution does solve my malformed question, it won’t solve the problem with testFunction2, because in testFunction2, the Conjugate inside the Integrate can’t be moved simply to outside the Integrate. (And combining the two terms into one by use of the function “Re” doesn’t result in a successful evaluation.)
Moreover, in the application I’m developing, the integrand is formed automatically at run-time, so there’s no opportunity for me to rearrange it manually. Any rearrangement needs to be programmatic, and I cannot know ahead of runtime how generalized functions and Conjugate will be combined inside the integrand. (In my actual application, I’m applying FourierTransform rather than Integrate, but I use Integrate for this question, since it’s more popular, and the issue seems to be shared between Integrate and FourierTransform.)
I have tried to explain why I can’t do that (but maybe I’ve been unclear):
in the application I’m developing, the integrand is formed
automatically at run-time, so there’s no opportunity for me to
rearrange it manually. Any rearrangement needs to be programmatic, and
I cannot know ahead of runtime how generalized functions and Conjugate
will be combined inside the integrand.
At run-time, the integrand might end up being, for example,
I*DiracDelta[x]
In that case, the integral should not be real, so the “Re” outside the Integrate function would cause an error in the results.
Is there a way to implement this so that Mathematica will recognize
that the conjugate of (the product of a complex-number and DiracDelta)
equals the product of (the conjugate of the complex-number) and
DiracDelta? This axiom is true in conventional theories of generalized
functions, no?
This may solve my problem by augmenting Wolfram’s implementation of Conjugate, but I have barely tested it yet: