Find all functions taking rationals to rationals satisfying $f(x+f(y))=f(x)f(y)$ Ok, for this problem, I let $f(y)=a$, and then we have $f(x+a)=f(x)a$. Then, by an easy induction argument, we have $f(x+na)=f(x)a^n$ for some rational numbers $a$ and positive integers $n$.
Now, if $f$ can only take $a$, then it follows $a=0$ or $1$. Furthermore, if there is some $t$ such that $f(t)=0$, then it follows $f(x)=0$ for all $x$. Otherwise, there is some other rational $b$ which $f$ can take. However, I'm not sure how to continue from here. Any thoughts?
 A: Note that this functional equation is equivalent to $$f(x + y) = f(x) y$$ for every $x \in \mathbf{Q}$ and for every $y$ in the range of $f$. If $0$ is in the range, then
$$\begin{align}
f(x) &= f(x + 0) \\
&= f(x)\cdot 0 \\
&= 0
\end{align}
$$
for every $x \in \mathbf{Q}$. The zero function satisfies the functional equation, so this is indeed a solution.
Otherwise, the range does not contain $0$. Since
$$\begin{align}
f(x) &= f[x - f(x) + f(x)] \\
&= f[x - f(x)]f(x),
\end{align}
$$
and $f(x) \neq 0$, we have $$f[x - f(x)] = 1,$$ and $1$ is the range. Hence
$$\begin{align}
f(x + 1) &= f(x)\cdot 1 \\
&= f(x),
\end{align}
$$
and $f$ is periodic for any integer period.
Let $p/q$ be a rational number in the range of $f$. We can assume the fraction is in lowest terms and $q > 0$. You have already shown that $$f\Bigl(x + n \cdot \frac{p}{q}\Bigr) = f(x) \Bigl(\frac{p}{q}\Bigr)^n$$ for every positive integer $n$. It follows that
$$\begin{align}
f(x) &= f(x + p) \\
&= f\Bigl(x + q \cdot \frac{p}{q}\Bigr) \\
&= f(x)\Bigl(\frac{p}{q}\Bigr)^q,
\end{align}
$$
and $(p/q)^q = 1$. The set of rational numbers for which taking a positive integer exponent evaluates to $1$ is $\lbrace\pm1\rbrace$. So, the range of $f$ is contained in $\lbrace\pm1\rbrace$.
If $-1$ is in the range, then
$$\begin{align}
f(x) &= f(x - 1) \\
&= -f(x)
\end{align}
$$
which contradicts the range not containing $0$.
We can conclude after checking that the constant function $1$ satisfies the functional equation that $f \equiv 0$ and $f \equiv 1$ are the only solutions.
A: *

*If $f(y) = 0$ for some $y$, then you have $f(x) = f(x+f(y)) = f(x)f(y) = 0$ for every $x$, ie $f=0$. This gives us a first solution.


*We can now assume that $f(x)\neq 0$ for every $x\in\mathbb Q$.
First, notice that the equation implies :
$$\forall x,y, \quad f(x) = f(x-f(y))f(y)\tag1$$
and
$$\forall x, \quad f(x) = f(x-f(x))f(x)\tag2$$
Now, fix any  $x_0\in\mathbb Q$ and set $y=  x_0-f(x_0)$. From $(2)$, you see that $f(y)=1$. Plugging this in $(1)$, we get :
$$\forall x\in\mathbb Q, f(x)= f(x-1)$$
and by induction :
$$\forall x\in\mathbb Q, \forall k\in\mathbb Z, f(x+k) =f(x)$$
Let $z \in\mathbb Q$ and $a=f(z)$, then OP showed that :
$$f(x + na) = a^nf(x)$$
Since there is $n\in\mathbb N$ such that $na = k\in\mathbb Z$, we have :
$$f(x) = f(x+k) =f(x+na) = a^nf(x)$$
therefore $a = \pm 1$. Since $a\in\mathbb Z$, we have $f(x) = f(x +a) = af(x)$ and $a=1$.

*

*In the end, we see that the only two solutions are the constant fun

