Fast Fourier Transformation with $f(x)=x$

50 Views Asked by At

I want to give the complex trigonometric polynomial to the function $f(x)=x$ with support $x_k=\dfrac{\pi k}{2}$ for $k=0,1,2,3$ using the Fast Fourier Transformation.

For the trigonometric polynomial

$p(x)=\sum_{k=0}^3 \alpha_ke^{ikx}$ with $p(x_k)=\dfrac{\pi k}{2}$ the coefficients $\alpha_j$ are given by:

$\alpha_j=\displaystyle{\frac14\sum_{k=0}^3 \frac{\pi k}{2}}e^{\displaystyle{{-ijk\pi/4}}}$

for $j=0,1,2,3$.

Now I split the sum into even and odd parts.

Then

$\alpha_j=\displaystyle{\frac14\left(\sum_{k=0}^2 \frac{2k\pi}{2}e^{\displaystyle{-ij(2k)(2\pi)/4}}\right)}+e^{\displaystyle{-ij\pi/2}}\left(\frac14\sum_{k=0}^2 \frac{(2k+1)\pi}{2}e^{\displaystyle{-ij(2k+1)(2\pi)/2}}\right)$

We get:

$\alpha_0=\pi$

$\alpha_1=-\dfrac34\pi+\dfrac14i\pi$

$\alpha_2=-\dfrac12\pi$

$\alpha_3=-\dfrac34\pi-\dfrac14i\pi$

So $p(x)=\pi+(-\dfrac34\pi+\dfrac14i\pi)e^{ix}-\dfrac12\pi e^{2ix}+(-\dfrac34\pi-\dfrac14i\pi)e^{3ix}$

But if I plot the real part of this function, I get:

enter image description here

Which does not look very accurate.

Have I done a mistake, or can you tell me what I am supposed to do?

Can you give the correct solution to the FFT here, so I can try again?

Do you know how to perfor this specific FFT with a software like Python for example.

Thanks in advance.