Why trigonometric polynomials form an inner product space.

Trigonometric polynomial is defined as a function $$f(x)=\sum_{n=1}^ka_ne^{i\lambda_nx}$$ for some positive integer $k$, complex coefficients $\{a_n\}$ and real coefficients $\{\lambda_n\}$. Let TP be the vector space of all trigonometric polynomials, we want to define an inner product on this space by $$\langle f,g\rangle=\lim_{T\to\infty} \frac{1}{2T}\int^T_{-T}\! f(x)\overline{g(x)} \:\mathrm{d}x$$ All the properties of the inner product are obvious, except for positive-definiteness. Consider the inner product of a trigonometric polynomial $f$ with itself: \begin{align*} \langle f,f\rangle&=\lim_{T\to\infty} \frac{1}{2T}\int^T_{-T}\! f(x)\overline{f(x)}\: \mathrm{d}x\\ &=\lim_{T\to\infty} \frac{1}{2T}\int^T_{-T}\!\left( \sum_{n=1}^k a_ne^{i\lambda_n x}\right)\left( \sum_{m=1}^k \overline{a_m}e^{-i\lambda_m x}\right)\: \mathrm{d}x\\ &=\sum_{n,m=1}^ka_n\overline{a_m}\lim_{T\to\infty} \frac{1}{2T}\int^T_{-T}\!e^{i(\lambda_n-\lambda_m)x}\:\mathrm{d}x \end{align*} Now, consider the limit $$\lim_{T\to\infty} \frac{1}{2T}\int^T_{-T}\!e^{i(\lambda_n-\lambda_m)x}\:\mathrm{d}x$$ If $n=m$, the limit equals to one, but what if $n\neq m$? Do we get this limit to be $\delta_{mn}$?

-
You kind of need $\lambda_n\neq \lambda_m$ when $m\neq n$. You can guarantee that by combining terms in the original polynomial. –  Thomas Andrews Jan 8 '13 at 14:19
If $n=m$, the integral equals one, not zero. –  Eckhard Jan 8 '13 at 14:20
Also, when $n=m$ the integral is $2T$, not $0$. –  Thomas Andrews Jan 8 '13 at 14:20
@Eckhard Depends on whether you consider the $1/2T$ part of the integral, hence our disagreement. But it is definitely not zero :) –  Thomas Andrews Jan 8 '13 at 14:21
sorry, I meant that the limit equals one when $m=n$. –  Jimmy R Jan 8 '13 at 14:23

If $n=m$ and thus $\lambda_n=\lambda_m$, the integral $\frac{1}{2T}\int_{-T}^T{e^{i(\lambda_n-\lambda_m)x}dx}=\frac{1}{2T}\int_{-T}^T{1dx}$ equals one, not zero. If $\lambda_n\neq\lambda_m$, you have $$\int_{-T}^T{e^{i(\lambda_n-\lambda_m)x}dx}=\frac{2}{\lambda_n-\lambda_m}\sin((\lambda_n-\lambda_m)T),$$ and thus $$\lim_{T\to\infty}\frac{1}{2T}\int_{-T}^T{e^{i(\lambda_n-\lambda_m)x}dx}=0.$$

-
Isn't it $2\sin(\lambda_n-\lambda_m)T$? –  Thomas Andrews Jan 8 '13 at 14:27
@ThomasAndrews: Thanks for spotting this. I edited my answer. –  Eckhard Jan 8 '13 at 15:30

You need that $\lambda_n\neq \lambda_m$ for $m\neq n$.

If $\lambda_n\neq \lambda_n$ then the indefinite integral of $e^{i(\lambda_n-\lambda_m)x}$ is $$\frac{1}{i(\lambda_n-\lambda_m)}e^{i(\lambda_n-\lambda_m)x}$$

When evaluated from $-T$ to $T$, this is bounded by $$\frac{2}{\lambda_n-\lambda_m}$$

So multiplying by $\frac{1}{2T}$ and letting $T\to\infty$ yields 0.

On the other hand, you got the case $m=n$ wrong. In that case, the integral is $2T$, and $\frac{2T}{2T}\to 1$ as $T\to\infty$.

-