A functional equation of two variables

functional-equations

Solve the following functional equation :
$f:\Bbb Z \rightarrow \Bbb Z$, $f(f(x)+y)=x+f(y+2017)$

I have no prior experience with solving functional equation but still tried a bit. I set $x=y=0$ to get $f(f(0))=f(2017)$. Can we apply $f^{-1}$ both sides to get $f(0)=2017$? I am unable to carry this on.

Best Answer

Got it! I probably complicated it more than I had to so if anyone sees any way to simply this I would love to hear feedback.

To solve this, let $y=0$ so that $f(f(x)) = x+f(2017)$. Let $c=f(2017)$. Then for all $x\in\mathbb{Z}$, $$f(f(x)) = x+c$$

Now plugging $x=y=0$ into the original equation we get $f(f(0)) = f(2017)$. Taking $f$ of both sides yields $f(f(f(0))) = f(f(2017))$ which is $f(0)+c=2017+c$ so $f(0) = 2017$.

Now take $f$ of both sides of the original equation to get $f(f(f(x)+y)) = f(x+f(y+2017))$ which is $f(x)+y + c = f(x+f(y+2017))$ Setting $y=-2017$ gives $$f(x)-2017 + c = f(x+f(0)) = f(x+2017)$$.

Now we return again to the original equation with $y=1$. This gives $f(f(x)+1) = x+f(2018)$ which by the above formula is $x+f(1)-2017 + c$. So $$f(f(x)+1)-f(f(x)) = x+f(1)-2017+c - (x+c) = f(1)-2017$$

Now, as $f(f(x)) = x+c$, $f(f(x))$, and thus $f(x)$, can attain all values in $\mathbb{Z}$. So for any $k\in\mathbb{Z}$, there is an $x\in\mathbb{Z}$ such that $f(x)=k$, and so the above formula becomes $$f(k+1)-f(k) = f(1)-2017$$ for all $k\in\mathbb{Z}$. So for all $k\in\mathbb{Z}$, $$f(k) = k+c_2$$ for some $c_2$. So the original equation becomes $$x+y+2c_2=x+y+2017+c_2$$ so $c_2=2017$. Thus the only solution is $$f(x) = x+2017$$