Approximation of functions by trigonometric polynomials?

341 Views Asked by At

I'm seemingly not understanding the fact that a continuous function $f$ that is periodic on [0, 1) can be approximated by a trigonometric polynomial of the form $$g(x) = \sum_{n = 0}^k c_n e^{2\pi inx}$$ with $c_n \in \mathbb{C}$. I am a bit confused about this concept, however. It appears to me that for any such $g(x)$, we should have $\int_0^1 g(x)dx = 0$, as: $$\int_0^1 e^{2\pi i nx}dx = \Bigg|_0^1 {-i \over 2\pi n} e^{2 \pi i nx} = 0,$$ by periodicity. However, we should not be able to approximate any function $f$ by a set of functions with integral 0 on [0, 1). For example, it is counter-intuitive that we should be able to approximate the function $f(x) = x + 3$ on [0, 1) with a function that has integral 0. If you could help me understand what I'm missing, I'd be very grateful. Thanks!