Functions $f \geq 0$ on $\mathbb{R}$ which are of the form $f = |g|^2$ for some entire function $g$

I think the answer to this question must be well known. Is it possible to characterize those functions $$f \colon \mathbb{R} \to \mathbb{R}_+$$ which are of the form $$f(x) = |g(x)|^2, x \in \mathbb{R},$$ for some entire function $$g \colon \mathbb{C} \to \mathbb{C}$$. As a simple counterexample let $$f(x) = e^{-1/x^2}$$.

Edit: Alexandre Eremenkos answer allows to reformulate the question.

Which entire functions $$f \colon \mathbb{C} \to \mathbb{C}$$ are nonnegative on $$\mathbb{R}$$?

In his proof he has (essentially) given a characterization with the help of the Weierstrass factorization theorem. Are there other (more direct) characterizations? I know, it's vague.

• $e^{-1/x^2}$ is certainly not of this form, since it vanishes too quickly around $x=0$. Jun 24 '20 at 12:03
• It was meant as a counterexample. I've edited my post. Jun 24 '20 at 12:06
• It is not clear what "chatacterize" means. One characterization is this: there are exactly those positive functions on the real line which are entire. If this characterization answers your question, I can write a proof. Jun 24 '20 at 12:12
• This would answer my question partially. If you have a reference this would suffice. Of course a short sentence of the form "An entire function $f$, defined on $\mathbb{C}$ is not negative on $\mathbb{R}$ iff ..." would be better. Jun 24 '20 at 12:15

These $$f$$ are exactly those non-negative functions on the real line which are entire (=represented by their Taylor series on the whole real line). For example, $$f(x)=(\arctan x)^2$$ is not in your class since the Taylor series at $$0$$ has finite radius of convergence. Neither $$f(x)=e^{-1/x^2}$$ is in your class since the Taylor series at zero does not converge to the function).

Proof. Suppose that $$g$$ is an entire function. Define $$g^*(z)=\overline{g(\overline{z})}$$ which is also entire. Then on the real line $$f(z)=|g(z)|^2=g(z)g^*(z)$$, so your function $$f(x)$$ is non-negative on the real line and entire (as a product of entire functions).

Conversely. Let $$f$$ be an entire function which is non-negative on the real line. Then all real roots are of even multiplicities, and the rest are symmetric with respect to the real line. Let $$X$$ be the divisor in the plane which consists of those roots which lie in the open upper half-plane with their multiplicities, and real roots with half of their multiplicities. We have the Weierstrass factorization $$f=P e^h$$ where $$P$$ is the canonical product, and $$h$$ is entire, both $$P$$ and $$h$$ real on the real line. Let $$P_1$$ be the canonical product over $$X$$, then $$P=P_1P_1^*$$, and set $$g=P_1e^{h/2}$$. Then on the real line $$|g(x)|^2=|P_1(x)|^2|e^{h(x)}|=P(x)e^{h(x)}=f(x).$$

Remark. If $$f$$ has infinitely many non-real zeros, then there are infinitely many different $$g$$'s which give such a representation: the zeros can be split between $$P_1$$ and $$P_1^*$$ in many ways: if $$Y$$ is the divisor of zeros of $$f$$, then any $$X$$ such that $$Y=X+\overline{X}$$ will do the job.

Remark 2. How to determine that a function of a real variable is in fact entire. A criterion is that $$|f^{(n)}(x)|^{1/n}/n\to 0$$ uniformly on compact subsets of the real line. This follows from the Taylor formula with remainder combined with Stirling's formula.

• What is the definition of an entire function $\mathbf{R}\to\mathbf{C}$? I'm only used to the definition of entire function $\mathbf{C}\to\mathbf{C}$.
– YCor
Jun 24 '20 at 12:38
• I wrote in the first sentence in parentheses. Jun 24 '20 at 12:40
• Ah indeed, sorry.
– YCor
Jun 24 '20 at 12:42
• @Ivan Meir: Yes. With essentially the same proof. Weierstrass representation can be generalized to any simply connected neighborhood of the real line. Jun 24 '20 at 13:02
• After thinking a little bit about your answer I think its just what I wanted. Thank you. Jun 24 '20 at 18:27