Integrating the square of an infinite series

calculuscauchy-productintegrationpower seriessequences-and-series

Just out of plain curiosity, I want to know how to evaluate the integral of the square of an infinite series. For example, if
$$f\left(x\right)=\sum_{n=0}^{\infty}c_n\left(x-a\right)^{n},$$
where $c_n$ and $a$ are constants, can I evaluate$$\int f^{2}\left(x\right)\,dx$$ in terms of its infinite-series expansion? Or to put it simply, how can I evaluate something such as
$$\int\left(\sum_{n=0}^{\infty}c_n\left(x-a\right)^{n}\right)^{2}\ dx$$

Best Answer

Without loss of generality, we may take $a=0$ (else, perform a simple substitution $y=x-a$ and substitute back afterwards).

If, as was originally written, we have $f(x) = \sum_{n=0}^{\infty} c x^n$, then the problem is rather simple. For $|x|<1$, $f(x)$ admits the closed-form $f(x) = c/(1-x)$, in which case $$ \int f^2(x)\,dx = c^2 \int (1-x)^{-2}\,dx = c^2 (1-x)^{-1}+C $$However, I suspect that you meant something of the form $$ f(x) = \sum_{n=0}^{\infty}\color{red}{c_n} x^n; $$(again, with our assumption $a=0$) that is, the coefficients of the power series depend on $n$. Power series can be multiplied together: the resulting object is known as the Cauchy product. It's easy enough to understand how it works, although the issue of convergence is somewhat subtle. Suppose you have two series $F(x)=\sum_{n\ge 0}\alpha_n x^n$, $G(x)=\sum_{n\ge 0}\beta_n x^n$: their Cauchy product is what you would get by just multiplying them together and collecting terms. $$ F(x)G(x) = \left(\alpha_0 +\alpha_1 x+\alpha_2 x^2+\alpha_3 x^3+\cdots\right)\left(\beta_0+\beta_1 x+\beta_2 x^2+\beta_3 x^3+\cdots\right) $$ $$ =\alpha_0 \beta_0 + (\alpha_0\beta_1 +\alpha_1\beta_0)x+ (\alpha_0\beta_2+\alpha_1\beta_1+\alpha_2\beta_0) x^2+ (\alpha_0\beta_3+\alpha_1\beta_2+\alpha_2\beta_1+\alpha_3\beta_0)x^3+\cdots $$ $$ =\sum_{n=0}^{\infty}\left(\sum_{k=0}^n \alpha_k \beta_{n-k}\right)x^n $$When you encounter something new, often it's best to try it with a familiar example, but if you like, you can skip this next part.


Arguably the nicest power series is $e^x =\sum_{n=0}^{\infty}\frac{1}{n!}x^n$: $$ (e^x)^2=\sum_{n=0}^{\infty}\left(\sum_{k=0}^n \frac{1}{k!}\cdot \frac{1}{(n-k)!}\right)x^n $$We can evaluate the inner sum using the binomial theorem: $$=\sum_{n=0}^{\infty}\frac{1}{n!}\left(\sum_{k=0}^n \frac{n!}{k!(n-k)!}\right)x^n$$ $$=\sum_{n=0}^{\infty}\frac{1}{n!}\cdot 2^n\cdot x^n$$ $$=\sum_{n=0}^{\infty}\frac{1}{n!}(2x)^n=e^{2x},$$as we'd expect.


Back to your question: $$ f^2(x) = \sum_{n=0}^{\infty}\left(\sum_{k=0}^n c_k c_{n-k}\right)x^n $$In particular, if the radius of convergence of $f$ is greater than zero, one can integrate term-by-term, as it were: $$ \int f^2(x)\,dx = \int \sum_{n=0}^{\infty}\left(\sum_{k=0}^n c_k c_{n-k}\right)x^n\,dx $$ $$ = \sum_{n=0}^{\infty}\left(\sum_{k=0}^n c_k c_{n-k}\right)\int x^n\,dx $$ $$ = C+ \sum_{n=0}^{\infty}\left(\sum_{k=0}^n c_k c_{n-k}\right)\cdot \frac{x^{n+1}}{n+1} $$As we saw in the example, if the $c_n$ are particularly nice simplification might be possible.