# Simple functional equation. Find $f:\mathbb Q\longrightarrow\mathbb Q$ (own)

Find the functions $f : \mathbb{Q} \mapsto \mathbb{Q}$ knowing that $$2f\left(f\left(x\right)+f\left(y\right)\right)=f\left(f\left(x+y\right)\right)+x+y,\ \forall x,\ y\in\mathbb{Q}$$

-
what did you try, what did you research and is it homework? – epsilonhalbe Jun 24 '12 at 15:01
@epsilon'εⳆ2'halbe : I have a proof for this problem. ive proposed this problem for a math elementary journal from my country. – Claudiu Mindrila Jun 24 '12 at 15:34
what exactly is your question then - you have a proof, and want to have us prove it again? – epsilonhalbe Jun 24 '12 at 16:38
Sorry, youre right. I want you to find the functions. – Claudiu Mindrila Jun 24 '12 at 17:45
@ClaudiuMindrila: Well, two solutions are $x\mapsto x$ and $x\mapsto -x$. There might be others though. – Dejan Govc Jun 24 '12 at 21:41

First of all, to make things easier to write, let $u:=f(0)$. In the text that follows, I shall use the word "equation" to refer to the functional equation from the question. We start by proving:

Lemma 1. Suppose $f$ is a solution of the equation. Then $f$ is injective.

Proof. Suppose $f(x_0)=f(y_0)=a_0$. Then the equation tells us: $$f(a_0)+x_0=2f(a_0+u)=f(a_0)+y_0$$ For the first equality, we simply plug $x=x_0,y=0$ into the equation and for the second equality, we plug in $x=0,y=y_0$. But this immediately gives us $x_0=y_0$ and we are done. $\square$

Next, we notice:

Lemma 2. Suppose $f$ is a solution of the equation. Then for all $x,y\in\Bbb Q$: $$f(x+y)+u=f(x)+f(y)$$ holds.

Proof. Let $x_0,y_0\in\Bbb Q$. Then the equation tells us: $$2f(f(x_0)+f(y_0))=f(f(x_0+y_0))+x_0+y_0=2f(f(x_0+y_0)+u)$$ Here, we get the first equality by plugging $x=x_0,y=y_0$ into the equation, and the second one by plugging in $x=x_0+y_0,y=0$. But since $f$ must be injective by the first lemma, this means precisely that $$f(x_0)+f(y_0)=f(x_0+y_0)+u$$ which is what we wanted to show. $\square$

Lemma 3. Suppose $f$ is a solution of the equation. Then there exists a $c\in\Bbb Q$ such that $f(x) = cx+u$ for $x\in\Bbb Q$.

Proof. Define another function $h$ by $h(x)=f(x)-u$ for $x\in\Bbb Q$. Then for all $x,y\in\Bbb Q$ we have $$h(x+y)=f(x+y)-u=f(x)-u+f(y)-u=h(x)+h(y)$$ where the second equality follows by the second lemma. So $h$ is an additive function. By the standard argument, there is a constant $c\in\Bbb Q$ such that $h(x)=cx$ for all $x\in\Bbb Q$. But then $f(x)=cx+u$. $\square$

Now, since every solution must be of this form, we can now simply substitute this in the functional equation, which gives us: $$2(c(cx+u+cy+u)+u)=c(c(x+y)+u)+u+x+y$$ for all $x,y\in\Bbb Q$. Now we plug $x=0,y=0$ and $x=0,y=1$ into this to get the following equations (after simplifying): $$(3c+1)u=0\\3cu+c^2+u-1=0$$

First of these tells us that in order for $f$ to be a solution, we must either have $u=0$ or $c=-\frac13$. But plugging $c=-\frac13$ into the second equation gives us $1 = \frac19$, which is false, so $c=-\frac13$ is not a possibility. Therefore $u$ must indeed be $0$.

But plugging this into the second equation gives us $c^2=1$, so either $c=1$ or $c=-1$. So the only possible solutions are $f=\pm\operatorname{id}_{\Bbb Q}$ and as these are indeed solutions, we have proved:

Proposition. A function $f$ is a solution of the equation if and only if $f=\pm\operatorname{id}_{\Bbb Q}$.

-