TITLE: Real-analytic $f(z)=f\left(\sqrt z\right) + f\left(-\sqrt z\right)$?
QUESTION [9 upvotes]: Are there nonconstant real-analytic functions $f(z)$ such that
$$ f(z)=f\left(\sqrt z\right) + f\left(-\sqrt z\right)$$
is satisfied near the real line?
Also can such functions be entire?
And/Or can they be periodic with a real period $p>0$?
Does the set of equations
$$ f(z)=f\left(\sqrt z\right) + f\left(-\sqrt z\right)$$
$$ f(z)=f(z+p)$$
$$ f ' (0) > 0$$
imply that  $f(z)= 0 + a_1 z + a_2 z^2 + a_3 z^3 + \dots$, where more than $50\%$ of the nonzero signs of the $a_n$ are positive?
Related:
Real-analytic periodic $f(z)$ that has more than 50 % of the derivatives positive?

REPLY [4 votes]: The simplest example of such a function that is real-analytic over the entire real line is
$$
f(z)=\log\left(1+z+z^2\right).
$$
We have
$$
f(\sqrt{z})+f(-\sqrt{z})=\log\left(1+\sqrt{z}+z\right)+\log\left(1-\sqrt{z}+z\right)\\=\log\left((1+z)^2-z\right)\\=\log\left(1+z+z^2\right)\\=f(z),
$$
as desired.  It's not entire, but is analytic in the neighborhood of the real line, since its branch cuts start at $z=-1/2\pm i\sqrt{3}/2$.