I'm trying to use the Fast Fourier transform algorithm to determine the trigonometric interpolating polynomial of degree $16$ for $f(x) = x^2\cos(x)$ on $[-\pi,\pi]$
I see a computer result in my book, but don't understand how to do it by hand.
Thanks
First, note the difference between a Fourier Transform of a function which is a continuous expression. and a FFT which is a specific algorithm for computing a discrete numerical version of the said transformation.
The trigonometric interpolating polynomial of degree $16$ is most easily expressed as a Fourier Series. Since the function is even, only $\cos(nx)$ terms appear: $$f(x) = \frac{a_0}{2}+\sum_{n=1}^\infty a_n \cos(n x)$$ $$a_n = \int_{-\pi}^{\pi}f(x)\cos(nx)dx$$ In your case, $$a_{16} = \int_{-\pi}^{\pi}x^2\cos(16x)\cos(x)dx = \frac{1}{2}\int_{-\pi}^{\pi}x^2(\cos(15x)+\cos(17x))dx$$ And then use integration by parts to show that: $$\int_{-\pi}^{\pi}x^2\cos(mx)dx = \left.\frac{2 x \cos (m x)}{m^2}+\frac{(m^2 x^2-2) \sin (m x)}{m^3} \right|^\pi_\pi$$
Since $m$ is odd, the $\sin$ terms drop off, and we get: $$a_{16} = \left.\frac{x \cos (15 x)}{15^2} + \frac{x \cos (17 x)}{17^2} \right|^\pi_\pi = -2 \pi/225 - 2 \pi/289 = -1028 \pi/65025$$ $$ \sim -0.04966$$