Functional equation: $f(f(x,y), z) = f(x, f(y,z))$ I am curious to know about the functions $f \colon \mathbb{R}^2_{\geq 0} \to \mathbb{R}_{\geq 0}$ that satisfy the following equality. For each $\{x,y,z\} \subseteq \mathbb{R}_{\geq 0}$,$$f( f(x,y), z) = f(x, f(y,z)).$$ Examples of such functions include 


*

*$f_1(x,y) = 1$

*$f_2(x,y) = x$

*$f_3(x,y) = x + y + 1$

*$f_4(x,y) = xy$

*$f_5(x,y) = \max\{x,y\}$

*$f_6(x,y) = \sqrt{x^2 + y^2}$


In addition, I require $f(x,y) = f(y,x)$ (disqualifies $f_2$) and $f(x,0) = x$ (disqualifies $f_1$, $f_3$, $f_4$). 
From the examples, my wild conjecture is that $f$ has to be homogeneous of degree 1, but I cannot prove this. Any pointers on how to proceed are much appreciated!
Edit: I was also considering the following related question.
Let $f$ be homogeneous of degree 1 and satisfy the additional requirements, so $f(x,y) = f(y,x)$ and $f(x,0) = x$. Does $f$ then satisfy the main equality, $f( f(x,y), z) = f(x, f(y,z))$?
This also turns out to be false; a counter-example is $f(x,y) = \sqrt{xy} + x + y$.
 A: The property that $f(x,f(y,z)) = f(f(x,y),z)$ means that $f$ is an associative product.
$f(x,y) = f(y,x)$ means $f$ is a commutative product.
$f(x,0) = f(0,x) = x$ means $0$ is the unit of this product.
The triple $(\mathbb{R}_{\ge0},f,0)$ is called a commutative monoid, and your question is essentially about characterizing commutative monoid structures on $\mathbb{R}_{\ge0}$.
Unfortunately without more constraints there are a huge number of such structures that can behave pretty wildly. Here is an example of such a wild example:
Fix an arbitrary bijection $g: \mathbb{R}_{\ge0} \to \mathcal{P}(\mathbb{N})$ where $\mathcal{P}$ denotes the power set, which sends $0$ to the empty set.  We can define a $f$ via the formula $f(x,y) = g^{-1}(g(x) \cup g(y))$.  This will have the property that whatever $x$ gets sent to the whole set $\mathbb{N}$ satisfies $f(x,y)=x$ for all $y$, and this is definitely not homogeneous.
A: Try $f(x,y) = xy+x+y = (x+1)(y+1)-1$.  It satisfies all of the conditions and is not homogeneous.
