I have a small problem with a piece of code. I searched the site but was not able to find an answer to my specific question. I am trying a quick test of the Fourier capabilities (on lists) of Mathematica. I am using the following code
a := 0.1;
L[x_] := 1/(x^2 + 1);
s[x_] := L[x] + a Cos[x];
Note that the Fourier Transformation is $$ \mathcal{F}(s(t)) (\omega)=\sqrt{\frac{\pi }{2}} e^{-\left| \omega \right| }+\sqrt{\frac{\pi }{2}} \delta (\omega -1)+\sqrt{\frac{\pi }{2}} \delta (\omega +1) $$ Then I create a list of values
STable1 := Table[s[t], {t, 0, 40, 0.001}];
and then I apply Fourier
ListLinePlot[Abs[Fourier[STable1]], PlotRange -> {{0, 30}, {0, 10}},Frame -> True]
this is what I get
Now the peak should be at 1 (theoretically it is a Dirac Delta function). My question is:
How to get more points (so a smoother function)?
Thanks everyone for reading!