# Coefficients from Stone Weierstrass versus Fourier Transform

Usually one shows the density of the functions $\sin(kx)$ in $L^2([0,1])$ using the Fourier transform. This in fact comes from the Stone-Weirstrass theorem however and then uses the density of continuous functions in $L^2([0,1])$.

However, the Stone Weirstrass theorem can be used to show, for example, that the functions $e^{ikx}$ are dense in $C([0,1])$ and hence dense in $L^1([0,1])$ as well. So we obtain (not-necessarily-unique) coefficients $c_k$ such that $f_k(x) =c_ke^{ikx}$ converge to any given $f \in L^1([01])$. How should I think about these coefficients? How do they relate to the Fourier series of $f$ (with basis $e^{ikx})$?

-
Your question might be; in which $L^1$? All your functions are $2\pi$-periodic, so you cannot approximate anything that isn't. – Thierry Zell Aug 24 '10 at 13:27
What you're saying is false I think unless you're misunderstanding me. I'm working on say L^1[0,1] (any compact set will suffice). I can approximate $1$ as well as I'd like for instance by functions $\sum c_k sin(kx)$ for instance on $[0,2pi]$. I'm not talking about pointwise convergence just $L^1$ convergence. – Dorian Aug 24 '10 at 13:38
you need to change your exponents to $e^{ikx}$ so they display properly.. – Otis Chodosh Aug 24 '10 at 13:47
The coefficients are the same. If you work in $L^2([0,1])$ instead, its easier to see. It all comes from the fact that Fourier coefficients are unique. If $\sum c_n e^{inx} = \sum d_n e^{inx}$ then $\sum (c_n - d_n) e^{inx} = 0$. Inner product with $e^{imx}$ and you get $c_n = d_n$. Its just another way to prove that Fourier series converge in $L^2$ (and thus $L^1$) – Otis Chodosh Aug 24 '10 at 13:54
The set $\{ e^{inx} \}$ is trivially not dense in $L^1(0,1)$. What you probably mean is that their linear combinations (trigonometric polynomials) are. Still, this does not give a priori a development as a Fourier series, since the coefficients of the trigonometric polynomial approximation to a given function $f$ may not stabilize. – Andrea Ferretti Aug 24 '10 at 16:18

Just a comment if you choose coefficients $c_{k,n}$ such that $$\lim_{n\to\infty} \left(\sum_{k=-n}^{n} c_{k,n} e^{2\pi i n x}\right) \to f (x)$$ in some sense, e.g. $L^1$, then these are not unique. It is even known that the obvious choice $c_{k,n} = \hat{f}(k) = \int e^{-2\pi i n x} f(x) dx$ is not the best. It's much better to choose $$c_{k,n} = \left(1 - \frac{|k|}{n}\right) \hat{f}(k).$$ Then one Cesaro sums the Fourier series, and this is known to converge.

As pointed out by Zen Harper below, I should mention that with the choice $c_{k,n} = \hat{f}(k)$ for $-n \leq k \leq n$, the Fourier series of a $L^1$ function must not converge. In fact it can diverge almost-everywhere.

Having said these things, the obvious advantage of this is, that everything is explicit and does not rely on any abstract hocus pocus.

I realized one more thing: Consider the case $f \in L^2$. Then the choice $c_{k,n} = \hat{f}(k)$ for $-n \leq k \leq n$ is optimal. This follows from easy Hilbert space theory!

-
Is this the best you can do in $L^1$? This is very interesting! – Otis Chodosh Aug 24 '10 at 20:34
Not sure. Certainly not for functions having some regularity, one can check that the "normal" Fourier series become superior at one point ($C^1$ should be sufficient). – Helge Aug 24 '10 at 22:14
Apologies to Helge and everyone else who knows this, but it's worth stressing that the partial sums of the Fourier series DO NOT always converge to $f \in L^1$, either pointwise or in $L^1$, which is why the Cesaro averages are needed. (Although they do, by Cauchy-Schwarz, if you start off with $f \in L^2$). So, when Helge says "...the obvious choice...is not the best...", not only is it not the best, but in fact it may not even work at all! – Zen Harper Aug 25 '10 at 2:48
@Zen: I edited my post to include your comment. Furthermore, I added a comment on the L^2 case. – Helge Aug 25 '10 at 11:00

The Fourier transform is bounded from $L^1([0,1])$ to $\ell^\infty(Z)$ (with norm 1 if you expand in terms of $e^{2\pi ikx}$). If we take a sequence of finite sums of the form $f_n = \sum_k c_{n,k} e^{2\pi ikx}$ where for each $n$ there are only finitely many terms which are not zero ("trigonometric polynomials"), and $\|f_n -f\|_{L^1}\to 0$, then for all $k$, we have $c_{n,k} \to \hat f(k)$ as $n\to \infty$.

It may help to think of the kind of stuff that doesn't happen in $L^2$: Namely, Kolmogorov famously showed in his first publication that there exist $L^1$ functions $f$ whose Fourier series diverge almost everywhere (and I believe one can arrange for the divergence to be everywhere as well). If such a function $f$ can be written as an infinite sum $f(x) = \sum c_k e^{2\pi ikx}$, with the sum converging in $L^1$ and the coefficients not necessarily the Fourier coefficients, then the sum must converge almost everywhere, so it can't be the Fourier series. By the previous paragraph, it follows that no such representation as a convergent infinite sum is possible.

