Question: Compute $$\int _0 ^{2\pi} \left(\sum_{n=1}^\infty \frac {\cos(nx)}{2^n}\right)^2 dx$$
Thoughts: Tried interchanging the integral and the sum, but then the integral turned out to be zero...
Question: Compute $$\int _0 ^{2\pi} \left(\sum_{n=1}^\infty \frac {\cos(nx)}{2^n}\right)^2 dx$$
Thoughts: Tried interchanging the integral and the sum, but then the integral turned out to be zero...
Hint: write the squared sum as a double sum. $$ \left(\sum_{n=1}^\infty a_n\right)^2=\left(\sum_{n=1}^\infty a_n\right)\left(\sum_{m=1}^\infty a_m\right)=\sum_{m=1}^\infty\sum_{n=1}^\infty a_ma_n.$$