Find all continuous function $f:(0,\infty)\to\mathbb{R}$ such that $$(f(x)-f(y))\left( f\left(\frac{x+y}{2}\right) -f(\sqrt{xy})\right) =0,\forall x,y \in (0,\infty).$$
My try: Assume $f:[0,\infty)\to\mathbb{R}$ such that $$(f(x)-f(y))\left( f\left(\frac{x+y}{2}\right) -f(\sqrt{xy})\right) =0,\forall x,y \in [0,\infty).$$
By continuity of $f$ and replace $y$ by $0$, I can prove that $f=C$. But I have no idea for this case.