Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Manual Fourier Transform of exp(-t^2 /tau)

  1. Feb 20, 2014 #1
    Hello all,
    I have got into a confusion. In the function below, I need to numerically integrate the function with respect to (q) after the Fourier transform.
    [tex]f(t)=e^{-Dq^2 t}[/tex]
    I use two approaches. Approach-1 is working, but Approach-2 does not give the same result, and I wonder what could be the mathematical explanation, or maybe it's because of the Matlab algorithms that I use.

    1. First approach, to analytically solve the FT with Mathematica:
      [tex] 2 \int_0^{\infty } e^{-D q^2 t} \cos (t \omega ) \, dt = \text{ConditionalExpression}\left[\frac{2 D q^2}{D^2 q^4+\omega ^2},\left| \Im(\omega )\right| \leq \Re\left(D q^2\right)\land \Re\left(D q^2\right)>0\right][/tex]
      take the result function and numerically integrate over (q) in Matlab using 'quadl' function:

      Code (Text):

      q1=1e6;     %integ. low limit
      q2=3e10;    %integ. hi limit
      D=8e-12;    % a constant

      omega = 2*pi*logspace(-2,10,50); %ang.frequency

      for i = 1: length(omega)
          I_w(i) = quadl(@(q)Distr(q,omega(i),D), q1, q2);
      end
       
      where 'Distr' contains the function 2Dq^2 / (q^4 + omega^2)

      finally plot it as a function of ω:
      https://dl.dropboxusercontent.com/u/12535433/PhysicsForum/01.jpg [Broken]

    2. In the second approach, I take the f(t) function (better to say f(t,q) )and try to numerically solve the double integral in Matlab (dblquad function):
      Code (Text):

      t1 = 0;
      t2 = 1E6;

      for ii = 1: length(omega)
          J2_w(ii) = dblquad(@(q,t) exp(-D .* q.^2 .* t.^a) .* cos(omega(ii).*t), q1,q2,t1,t2);
      end
       
      and plot it as a function of ω:
      (This double integral takes too long)
      loglog plot
      https://dl.dropboxusercontent.com/u/12535433/PhysicsForum/Graph2.BMP [Broken]

      semilogx plot

      https://dl.dropboxusercontent.com/u/12535433/PhysicsForum/Graph1.BMP [Broken]

      Black=Approach-1
      Red=Approad-2
      it looks like the function shows an oscillatory behaviour at the high frequency domain. I wonder if this could be an artifact due to the 'dblquad' function in Matlab. I also tried to decrease the tolerance, because of the cosine, it could be the problem of sampling that it cannot sample at the high frequency.

    I appreciate any help/comment/suggestion.
    Thank you.
    Amin

    P.S. I would happily upload the matlab .m file if required.
     
    Last edited by a moderator: May 6, 2017
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Manual Fourier Transform of exp(-t^2 /tau)
  1. Integral of exp(-kx^2) (Replies: 1)

  2. Integrating exp(x^2) (Replies: 8)

Loading...