Message Boards Message Boards

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

Recreating functions after passing through Fourier Transform & IFT

Posted 11 years ago
I have a complex function that I will need to manipulate in the future and wanted to verify Mathematica's FourierTransform functions.  Consider the following:

I have a function that is causal in time (t=0) and causal in space (for x=0.5).  For simplicity, assume it is a traveling wave that decays exponentially as a function of space:
f =2*Sin[40*(x -0.1*t)]*Exp[5*(0.5 - x)]*UnitStep[t]*
UnitStep[x - 0.5]

If I were to take the fourier transform (FourierTransform) of this function, and then immediately take the inverse transform (InverseFourierTransform):
F = FourierTransform[f, t, Omega]
finv = InverseFourierTransform[F, Omega, t]

I would expect Mathematica to return to me the original function.  However, I get an output that is not causal in time as such (left is the input, right is the input and output; x=0.5 or t=2.5):

As a workaround, I attempted to isolate the real portion of the Fourier Transform and use the evenness of the output to recreate my desired finv, but Mathematica wouldn't let me take the InverseFT as Re[] was not acting on a numeric quantity.

Has anyone seen this before?  Can you provide me with direction?

EK
POSTED BY: Eric Kjolsing
6 Replies
Posted 11 years ago
Note that Fourier inversion (recovering a function from its Fourier transform) is only possible for certain classes of functions, see, for instance, http://en.wikipedia.org/wiki/Fourier_inversion_theorem. The functions in your first example and Sin[5*tt]*UnitStep are not even integrable on [-Inf; +Inf], so the Fourier transforms don't exist in the "conventional" sense. It is thus not too surprising that transforming these functions forth and back doesn't end up with the original function.

The results Mathematica comes up with are interesting, though. Directly calculating the forward transform via the integral does not work, of course:
 In[19]:= Integrate[Sin[\[Alpha] t] UnitStep[t] Exp[I \[Omega] t], {t, -\[Infinity], +\[Infinity]}]
 
 Out[19]= ConditionalExpression[\[Alpha]/(\[Alpha]^2 - \[Omega]^2), 
  Abs[Im[\[Alpha]]] < Im[\[Omega]]]
 
 In[21]:= Integrate[Sin[\[Alpha] t] UnitStep[t] Exp[ I \[Omega] t], {t, -\[Infinity], +\[Infinity]}, 
  Assumptions -> {\[Alpha] \[Element] Reals, \[Omega] \[Element] Reals}]
 
 During evaluation of In[21]:= Integrate::idiv: Integral of E^(I t \[Omega]) Sin[t \[Alpha]] UnitStep[t] does not converge on {-\[Infinity],\[Infinity]}.

Out[21]= Integrate[ E^(I t \[Omega]) Sin[t \[Alpha]] UnitStep[t], {t, -\[Infinity], \[Infinity]}, Assumptions -> {\[Alpha] \[Element] Reals, \[Omega] \[Element]  Reals}]

Of course. What does FourierTransform do?
In[30]:= ff[\[Omega]_] :=FourierTransform[Sin[5.0 t] UnitStep[t], \[Omega], t]
In[29]:= ff[\[Pi]]

Out[29]= FourierTransform[Sin[5 t] UnitStep[t], \[Pi], t]
Doesn't work either.

Now if one performs a forward *and* a backward transform, it seems Mathematica somehow feels obliged to present the user with some result emoticon Albeit, the result seems to depend on whatever clever tricks Mathematica tries to play:
 In[59]:= Module[{g, G},
  g = Sin[5*tt]*UnitStep[tt];(*Continuous function*)
  G = FourierTransform[g, tt, omega](*FT of function*);
    FullSimplify[InverseFourierTransform[G, omega, tt]]]
 
 Out[59]= 1/2 (1 + Sign[tt]) Sin[5 tt]
 
 In[60]:= Module[{g, G},
  g = Sin[5.*tt]*UnitStep[tt];(*Continuous function*)
G = FourierTransform[g, tt, omega](*FT of function*);
   FullSimplify[InverseFourierTransform[G, omega, tt]]]

Out[60]= 0.5 Sign[tt] Sin[5. tt]

Hmmm. We are missing a "1" in the second case.
POSTED BY: Stefan Janecek
Ok, I see your point, problem appears for reals. Looks like a bug to me.

I.M.
POSTED BY: Ivan Morozov
Posted 11 years ago
It seems to be with the significant figures of the frequency term.  If I use 5 then the output looks good; if I use 5.0 then I have issues.

POSTED BY: Eric Kjolsing
Hi,

looks like it works well for simple functions:
f = Sin[x]
FourierTransform[%, x, y]
InverseFourierTransform[%, y, x] // ExpToTrig // TrigReduce
The problem appears to be with UnitStep (or HeavisideTheta) function:
f = UnitStep[x]
FourierTransform[%, x, y]
InverseFourierTransform[%, y, x]
Try to investigate why HeavisideTheta[] is not equal to InverseFourierTransform[FourierTransform[HeavisideTheta[]]] in 'functional' form.
In fact, the values are indeed equal, i.e. HeavisideTheta(x) = InverseFourierTransform[FourierTransform[HeavisideTheta(x)]]
f = HeavisideTheta[x]
FourierTransform[%, x, y]
InverseFourierTransform[%, y, x]
f /. x -> 1
%% /. x -> 1

I.M.
POSTED BY: Ivan Morozov
Posted 11 years ago
The problem appears when a sinusoid is multiplied by the unit step function:

 g = Sin[5*tt]*UnitStep[tt];(*Continuous function*)
 G = FourierTransform[g, tt, omega](*FT of function*)
 ginv = InverseFourierTransform[G, omega, tt]// ExpToTrig // TrigReduce(*IFT of function*)
 
 (*or*)
 
 g = Cos[5*tt]*UnitStep[tt];(*Continuous function*)
 G = FourierTransform[g, tt, omega](*FT of function*)
 ginv = InverseFourierTransform[G, omega, tt] // ExpToTrig // TrigReduce(*IFT of function*)

For both cases g =/ ginv.  The result is actually 0.5*Sign*Sin[5*tt] or 0.5*Sign*Cos[5*tt], respectively.
POSTED BY: Eric Kjolsing
g = Sin[5*tt]*UnitStep[tt];(*Continuous function*)

G = FourierTransform[g, tt, omega](*FT of function*);
ginv = InverseFourierTransform[G, omega, tt](*IFT of function*) // ExpToTrig // TrigReduce;
Plot[{g, ginv}, {tt, -2 \[Pi], 2 \[Pi]}]
g is indeed equal to ginv, moreover UnitStep[ X] = 1/2 + 1/2 Sign
Plot[{UnitStep[t], 1/2 + 1/2 Sign[t]}, {t, -2, 2}]
I.M.
POSTED BY: Ivan Morozov
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