When is an analytic function in $L^2(\Bbb R)$? I asked this question on Math Stack Exchange some time ago and a similar question recently appeared regarding $L^1$ instead see here This has prompted me to bring it to this community in the hopes of getting an answer, partial answer, or even perhaps literature that addresses this question. Text from initial post below. Original post.

Suppose $f:\Bbb R\to\Bbb R$ is (real?) entire. In order for $f$ to be in $L^2(\Bbb R)$, clearly all terms in the power series cannot be positive since $f$ would diverge at $\pm\infty$. Likewise, the distribution of negative terms cannot go to zero so we see that the power series for $f$ must be alternating (in some fashion). However this does not tell us much.
Taking $f(x) = \sum\limits_{n=0}^{\infty} \dfrac{(-1)^n}{n!}x^{2n}$ gives $f(x) = \exp(-x^2)$ and is in $L^2(\Bbb R)$. In this case, the coefficients have factorial decay but it is not immediately obvious what kind of decay the coefficients can have while still giving rise to an $L^2$ function.
Are there sufficient conditions on the power series coefficients that will ensure that the function is in $L^2(\Bbb R)$? For instance, are there asymptotic bounds on the coefficients that will ensure that the function is in $L^2(\Bbb R)$ or is this an impossible task?
 A: *

*Since you ask about "real analytic functions", should it be $f:\mathbb{R}\to \mathbb{R}$ instead of $f:\mathbb{R}\to \mathbb{C}$?

*I think analyticity is a "local" concept according to its definition.

*Because of 2, $f$ may not have a global power series expansion. For example, $1/(1+x^2)$ is real analytic over $\mathbb{R}$, but the radius of convergence for its power series expansion at $0$ is $1$.

*Regardless of 1-3, even assuming you were talking about real analytic functions with a global power series expansion, we have 
$$\cos x = \sum_0^\infty (-1)^n\dfrac{x^{2n}}{(2n)!},$$
where the absolute values of coefficients decay much faster than the example you gave. However, $\cos x \notin L^1(\mathbb{R})\cup L^2(\mathbb{R})$.

*Actually, intuitively, the faster it decays, the less possible it will be in $L^2(\mathbb{R})$. Consider $f(x)=x$, where all coefficients vanish for terms $x^n (n > 1)$. Of course, $f$ is real analytic with a globally convergent power series expansion but $f\notin L^p(\mathbb{R})$ for any $0<p\leq \infty$.

