I was trying to prove this theorem: If $f(x) = \int_{-\infty}^{\infty} c_ne^{in\pi x/L}$, then show that $\langle|f(x)|^2\rangle = \sum |c_n|$
I checked the solution:
$\langle|f(x)|^2\rangle = \frac{1}{2L} \int_{-L}^{L}(\sum_{n=-\infty}^{\infty}c_ne^{in\pi x/L})(\sum_{n=-\infty}^{\infty}\bar{c_n}e^{-in\pi x/L})dx$
then change the second index $n \to m$, and eventually get:
$$\langle|f(x)|^2\rangle = \sum_{n=-\infty}^{\infty}\sum_{m=-\infty}^{\infty} c_n \bar{c_m}\int_{-L}^{L}e^{i(n-m)\pi x/L} dx$$
then we have:$$\int_{-L}^{L} e^{i(n-m)\pi x/L} dx = 2L\delta_{nm} = \frac{2\sin\pi(n-m)}{(n-m)\pi /L}$$
why this is a kronecker-delta tensor?
Exactly in the definition of $\delta_{nm}$. What happens if $n = m$? If $n \ne m$?