Let $g(x_1,x_2)$ be a real-anaytic function of the pair $(x_1,x_2)$.
Also, suppose that $g(x_1,x_2)$ is only a fuction of $\|x\|=\sqrt{x_1^2+x_2^2} $. That is \begin{align} h(\|x\|)= g(x_1,x_2). \end{align}
Question: Is $h(\|x\|)$ an analytic function of $\|x\|$?
Yes, because we can define $$h(t) = g(t,0)$$ an analytic function on $\mathbb{R}$. Then clearly $$h(\|x\|)= g(\|x\|,0) = g(x_1,x_2)$$ Note that $h$ is an even function, $h(-t)= h(t)$ for all $t$.
A related question is whether we have $g(x_1, x_2)=f(\|x\|^2)$ for some analytic function $f$ (equivalently, is $h(t)= f(t^2)$?) One can find such a (unique such ) function $f$ analytic, but $f$ may only be defined on $(-\delta, \infty)$ for some $\delta>0$.