Real-analytic $f(z)=f\left(\sqrt z\right) + f\left(-\sqrt z\right)$? 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?
 A: As pointed out by Zarrax,
$$
f(z^2)=f(z)+f(-z)\tag{1}
$$
implies
$$
\sum_{k=0}^\infty a_kz^{2k}=2\sum_{k=0}^\infty a_{2k}z^{2k}\tag{2}
$$
therefore,
$$
a_k=2a_{2k}\tag{3}
$$
Obviously, $a_0=0$. Given $a_k$ for odd $k$, $(3)$ allows us to compute all $a_k$.
Functions with power series that satisfy $(3)$ are
$$
\begin{align}
f_n(z)
&=-\log(1-z^{2n+1})\\[6pt]
&=\sum_{k=1}^\infty\frac{z^{k(2n+1)}}{k}\tag{4}
\end{align}
$$
and linear combinations of the $f_n$. Note that the $f_n$ satisfy $(1)$. In fact,
$$
\begin{align}
\sum_{n=0}^\infty\frac{\mu(2n+1)}{2n+1}f_n(z)
&=\sum_{n=0}^\infty\sum_{k=1}^\infty\frac{\mu(2n+1)}{2n+1}\frac{z^{k(2n+1)}}{k}\\[9pt]
&=\sum_{n=1}^\infty\sum_{\substack{d\mid n\\d\text{ odd}}}\mu(d)\frac{z^n}{n}\\
&=\sum_{n=0}^\infty\frac{z^{2^n}}{2^n}\tag{5}
\end{align}
$$
where $\mu$ is the Möbius function. The last equation in $(5)$ follows from
$$
\sum_{\substack{d\mid n\\d\text{ odd}}}\mu(d)
=\left\{\begin{array}{}
1&\text{if $n$ is a power of $2$}\\
0&\text{otherwise}
\end{array}\right.\tag{6}
$$
We can use
$$
\begin{align}
f_n\left(z^{2k+1}\right)
&=-\log\left(1-z^{(2k+1)(2n+1)}\right)\\
&=f_{2kn+k+n}(z)\tag{7}
\end{align}
$$
to write all possible functions satisfying $(1)$ as linear combinations of the $f_n$. That is, use $(5)$ then $(7)$ to get
$$
\begin{align}
\sum_{k=0}^\infty\sum_{n=0}^\infty a_{2k+1}\frac{z^{(2k+1)2^n}}{2^n}
&=\sum_{k=0}^\infty\sum_{n=0}^\infty a_{2k+1}\frac{\mu(2n+1)}{2n+1}f_n\left(z^{2k+1}\right)\\
&=\sum_{k=0}^\infty\sum_{n=0}^\infty a_{2k+1}\frac{\mu(2n+1)}{2n+1}f_{2kn+k+n}(z)\tag{8}
\end{align}
$$
Therefore, all $f$ that satisfy $(1)$ are given by linear combinations of the $f_n$.

For example, we can write the example given by mjqxxxx as
$$
\log(1+z+z^2)=f_0(z)-f_1(z)
$$
A: 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$.
A: Write $f(z) = \sum_n a_nz^n$ as a power series near $z = 0$. Then the equation $f(z^2) = f(z) + f(-z)$ implies that
$$\sum_{n = 0}^{\infty} a_n z^{2n} = \sum_{n=0}^{\infty} a_nz^n + a_n (-z)^n$$
$$= \sum_{n \, even} 2a_n z^n$$
$$= \sum_{n = 0}^{\infty} 2a_{2n} z^{2n}$$
So you have to have $a_{2n} = {1 \over 2}a_n$ for all $n$. Conversely if this holds for all $n$ then the power series for $f(z)$ will satisfy $f(z^2) = f(z) + f(-z)$. So the desired equation $f(z) = f(\sqrt{z}) + f(-\sqrt{z})$ will hold for $z \geq 0$. So for example ${\displaystyle \sum_{k = 0}^{\infty} {z^{2^k} \over 2^k}}$ works. None of these functions can be made entire... if $a_n \neq 0$ then ${\displaystyle \sum_{k=0}^{\infty} a_{2^{k}n}z^{2^{k}n} = 
\sum_{k=0}^{\infty} a_{n}{z^{2^{k}n} \over 2^k}} $ diverges for $z > 1$.
I'm not sure what $f(z) = f(\sqrt{z}) + f(-\sqrt{z})$ is supposed to mean when $z$ is not a nonnegative real number. But if you fix a definition for $\sqrt{z}$ these functions will 
satisfy $f(z) = f(\sqrt{z}) + f(-\sqrt{z})$ too. 
A: Note that if $f(z)$ is an odd function $f(-z) = -f(z)$, then we obtain
$$
f(z) = f(\sqrt{z}) + f(-\sqrt{z}) = f(\sqrt{z}) - f(\sqrt{z}) = 0
$$
Note that if $f(z)$ is an even function $f(-z) = f(z)$, then we obtain
$$
f(z) = f(\sqrt{z}) + f(-\sqrt{z}) = f(\sqrt{z}) + f(\sqrt{z}) = 2 f(\sqrt{z})
$$
So we look for a even function such that
$$
f(z^2) = 2 f(z)
$$
or more general
$$
f(z^n) = n f(z)
$$
The function
$$
\ln(|z|^k)
$$
has this property, so
$$
f(z) = \ln\Big(|z|^k\Big)
$$

Note that
$$
f\big(\pm\sqrt{-z}\big) = \ln\Big(\big|\pm\sqrt{-z}\big|^k\Big) = \ln\Big(\sqrt{|z|}^k\Big)
$$
and is well defined.
