Let $f:\mathbb R\to \mathbb R$ an analytic nonnegative real function that may have zeros. There always exists an analytical real function $g:\mathbb R\to \mathbb R$ such that $f =g^2$?
If $f>0$ then this is true since the square root is analytic on $(0,\infty)$. But when $f$ has some zeros? I imagine that one can inquire the order of the zero locally since they are isolated, and work on the Taylor series, but I'm not totally convinced.
Notice that the other similar questions on this site only asks for strictly positive functions or complex square roots.