# Find all continuous functions $f:\mathbb{R}\to\mathbb{R}$, that satisfy $f(xy)=f(\frac{x^2+y^2}{2})+(x-y)^2$

Find all continuous functions $f:\mathbb{R}\to\mathbb{R}$, that satisfy $f(xy)=f(\frac{x^2+y^2}{2})+(x-y)^2$

-
Let $x=0$ first, we see $f(0)=f(\frac{y^2}{2})+y^2$, hence $f(x)=f(0)-2x$ if $x\ge 0$. Then let $y=-x$, we get $f(-x^2)=f(x^2)+4x^2$, hence $f(x)=f(-(-x))=f(-x)+4(-x)=f(0)-2x$ when $x\le 0$.
And it's easily checked that all those functions satisfy the equation. So all you want is $f(x)=-2x+c$ for any constant c.