Message Boards Message Boards

GROUPS:
Anonymous User

Account for this non-linearity in FourierTransform?

Anonymous User
Posted 4 years ago
4162 Views
|
6 Replies
|
0 Total Likes
|

Define two functions:

functionWithConditional[t_] := If[t < 0, 0, t]

functionWithSign[t_] := (Sign[t] + 1)*t/2

Mathematica considers them equal in this sense:

In[3]:= FullSimplify[functionWithConditional[t] - functionWithSign[t]]

Out[3]= 0

But the difference between their transforms is nonzero:

In[5]:= FourierTransform[functionWithConditional[t], t, s] - 
 FourierTransform[functionWithSign[t], t, s]

Out[5]= I Sqrt[\[Pi]/2] Derivative[1][DiracDelta][s]

And the inverse-transform of the difference is non-zero:

In[6]:= InverseFourierTransform[%, s, t]

Out[6]= -(t/2)

Which if these results is correct, and which is incorrect:

In[7]:= FourierTransform[functionWithConditional[t], t, s]

Out[7]= -(1/(Sqrt[2 \[Pi]] s^2))

In[8]:= FourierTransform[functionWithSign[t], t, s]

Out[8]= -(1/(Sqrt[2 \[Pi]] s^2)) - I Sqrt[\[Pi]/2] Derivative[1][DiracDelta][s]

Or are they somehow both correct, despite Mathematica claiming the functions are equal? Why should two equal functions have unequal transforms?

POSTED BY: Anonymous User
Answer
6 Replies

This is not exactly, the same thing, because Sign in discontinuous. So, the fist function is derivable, while the second one is not (excepted probably in the Distributions sense).

D[functionWithConditional[t], t]
If[t < 0, 0, 1]

D[functionWithSign[t], t]
1/2 (1 + Sign[t]) + 1/2 t Derivative[1][Sign][t]
Anonymous User
Anonymous User
Posted 4 years ago

... Sign in discontinuous.

I agree, but I don't see the relevance. I.e., I don't see how the discontinuity of Sign makes a difference in the differentiability between functionWithConditional and functionWithSign. functionWithConditional and functionWithSign return identical values on all real arguments, including 0 and arguments approaching 0. That fact tells me they are identical functions, and Mathematica confirms their difference is everywhere 0, as shown above.

the first function is derivable

The first function (functionWithConditional) is not differentiable at 0, according to the conventional definition of derivative:

In[9]:= Limit[(functionWithConditional[0 + delta] - functionWithConditional[0])/delta, delta -> 0, Direction -> -1]

Out[9]= 1

In[10]:= Limit[(functionWithConditional[0 + delta] - functionWithConditional[0])/delta, delta -> 0, Direction -> +1]

Out[10]= 0

Mathematica miscalculates the derivative of functionWithConditional at 0, and I suppose that error accounts for the problems that have cost me two days. Thank you for helping me see that.

POSTED BY: Anonymous User
Answer

FullSimplify is doing a couple of things that might not be obvious. One is it is giving a generic result, that is, they agree almost everywhere so difference is 0. The other is that it is inferring that the domain is restricted to reals, since otherwise the inequality is not valid.

Neither of these really has to do with the differences in the Fourier transforms (well, arguably, the difference between them at the origin is related). General rule though: a "mathematical" function such as FourierTransform is not going to reliably work on a "programmatic" construction such as If. To work with discontinuities in the FT setting one is better served using functions that are understood in the FT world, such as HeavisideTheta.

Anonymous User
Anonymous User
Posted 4 years ago

arguably, the difference between them at the origin is related

There is no difference between the two functions at the origin:

In[29]:= functionWithConditional[0] - functionWithSign[0]

Out[29]= 0

Moreover, there is no difference between the two functions at any real value. Their identity is total, not merely generic or "almost everywhere".

Given the exact identity of the two function, their derivatives (in the conventional sense of the word "derivative") are exactly identical, but Mathematica evidently uses a non-conventional definition for the derivative-operation: Mathematica evidently calculates the limit from one side only rather than calculating the limit from both sides. The documentation doesn't disclose this, but I gather it from experimentation and from the documentation of the Limit function.

General rule though: a "mathematical" function such as FourierTransform is not going to reliably work on a "programmatic" construction such as If. To work with discontinuities in the FT setting one is better served using functions that are understood in the FT world, such as HeavisideTheta.

What exactly is the set of functions "understood in the FT world"? I'm guessing it includes DiracDelta, HeavisideLambda, HeavisidePi, and HeavisideTheta, but what else?

Is FourierTransform reliable on constructions involving the Sign function? Is FourierTransform reliable on constructions involving the Abs function (which has a discontinuity in its 1st derivative)?

POSTED BY: Anonymous User
Answer

There is no difference between the two functions at the origin:

Right you are, I was mentally dropping the factor of t. That is to say, contrast If[t < 0, 0, 1] with (Sign[t] + 1)/2.

As for the derivative issue, in the FT world a linear "ramp" indeed has an FT with a derivative of a delta function. This does not require a one-sided (or in other respects unconventional) derivative.

What exactly is the set of functions "understood in the FT world"? I'm guessing it includes DiracDelta, HeavisideLambda, HeavisidePi, and HeavisideTheta, but what else?

Here I am not certain. I believe some work has gone into making Abs and Sign and UnitStep behave in ways similar to HeavisideTheta, in terms of delta functions appearing when a function or one of its derivatives has a jump discontinuity. I would be surprised if it went this far with programmatic constructs.

Anonymous User
Anonymous User
Posted 4 years ago

Thanks for the info.

POSTED BY: Anonymous User
Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract