What is the number of linear functions $f$ satisfying $$f(x+f(x)) = x+f(x)$$ $\forall x \in R$ ?
I began by setting $g(x) = x+f(x)$.
Then I applied $f$ on both sides, which gave me
$$f \circ g(x) = f(x+f(x)) = x+f(x) \tag{1}$$
Next, I applied $g$ on both sides:
$$g \circ f \circ g(x) = g(x+f(x)) = g\circ g(x) \tag{2}$$
Here what I've done is calculated $g(f\circ g(x))$, and now I will calculate $g \circ f(g(x))$ and compare. So I need to get to $g\circ f(x)$ first, which I do by simply substituting $f(x)$ in place of $x$ in $g$'s definition:
$$g\circ f(x) = f(x) + f\circ f(x) = f(x) + g(x) \tag{3}$$
Now I substitute $g(x)$ in place of $x$ here.
$$g \circ f \circ g(x) = f\circ g(x) + g\circ g(x) \tag{4}$$
So my two versions of the equations give me
$$g\circ g(x) = f\circ g(x) + g\circ g(x) \tag{5}$$
Or, $f\circ g(x)=0$. And since we have already calculated $f\circ g(x)= x+f(x)$, we simply get $$x+f(x)=0 \implies f(x) = -x \tag{6}$$
I'm missing the very obvious solution of $f(x) = x$, and I can't seem to see what caused this oversight.
I'm doing functional equations after a while, and I did not want to go about solving using the boring "assume $f(x) = ax + b$ and get $a,b$" method, but the fun method seems incomplete :')
Best Answer
There are atleast 2 Issues :
ISSUE 1 : It seems wrong here :
$$g \circ f \circ g(x) = g(x+f(x)) = g\circ g(x) \tag{2}$$
What we should have are :
$$g \circ f \circ g(x) = g(x+f(x)) = (x+f(x)) +f(x+f(x)) \tag{2A}$$ (using Definition of $g$) $$g \circ f \circ g(x) = g(x+f(x)) = (x+f(x)) +f(x+f(x)) = (x+f(x)) +(x+f(x)) \tag{2B}$$ (using Definition of $f$)
There is no connection to $g\circ g(x)$
ISSUE 2 : Here , it wrongly concludes that $f\circ f(x) = g(x)$ :
$$g\circ f(x) = f(x) + f\circ f(x) = f(x) + g(x) \tag{3}$$
When we use these to move further , we might get wrong conclusions. It is a co-incidence that one solution is right eventually.
CONTRADICTION : We can use the Solution to show that the Process was wrong here :
$f(x)=-x$
$g(x)=x+f(x)=x-x=0$
$g(x) \equiv 0$
SUPPORT : We can use the other Solution to show that (2B) is meaningful :
When $f(x)=x$ , $g(x)=x+f(x)=x+x=2x$
$g(g(x))=g(2x)=2x+f(2x)=2x+2x=4x$
That is what we get with (2B) too