Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.3K Views
|
6 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Account for non-Commutativity of Convolve?

Anonymous User
Anonymous User
Posted 8 years ago

The documentation for Convolve ("Properties & Relations") states that Convolve is commutative. However, this demonstrates the non-commutativity of Mathematica's Convolve function:

In[2]:= f1 = -(I/(\[Pi] x));

In[3]:= f2 = Sinc[2 \[Pi] x];

In[4]:= convolution1[s_] := Evaluate[Convolve[f1, f2, x, s]]

In[5]:= convolution2[s_] := Evaluate[Convolve[f2, f1, x, s]]

In[6]:= With[{testArgument = 1/4}, 
 Arg[{convolution1[testArgument], convolution2[testArgument]}]]

Out[6]= {-((3 \[Pi])/4), -(\[Pi]/4)}

What's the cause of this anti-documented non-commutativity?

POSTED BY: Anonymous User
6 Replies

There's a chance that it's a bug, but overall, theorems tend to be less true in real life than they are on the chalkboard. But it's pretty understandable that people get confused when suddenly a major theorem of math seems to have stop being true.

There are three things you should check in a case like this:

(1) You're comparing two indefinite integrals that should be equal, but remember they can differ from each other from a constant value. In highschool they force students to add the "+C" invisible constant everywhere, but in college they handwave this away most of the time and people get a bit casual. If this happens to be the case, there's no reason to be embarrassed - this even seems to occasionally slip the minds of active math professors at major universities.

(2) The results might contain inverse functions with branch-cuts. And maybe those branch-cuts aren't doing what you expect.

(3) Integration is done with "generic equality". That means it allows for the values to be considered equal if they only differ from each other at a set of points. We use generic equality when we say things like:

"The integral of x^n is x^(n+1)/(n+1)"

This statement isn't really true for when n is -1. We say it anyway understanding that it's generically true and because sometimes listing out all of the exceptions would be really infeasible. Integrals in Mathematica do the same thing. You can check by looking at the integral of x^n.

So I would begin to look at this by actually writing out the two integrals that define both convolutions and looking at their results. Probably also by plotting their results and comparing them.

POSTED BY: Sean Clarke
Anonymous User
Anonymous User
Posted 8 years ago

Thanks for your insight.

(1) You're comparing two indefinite integrals that should be equal, but remember they can differ from each other from a constant value.

I am one of the people who often forgets about that constant value. However, I don't see any indefinite integrals in this problem. Integrate is never mentioned explicitly in the original post. Integration does appear explicitly in the definitions of both Convolve and FourierTransform, and it also appears explicitly in Gianluca Gorni's reply in this thread; in but all these integrations are definite, not indefinite.

Your other points make sense. I learned Fourier theory from engineering textbooks, which are a lot less rigorous than math textbooks. Now I'm trying to get a more rigorous understanding of Fourier theory, but that's still a work in progress.

I am curious what the plots will show. That's a good idea.

POSTED BY: Anonymous User

The theory stands up fine in this case. But we are doing a convolution on functions that do not satisfy the integration formulation (so it is really an extension). In such cases Convolve will use Integrate and of necessity will have to set GenerateConditions->False since otherwise Integrate will see a divergence and return unevaluated. With GenerateConditions->False we have opened the door to various badnesses, unfortunately, since the integration range is likely to be split into to parts (-infinity to 0 and 0 to infinity), and possibly conflicting assumptions might be made quietly in handling each part.

The issue is under investigation but it's not clear how much improvement is to be had for examples where the integral in question is not unconditionally convergent.

POSTED BY: Daniel Lichtblau
Anonymous User
Anonymous User
Posted 8 years ago

Even an automatic warning from Mathematica (e.g., when GenerateConditions gets set to False, or when the integration range is split into to parts) would help. For a couple of days, I didn't realize Mathematica was giving me 3 conflicting results for the same convolution. The issue was only becoming apparent to me far downstream from the Convolve, and it was difficult for me to trace it back to the Convolve, as I didn't then have an idea of what the correct answer should look like. (One and only one of the answers is "correct", in the sense it's what you'd arrive at using Lebesgue integration and distributions or generalized functions---I think.) A warning would have helped.

POSTED BY: Anonymous User
Anonymous User
Anonymous User
Posted 8 years ago

I agree it may well have something to do with that, but I'm not an expert either. However, when I use an alternative method to calculate the convolution, it yields a result which I believe is correct (and this 3rd result is unequal to both results given by the Convolve function) --- and it finds this correct result despite the not-absolutely-integrable character you note, and it does this even though FourierTransform is based on integration:

fp = {0, -2 \[Pi]};

convolution3[s_] := 
 Evaluate[FourierTransform[
   Evaluate[
     InverseFourierTransform[f1, x, t, FourierParameters -> fp]]*
    Evaluate[
     InverseFourierTransform[f2, x, t, FourierParameters -> fp]], t, 
   s, FourierParameters -> fp]]

The Convolution Theorem tells us that expression should yield the convolution. Of the three competing results yielded by Mathematica, I'm pretty sure convolution3 is the correct one. Not an expert, but I have a textbook by an expert which indicates convolution3 is the right answer.

POSTED BY: Anonymous User

I am not an expert, but it may have to do with the fact that your f1, f2 are not absolutely integrable:

Integrate[-(I/(\[Pi] s)) Sinc[2 \[Pi] (x - s)], {s, -Infinity, 
  Infinity}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard