Is there some general way to characterize real symmetrical functions? I am looking for a way to rewrite a function $f: \mathbb{R}^2 \mapsto \mathbb{R}$ that is symmetric in its two arguments. That is:
$$
f(x,y) = f(y,x)
$$
At first I was thinking that since $x$ and $y$ are interchangeable, their influence on the value of $f$ must be the same, hence somewhere within $f$ they must be mapped by some auxiliary function $a$ and then aggregated somehow. For example by summation or multiplication:
$$
f(x,y) = a(x) + a(y) \\
 \text{  or}\\
f(x,y) = a(x)a(y)
$$
We can see that if we compose $f$ with any $g : \mathbb{R} \mapsto \mathbb{R}$, the symmetry remains. Hence if we take the logarithm of the lower equation, we can transform multiplication into addition. This would suggest a general form:
$$
f(x,y) = g(a(x) + a(y))
$$
But the problem is that if we add two symmetric functions, we also get a symmetric function, but the given general form does not stand up to this task:
$$
f_1(x,y) + f_2(x,y) = g_1(a_1(x) + a_1(y)) + g_2(a_2(x) + a_2(y))
$$
Is there some general way to characterize $f$? We can assume any number of finite derivatives of $f$.
 A: In the case where $f$ is a bivariate symmetric polynomial, it is a polynomial of the "Elementary symmetric polynomials"
$$
\begin{align}
e_0(x,y)&=1, \\ 
e_1(x,y)&=x+y, \\
e_2(x,y)&=xy.
\end{align}$$
That is $f(x,y)=P(e_0(x,y),e_1(x,y),e_2(x,y))$ where $P(X,Y,Z)$ is some polynomial of three variables.

In the case where $f(x,y)$ is analytic, it is the limit of its Taylor polynomials, which must be symmetric themselves. Thus, one finds that
$$f(x,y)=\Phi(e_0(x,y),e_1(x,y),e_2(x,y)) $$
where $\Phi(X,Y,Z)$ is an analytic function of three variables.

I don't know how to proceed in the nonanalytic case, but my guess is that it should be of a similar form. 
A: How about this. For any function $g:\Bbb R^{\geq0}\times\Bbb R\to\Bbb R$ you can construct the symmetric function
$$f(x,y):=g(|x-y|,x+y)\qquad\text{or}\qquad f(x,y):=g((x-y)^2,x+y),$$
the letter one preferably if you want to keep the differentiability of $g$. I think you can not really take anything away from this generality, as for any symmetric $f$ you can reconstruct its corresponding $g$ via
$$g(x,y)=f\left(\frac12(y+x),\frac12(y-x)\right).$$