So what must happen as one uses density of $C(X)$ and Stone-Weierstrass to approximate such a function $f$ by trigonometric polynomials? If $\|f_n - f\|_{L^1} < \epsilon$, then for all $k$, $|\hat f_n(k) - \hat f(k)| < \epsilon$. One way to think about it is that $\hat f_n(k)$ is forced to be like $\hat f(k)$ whenever the latter is large compared to $\epsilon$, while there's potentially up to an $\epsilon$ of leeway in every coefficient. It is clear that $f_n$ can't just match $f$ in all the Fourier coefficients which are larger than $\epsilon$, though, or else the $L^1$ norm of the resulting sequence would diverge. So density and Stone-Weierstrass are somehow smart enough to use the (less than) $\epsilon$ of room to carry out the $L^1$ approximation.

-
Hey Mike, What you're saying sounds reasonable but I"m a bit confused by something. Isn't saying that there is some $f_n = \sum_k c_{n,k} e^{2 \pi i k x}$ where $||f_n-f||_{L^1} \to 0$ the same as saying that the span of trigonometric polynomials is dense in $L^1$? – Dorian Aug 24 '10 at 23:31
Oh yes, their span is certainly dense in $L^1$, like you said in your post. It is dense in $C([0,1])$ in the sup norm by Stone-Weierstrass, which implies that it's dense in $L^1$ norm as well, from which follows density in all of $L^1$. Since $L^1$ is a metric space, this means there is a sequence of trig polynomials converging to $f$ in $L^1$. – Mike Hall Aug 25 '10 at 2:42
Note that it does not follow that $f$ can be written as an infinite trigonometric series in the $L^1$ sense. In the $L^2$ case you can use Hilbert space geometry to prove that the best $L^2$ approximation to $f$ by an $n$th degree trig polynomial is given by the $n$th partial Fourier series. Stone-Weierstrass implies that trig polynomials are dense in $L^2$, and hence we have $L^2$ convergence of Fourier series. $L^1$, on the other hand, isn't so nice geometrically (there's no inner product which gives the norm). – Mike Hall Aug 25 '10 at 2:44
In answer to Dorian's comment question: yes, dense span is exactly the same as saying existence of $f_n$. However, just knowing a set with dense span in general DOESN'T tell you anything about which coefficients you should actually use! But Fourier series have very special additional properties which can be exploited, as Mike Hall says. (Basically because the Hilbert space $L^2$ is densely embedded in $L^1$, so we can use Hilbert space arguments and orthogonality). – Zen Harper Aug 25 '10 at 2:53

Per @Andrea Ferretti's comments, you have to be careful to distinguish between $\{e^{inx}\}$ and $span \ \{e^{inx}\}$. You certainly are interested the latter. Sorry if my comments were sloppy and confusing above.

So, I think that the it goes like this:

From some corollary of Stone-Weirstrauss you can show that $span \ \{e^{inx}\}$ is dense in $C(\mathbb{S}^1)$ with the supremum norm. Because we know that $C(\mathbb{S}^1)\hookrightarrow L^2([0,1])$ has its image a dense subset of $L^2([0,1])$ and we know that if $f_n \to f$ in the supremum topology on $C(\mathbb{S}^1)$, then the images also converge in $L^2([0,1])$.

Thus, by this reasoning, for $f\in L^2([0,1])$ we can find $f_n \in span \ \{e^{inx}\}$ such that $f_n = L^2([0,1])$. Lets write $$f_n = \sum_{k\in \mathbb{Z}} c_k^{(n)} e^{ikx}$$ where all but finitely many of the $c_k^{(n)}$ are zero (this is because in the span of infinitely many objects we only take a finite number of them to add together)

Now, what I think you are asking is: what can we say about the coefficients $c_k^{(n)}$? The answer is that they converge to the $k$-th Fourier coefficient of $f$ as $n\to\infty$ because $$\hat f(k) = \langle f, e^{ikx} \rangle = \lim_{n\to\infty} \langle f_n ,e^{ikx}\rangle = \lim_{n\to\infty} c_k^{(n)}$$

In fact if $c_k^{(n)}$ are arbitrary complex numbers, defining $f_n$ as above, we see that $$\Vert f - f_n \Vert_{L^2} = \sum_{k\in \mathbb{Z}} |\hat f(k) - c_k^{(n)}|^2$$ assuming convergence. Thus, if $(c_k^{(n)})_k \to (\hat f(k))_k$ as $n\to\infty$ in $\ell^2(\mathbb{Z})$ then $f_n\to f$ in $L^2$, which is a pretty weak condition.

-
You hae misunderstood my question. I'm concerned with $L^1([0,1])$. Of course we have a fourier series in $L^2([0,1])$ but my point is that we get coefficients regardless and we should get convergence in $L^1([0,1])$ as well for certain coefficients (not the fourier coefficients though a priori if our function is not $L^2([0,1])$). – Dorian Aug 24 '10 at 18:59
By Holder's inequality on $[0,1]$, $\Vert f \Vert_{L^1} \leq \Vert f \Vert_{L^2}$ so what I have shown is that if you started with a f that was actually in L2 , then you can replace the L2 convergence statements with L1 convergence. – Otis Chodosh Aug 24 '10 at 19:38
I'm concerned with $f \in L^1([0,1])$ but not in $L^2([0,1])$ so that you can't just use the $L^2$ structure. – Dorian Aug 24 '10 at 23:20