# Fourier Series & Parceval's identity

1. Jun 8, 2013

### danielakkerma

1. The problem statement, all variables and given/known data
Calculate the following integral:
$$\int_{0}^{2\pi}(\sum_{k=0}^{\infty} \frac{\cos(kx)}{3^k})^2 dx$$
2. Relevant equations
Parseval's identity: $$\frac{1}{2 \pi} \int_{-\pi}^{\pi} {|f(x)|^2 dx} = \sum_{n=0}^{\infty} {|a_n|^2+|b_n|^2}$$
Where a_n, and b_n are the trigonometric Fourier coefficients; factors for cos(nx) and sin(nx) respectively.
3. The attempt at a solution
Since the question posited the integrand as a sum of a trigonometric polynomial, I let f(x) = Ʃ(cos(kx)/(3^k)).
Then, squaring it, according to Parseval's identity, and taking the integral as shown, should yield the sum of the absolute value of the coefficients(times two Pi -- a constant in the definition of the orthonormal inner product, in the Hilbert space).
In this case:
$$\int |f(x)|^2 dx = 2 \pi \sum |a_n|^2 = \sum_{k=0}^{\infty} (\frac{1}{9})^k = 2 \pi \frac{9}{8} = \frac{18 \pi}{8}$$
However, Mathematica claims it's 17π/8!
http://www.wolframalpha.com/input/?...)]/(3^k),+{k,+0,+Infinity}]^2),+{x,+0,+2+Pi}]
I'm quite at a loss as to where I have erred,
And am, as ever, reliant on your help,
Thanks for your time and attention,
Daniel

Last edited: Jun 8, 2013
2. Jun 8, 2013

### Bill Simpson

It is not impossible that you might have found a bug.

Someone just a couple of days ago found what looks like a bug in infinite sums.

http://forums.wolfram.com/student-support/topics/519673

You would think that something as simple as this would have been exhaustively tested, but there are lots of tricky cases.

Find three completely different ways of coming up with the answer and see if they consistently disagree with Mathematica. If so then maybe someone can get it fixed in a year or two.

3. Jun 8, 2013

### danielakkerma

But Mathematica is pretty insistent.
I've tried rewriting the factor a_n in terms of a complex number, then multiplying it by the series element expressed as a complex exponent(i.e. converted the trigonometric series to a complex-exponential one). But still, no change. Mathematica is adamant that the answer is 17 Pi/8, come hell or high water.
Any further suggestions would be very welcome!
Thanks again,
Daniel
P.S.
I've just noticed the error I made with regards to the title of this thread:
It should of course read "Parseval's identity". My apologies to Marc-Antoine.

4. Jun 8, 2013

### Ray Vickson

Maple also gave $17 \pi/8$. I got this by first finding the sum in the integrand as
$$f(x) = \sum_{k=0}^{\infty} \frac{\cos(kx)}{3^k} = \frac{3}{2}\frac{\cos(x)-3}{3\cos(x)-5},$$
then integrating $f^2$.

You are mis-using Parseval: if $$f(x) = \sum_{k=-\infty}^{\infty} c_k e^{ikx},$$
we have
$$\int_{-\pi}^{\pi} |f(x)|^2 \, dx = 2\pi \sum_{k=-\infty}^{\infty} |c_k|^2.$$
In the example we have $$c_0 = 1, \text{ and } c_k =\frac{1}{2}\frac{1}{3^{|k|}}, k \neq 0,$$
so
$$2 \pi \sum_{k=-\infty}^{\infty} |c_k|^2 = 2 \pi \left( 1 + 2 \sum_{k=1}^{\infty} \frac{1}{4}\frac{1}{9^k} \right) = \frac{17 \pi}{8}.$$

5. Jun 9, 2013

### danielakkerma

Thanks Ray! A few questions:

Ray, thank you for a very cogent reply.
Why is it necessary to separate c_0 from the more general c_k? (after all, n(the sum's interator) crosses zero -- does it not?)
In this particular equation:
, why is there an additional factor of two, multiplying the sum?
Thanks again,
Daniel

6. Jun 9, 2013

### Ray Vickson

In the complex (e^{ikx}) form, c_0 is treated the same as the others, but in the real form it is different; that's why books and papers all write
$$f(x)= \frac{1}{2} a_0 + \sum_{n=1}^{\infty} [ a_n \cos(nx) + b_n \sin(nx) ]$$
Anyway,
$$\int_{-\pi}^{\pi} \left| \sum_{n=0}^{\infty} c_n \cos(nx) \right|^2 \, dx = \pi (2 |c_0|^2 + \sum_{n=1}^{\infty} |c_n|^2 ).$$
If you don't believe this, try a simple form such as $f(x) = c_0 + c_1 \cos(x)$ and integrate f^2 to see what you get.

The factor of 2 multiplying the sum comes from converting $\sum_{k=-\infty}^{-1} + \sum_{k=1}^{\infty}$ to $2\sum_{k=1}^{\infty}$.

7. Jun 9, 2013

### danielakkerma

Finally have it, thanks!

Ray,
You're superb! Your last line has finally made me see the "light" on this issue.
Thanks again for all your help,
Daniel