Question
Question: $\int_{0}^{2\pi} \left( \sum_{n=0}^{\infty} \frac{\cos(2^n x)}{2^n} \right)^2 dx$...
∫02π(∑n=0∞2ncos(2nx))2dx

Answer
34π
Explanation
Solution
The integral of the square of a uniformly convergent series can be computed by squaring the series term-by-term and then integrating term-by-term. The integral ∫02πcos(kx)cos(mx)dx is zero if k=m and π if k=m (for k,m positive integers). Applying this to the squared series ∑n,m2n+mcos(2nx)cos(2mx), only terms where n=m survive, leading to ∑n=0∞22nπ. This sum is a geometric series π∑n=0∞(1/4)n=π/(1−1/4)=4π/3.