1
$\begingroup$
Needs["FourierSeries`"]

I try solve the numerical Fourier transform of this function:

E0[y_, a_] := -(1/54) E^((2 (1 - 3 a) Tanh[2 a y]^2)/(9 a))Cosh[2 a y]^(-6 - 4/(9 a)) 
    (-10 + 9 (11 - 34 a) a + 3 (-5 + 2 a) (-1 + 6 a) Cosh[4 a y] + (-6 - 3 a + 54 a^2) 
    Cosh[8 a y] + Cosh[12 a y])

where this E0 have the plot:

enter image description here

Then I use the NFourierTransform with two diferent methods, Automatic and LocalAdaptive:

F0[w_, a_] := NFourierTransform[E0[y, a], y, w, 
    Method -> {Automatic, "SymbolicProcessing" -> False}]

In both cases the plot of this numerical Fourier tranform, F0, do not show all points, even if Exclusions -> None, PlotPoints -> 1000 were used, as can be see below:

Plot[F0[w, 0.05], {w, -10, 10}, PlotRange -> Full, 
    Exclusions -> None, PlotPoints -> 1000, Frame -> True, Axes -> False]

How to show the continuous points of these plots?

enter image description here

$\endgroup$
3
$\begingroup$

I am uncertain in what version of Mathematica NFourierTransform occurs, but FourierTransform works well in Mathematica 10.4 in Windows 64x.

F0[w_, a_] := FourierTransform[E0[y, a], y, w, 
    Method -> {Automatic, "SymbolicProcessing" -> False}]
Plot[F0[w, 0.05], {w, -10, 10}, PlotRange -> Full, Frame -> True, Axes -> False]

enter image description here

Note that Method is an undocumented option of FourierTransform

It may be that the function NFourierTransform produces results with a small imaginary part. If so, Chop the solution.

Addendum

My thanks to J. M. for pointing out in a comment below that NFourierTransform is a component of the FourierSeries package. With the addition of

Needs["FourierSeries`"]

it can be combined with Chop to yield the desired plot, above.

F0[w_, a_] := Chop@NFourierTransform[E0[y, a], y, w, 
    Method -> {Automatic, "SymbolicProcessing" -> False}]
$\endgroup$
4
  • 1
    $\begingroup$ NFourierTransform[] comes from loading <<FourierSeries`​. $\endgroup$
    – J. M.'s torpor
    Mar 12 '16 at 8:23
  • $\begingroup$ The Needs["FourierSeries`"] was already present in this question. $\endgroup$
    – Melina A.H
    Mar 12 '16 at 12:07
  • $\begingroup$ @bbgodfrey My Mathematica is v.10.0.0.0 working in a Windows 8 -64bits. In fact, the FourierTransform works well and faster fort this question, however, even that the Method -> {Automatic, "SymbolicProcessing" -> False} do not a valid option in this case. $\endgroup$
    – Melina A.H
    Mar 12 '16 at 12:12
  • 1
    $\begingroup$ @MelinaA.H Yes, I noticed that Mathematica flags Method as not a valid option but nonetheless accepts and uses it. This is not the first time I have seen such behavior. Perhaps, Method is an undocumented experimental option. By the way, Needs["FourierSeries`"] is not in your question. $\endgroup$
    – bbgodfrey
    Mar 12 '16 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.