Suppose $f \in L^1(0,\pi), f(x)=\sum_{n=1}^{n=\infty}c_{n}\sin(nx).$ I need to understand when $\sum_{n=1}^{n=\infty}c^2_{n}<\infty$.
By Riesz–Fischer theorem if $\sum_{n=1}^{n=\infty}c^2_{n}<\infty$ then there exists a function $f$ such that $f$ is square-integrable and the values $c_{n}$ are the Fourier coefficients of $f$. How can we prove that there are no such functions in $L^1 \setminus L^2$?
Let $f$ be the function defined in the first paragraph of the question, and denote by $g$ the function belonging to $L^2(0, \pi )$, given by Riesz--Fischer, such that $\hat g(n)=c_{n}$, for every $n$.
It then follows that $f-g$ lies in $L^1$ and $$ \widehat{f-g}(n)= 0, \quad\forall n\in {\mathbb N}, $$ so $f=g$ a.e., and hence $f\in L_2$.