All generalized Fourier coefficients are 0 implies that the function is 0 a.e? Let $e_n$ be an orthonormal complete basis of $L^2[0,1]$. Let $f \in L^1[0,1]$ such that all Fourier coefficients $c_n=\int_0^1 f(x) e_n(x) \,dx$ exist.
Suppose $c_n=0$ for all $n$. This should imply that $f=0$ a.e, right ? How to prove that ? If $f$ was $L^2$, it would be immediate because $f=\sum c_n e_n=0$ in $L^2$, which means $f=0$ a.e.
 A: No.
Take for instance $f(x) = x^{-1/2} \in L^1 \setminus L^2$.  Consider the dense linear space $E_0  \subset L^2$ consisting of all $L^2$ functions which vanish on some neighborhood of $0$.  Then $\ell(h) = \int_0^1 f(x) h(x)\,dx$ is a well-defined linear functional on $E_0$.  Now $\ell$ must be unbounded, else it would extend to a bounded linear functional on $L^2$, and by the Riesz representation theorem this would imply $f \in L^2$.  Since $\ell$ is unbounded, its kernel is a dense linear subspace $E_1 \subset E_0$.  Choosing a countable dense subset for $E_1$ and applying Gram-Schmidt, we obtain an orthonormal set $\{e_n\} \subset E_1$ whose linear span is dense in $E_1$, and therefore also in $L^2$, so it is an orthonormal basis for $L^2$.  But by construction, for every $e_n$ we have $\int_0^1 f(x) e_n(x)\,dx = \ell(e_n) = 0$.
This generalizes: let $f : [0,1] \to \mathbb{R}$ be an arbitrary measurable function not in $L^2$.  Let $h \in E_0$ iff there exists $n$ such that $h$ is supported in the set $\{|f| \le n\}$.  Then you can check that $E_0$ is a dense linear subspace of $L^2$, and clearly $\int_0^1 f(x)h(x)\,dx$ exists for all $h \in E_0$.  Now you can proceed as before to find an orthonormal basis $e_n$ for $L^2$ such that $\int_0^1 f(x) e_n(x)$ exists and equals 0 for every $n$.
