I know that there are several posts about FFT and derivatives, but i dont get it.
The formula is:
$$ f(t) \to \hat{f}(\xi), f'(t) \to 2\pi i \xi\hat{f}(\xi) $$
First, i dont understand what is the $\xi$, when i learned FFT as much as i poorly understand it, we compute it at different complex roots.
Let's take an example, i want to calculate the derivative of the polynomial:
$$ P(x) = -1 + 2x + 5x^2 - 4x^3 $$
The analytic solution will be:
$$ P'(x) = 0 + 2 + 10x - 12x^2 $$
Now, i take the FFT of $P(x)$ and get:
What should i multiply this by in order to get the values that by using FFT$^{-1}$ will get me to $P'(x)$?

Suppose you have an arbitrary function $f\equiv \hat{f}$. The function can be represented in physical space as $f(x)$ or in frequency space as $\hat{f}(\xi)$. Here $\xi$ is the frequency or mode. You can derive the spectral derivative in three steps:
Note that here $\omega= \frac{2\pi}{L} = 1$ or $L=2 \pi$. Otherwise you have to scale the $i$-th mode with $\omega$.
Summarizing:
$\frac{\partial f(x)}{\partial x} = \mathcal{F}^{-1}(\frac{\partial \hat{f}(\xi)}{\partial \xi})=\mathcal{F}^{-1}( i \xi \mathcal{F}(f(x))$.
Matlab code for even $N$: