I am working on some problems concerning Fourier Transform and I am facing something I don't understand.

I am trying to understand what is the representation of the function f(x)=abs(x)cos(x) in the Fourier space.

In wolfram alpha (sorry for this ad.), I type: Fourier(abs(x)*cos(x))

which gives me as result: g(w)= -((Sqrt[2/Pi] (1 + ω^2))/(-1 + ω^2)^2)

Where w is the frequency variable.

  • My first question is: what is a 'frequency variable'?

Now, If I understand well, I believe that Fourier(abs(x)*cos(x)) gives the projection of the function f(x)=abs(x)*cos(x) into the Fourier space.

So, to check this, if I put some sampled values of a range of the function f(x)=abs(x)*cos(x), let's say: D={abs(0)*cos(0), abs(0.1)*cos(0.1), ......, abs(0.9)*cos(0.9)} Then, by applying the Discrete Fourier Transform on such data D, I should get an approximation on values of g(w) for w in D.

Meaning that: g(abs(0.5)*cos(0.5)) should be equal to DFT(D) at rank 6.

But, in Wolfram Alpha, when I compute the DFT of D: Fourier{0*cos(0),0.1*cos(0.1),0.2*cos(0.2),0.3*cos(0.3),0.4*cos(0.4),0.5*cos(0.5),0.6*cos(0.6),0.7*cos(0.7), 0.8*cos(0.8),0.9*cos(0.9)}

I get, at rank 6: -0.0957306 + 0. I

But g(0.5)=-((Sqrt[2/Pi] (1 + (0.5)^2))/(-1 + (0.5)^2)^2)=-1.77

I don't understand why wolfram alpha gives me this resultat for Fourier(f(x)). I am lost...

  • Can anybody tells me where am I wrong in my thoughts? Many thanks...

1 Answer 1


The frequency variable is the argument of the Fourier transform $\omega $. Your Fourier transform is a tricky one, the original function being not absolutely or square integrable. But it can be defined as a limit, see below. We start with

\begin{eqnarray*} f(a) &=&\frac{1}{\sqrt{2\pi }}\int_{-\infty }^{+\infty }dx\exp [i\omega x]\exp [-a|x|]\cos x \\ &=&\frac{1}{\sqrt{2\pi }}\int_{-\infty }^{+\infty }dx\cos \omega x\exp [-a|x|]\cos x=\sqrt{\frac{2}{\pi }}\int_{0}^{+\infty }dx\exp [-ax]\cos \omega x\cos x \\ &=&\sqrt{\frac{2}{\pi }}\int_{0}^{+\infty }dx\exp [-ax]\frac{1}{2}\{\cos (\omega +1)x+\cos (\omega -1)x\}=\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}% \int_{0}^{+\infty }dx\exp [-ax]\{\exp [i(\omega +1)x]+\exp [i(\omega -1)x]\} \\ &=&\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}\int_{0}^{+\infty }dx\{\exp [\{i(\omega +1)-a\}x]+[\{i(\omega -1)-a\}x]\} \\ &=&-\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}\{\frac{1}{i(\omega +1)-a}+% \frac{1}{i(\omega -1)-a}\} \end{eqnarray*} Then

\begin{eqnarray*} &&\frac{1}{\sqrt{2\pi }}\int_{-\infty }^{+\infty }dx\exp [i\omega x]|x|\cos x \\ &=&-\partial _{a}f(a)|_{a=0}=\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}% \partial _{a}\{\frac{1}{i(\omega +1)-a}+\frac{1}{i(\omega -1)-a}\}_{a=0} \\ &=&-\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}\{\frac{1}{[i(\omega +1)-a]^{2}}% +\frac{1}{[i(\omega -1)-a]^{2}}\}_{a=0} \\ &=&-\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}\{\frac{1}{[i(\omega +1)]^{2}}+% \frac{1}{[i(\omega -1)]^{2}}\}=\func{Re}\sqrt{\frac{2}{\pi }}\frac{1}{2}\{% \frac{1}{(\omega +1)^{2}}+\frac{1}{(\omega -1)^{2}}\} \\ &=&\sqrt{\frac{2}{\pi }}\frac{1}{2}\frac{(\omega -1)^{2}+(\omega +1)^{2}}{% (\omega +1)^{2}(\omega -1)^{2}}=\sqrt{\frac{2}{\pi }}\frac{1}{2}\frac{% 2\omega ^{2}+2}{(\omega ^{2}-1)^{2}}=\sqrt{\frac{2}{\pi }}\frac{\omega ^{2}+1% }{(\omega ^{2}-1)^{2}} \end{eqnarray*} \funcRe denotes the real part of what follows (my LaTeX seems not to be compatible). My result is off by a -sign as compared to Wolfram but I leave that to you.

  • $\begingroup$ It looks like you want \func to get you the operator font. You can do this with \operatorname{Re} to get $\operatorname{Re}$ $\endgroup$ Commented Apr 29, 2014 at 22:52
  • $\begingroup$ Ok, understood, but I don't see the relation with g(w) and the DFT of a sampled signal of f(x). Isn't it strange to have an imaginary part when computing Fourier{0*cos(0),0.1*cos(0.1),0.2*cos(0.2),0.3*cos(0.3),0.4*cos(0.4),0.5*cos(0.5),0.6*cos(0.6),0.7*cos(0.7), 0.8*cos(0.8),0.9*cos(0.9)} and not in g(w) ? $\endgroup$ Commented Apr 30, 2014 at 10:49
  • $\begingroup$ Yes, one would not expect an imaginary part. Since the integrand is an even function of x the imaginary part of exp[iωx] does not contribute since it is odd in x and hence gives a vanishing contribution. $\endgroup$
    – Urgje
    Commented May 3, 2014 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .