Problem
ALG-B3-M03-P009 Compatible shifts
#9
★★★★☆ Level 4 of 5
Find all \(f:\mathbb Q\to\mathbb Q\) such that \(f(x+y)=f(x)+f(y)-f(0)\), \(f(x+1)=f(x)+2\), and \(f(2)=7\).
Hint. The second condition gives \(f(2)-f(1)=2\), and the first relates \(f(2)\), \(f(1)\), \(f(0)\).
From \(f(x+1)=f(x)+2\) at \(x=1\), \(f(2)=f(1)+2\), so \(f(1)=5\). From the first equation at \(x=y=1\), \(f(2)=2f(1)-f(0)\), hence \(7=10-f(0)\), so \(f(0)=3\). Then \(g=f-3\) is additive and \(g(1)=2\), so \(g(q)=2q\). Answer: \(f(q)=2q+3\). Direct verification checks all three conditions.
Goal: show which conditions actually force a function to be linear or affine.