Determine all functions $f$ defined on the set of rational numbers that take rational values for which $$f(2f(x) + f(y)) = 2x + y \tag{1}$$ for each x and y.
This question is from the 2008 Canada National Olympiad.
The form of the defining equation strongly suggests a linear function, and that's all I found. Is there a trick somewhere that admits another class of solutions?
Since $x,y\in\mathbb{Q}$ but otherwise take on all possible values, we are free to impose constraints at will.
$$x=y=0: f(3f(0))=0 \tag{2}$$
$$y=x: f(3f(x))=3x \tag{3}$$
$$x=0: f(2f(0)+f(y))=y \tag{4}$$
$$y=0: f(2f(x)+f(0))=2x \tag{5}$$
By (5) and (2)See $\color{blue}{\text{grand_chat}}$'s reasoning:
$$f(x)=0 \implies x=0 \tag{6}$$
So then by (2) again:
$$f(0) = 0 \tag{7}$$
Put $y=2x$ in (4) and equate to (5):
$$\begin{align} & f(2f(0)+f(2x)) = f(2f(x)+f(0)) \\ \implies & 2f(0)+f(2x) = 2f(x)+f(0) &(\color{blue}{\text{f invertible}}) \\ \implies & 2f(x)-f(2x) = f(0) = 0 \\ \implies & f(x)=kx \tag{8} \end{align}$$
Now by (3):
$$f(3f(x))=f(3kx)=3k^2x=3x \implies x=0 \lor k=\pm1$$
Therefore $$\boxed{f(x)=kx,\quad k\in\{-1,1\}}$$
First establish that $f$ is one-to-one: If $f(x)=f(y)=a$, then by (1) we have $f(3a)=2x+y$. Interchanging $y$ and $x$ in (1) yields $f(3a)=2y+x$, hence $x=y$.
To show that $f(x)=0$ implies $x=0$, suppose $f(x)=0$. Then by (3), $f(0)=3x$. Put this into (2) to get $f(9x)=0$. But $f$ is one-to-one, so $x=0$.
We then get $f(0)=0$ by (2). Put this into (4) to obtain $$f(f(y))=y \quad\mbox{for all $y$}. \tag{*}$$
Apply $f$ to both sides of (5) and use (*) to obtain $2f(x)=f(2x)$. Apply $f$ to both sides of (1) and use (*) to obtain $f(2x)+f(y)=f(2x+y)$, from which we conclude that $f$ is linear.
From here, do the usual argument that $f(rx)=rf(x)$ for all integer $r$, and then that this holds for all rational $r$. Put $x=1$ to get that $f(r)=rf(1)$, i.e., $f(x)=kx$ for some rational $k$. Continue from here to your conclusion that $k$ equals $1$ or $-1$.