Integration packages to calculate the first N Fourier coefficients

In addition to the above answer, if your integrant is not periodic and you have a discrete set of fixed (possibly irregular) sampling points, you can try Filon’s method or related methods. I implemented it once in Julia, but I’m not sure it is available in a package.

Edit: a quick search gives

And

1 Like