I have a particularly nasty function, f(x), and I want to numerically find the values $g_k$ where they are defined as the following.
$f(x) = \sum^{\infty}_{k=-\infty}g_k \text{exp}(ikx)$
I want to know the values $g_k$ for k from 0 to some large integer. I know this should be an easy question. But, I am not as acquainted with the Fourier transform as I would like to be. I would like to use the fast Fourier transform. Thank you for reading.