Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|cite|improve this question
Could you provide some information about the result and / or the algorithm that is used in your book? – k1next Feb 19 '13 at 7:45

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$$

share|cite|improve this answer
can you please show how to do this via hand computation? Thanks – Buddy Holly Feb 24 '13 at 3:01
@BuddyHolly - done. – nbubis Feb 24 '13 at 4:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.