Suppose that a function $f: \mathbb{R}^3 \to \mathbb{R}$ satisfies that
$$f(ax+b,ay+b,az+b)=af(x,y,z)+b$$
for all $a,b \in \mathbb{R}$, is it true $f(x,y,z)=f(1,0,0)x+f(0,1,0)y +(1-f(1,0,0)-f(0,1,0))z$?
I know it's true for $f(ax+b,ay+b)=af(x,y)+b$, since $f(x,y) = f(x-y,0)+y = (x-y)f(1,0)+y = f(1,0)x+(1-f(1,0))y$, but can't figure out how to proceed with 3 variables.
My guessing is that the function you are studying need not to be linear. The counterexample is, for example $$ f(x,y,z) = x + \sqrt[3]{(x-y)(x-z)(y-z)} $$
You can easily verify that
$$ f(ax,ay,az) = ax + \sqrt[3]{a^3(x-y)(x-z)(y-z)} = af(x,y,z) $$
and
$$f(x+b,y+b,z+b) = x + b + \sqrt[3]{(x-y)(x-z)(y-z)} = f(x,y,z) + b$$ but clearly $f$ is not linear