Find all functions $f : \mathbb{Q} \to \mathbb{R}$ such that $f(x)f(y)f(x+y) = f(xy)(f(x) + f(y))$ for all $x,y\in\mathbb{Q}$. Sammy Luo and Alex Zhu.
Problem
Source: ELMO Shortlist 2012, A8
Tags: function, modular arithmetic, induction, algebra, functional equation, algebra proposed
02.07.2012 16:34
Hint. Determine $f(1)$ first, using recurrence.
03.07.2012 18:21
Hm, I solved every case except one: $f(0) = 0, f(1) = -2, f(-1) = 2$. Stuffs just get zeroed everywhere. Any help on that case?
08.07.2012 22:42
Lolwut zhero (or whoever the proposer was) definitely stole the idea from me: http://www.artofproblemsolving.com/Forum/viewtopic.php?p=2425754#p2425754 (That's a WOOT link so if you can't see it, look here: http://www.artofproblemsolving.com/Forum/blog.php?u=53945&b=59484) But yeah, I guess changing $\mathbb{R}$ to $\mathbb{Q}$ turns a massive troll problem into a problem that's actually pretty nice. Too bad I didn't make MOP this year
11.05.2013 02:44
This proof is fairly lengthy, on account of the $7$ distinct solutions to this functional equation, so we'll present it in stages. First we give the final solution set and leave it to the reader to check that they work. Next, we'll show that unless $f(0) = 0$ and $f(2) = 2$ we have only the trivial solutions $f(x) = 0$, $f(x) = 2$. Then we introduce the set $S$ of zeroes of $f$, and prove some simple but important facts about $S$ and its complement. Finally, we will prove $f(1) \in \{-2, -1, 1, 2\}$, and for each value give a complete characterization of the corresponding solution(s) (or, in the case of $-1$, show there is no valid corresponding solution).
06.06.2015 06:43
The previous post overflowed the new AoPS, so I've cut it into two parts. Here's the other half. EDIT: So in my infinite wisdom I managed to somehow lose Cases 1-3 of the hyperbolictangent's work during copy-pasting. Sorry about that! I've re-solved them myself and writen them up here. So mistakes in Cases 1-3 are due to me. Quote: Observe that by putting $x=1$, $y=a$ we derive that \[ f(a) = 0 \text{ or } f(a+1) = 1 + \frac{f(a)}{c} \qquad (\ast) \] for all $a$.
In all, the $7$ solutions we mentioned at the beginning of this proof are the only ones. $\blacksquare$ I guess you could keep it an $\mathbb{R}$ to $\mathbb{R}$ functional equation if you imposed the additional restriction that $f$ be continuous, although that would rule out the most interesting of the solutions.
12.12.2021 23:22
This took forever. Can someone tell me if I made a mistake somewhere? Solved with hint from here (the solution set) Find all functions $f\colon \mathbb{Q}\to \mathbb{R}$ that satisfy \[f(x)f(y)f(x+y)=f(xy)(f(x)+f(y))\]for all $x,y\in\mathbb{Q}$. Proposed by Sammy Luo and Alex Zhu Let $P(x,y)$ denote the given assertion. $P(0,0): f(0)^3=2f(0)^2$, so $f(0)\in\{0,2\}$. Case 1: $f(0)=2$ \[P(0,x): 2f(x)^2=2(f(x)+2)\implies f(x)^2=f(x)+2\implies f(x)^2-f(x)-2=0\implies f(x)\in\{-1,2\}.\] For $x\ne1$, noting that $x+\frac{x}{x-1}=x\cdot \frac{x}{x-1}$, we have \[P(x,\frac{x}{x-1}): f(x)f(\frac{x}{x-1})=f(x)+f(\frac{x}{x-1})\] Both of $f(x)$ and $f(\frac{x}{x-1})$ are $-1$ doesn't work. One of them being $2$ and the other being $-1$ also doesn't work. So $f(x)=f(\frac{x}{x-1})=2$. $P(\frac{1}{2},\frac{1}{2}): 4f(1)=8\implies f(1)=2\implies \boxed{f\equiv 2}$, which works. Case 2: $f(0)=0$ If $f(1)=0$, then $P(x,1): f(x)^2=0\implies \boxed{f\equiv0}$, which works. So henceforth assume $f(1)\ne0$. Claim: If $f(k)=0$, then $f(ck)=0$ for any $c$ so that $f(c)\ne0$. Proof: \[P(k,c): f(ck)f(c)=0\implies f(ck)=0.\]$\square$. Claim: If $f(p), f(q)\ne0$, then $f(pq)\ne0$. Proof: First we will show that $f(\frac{p}{q})\ne0$. Suppose not. Then $f(\frac{p}{q}\cdot q)=0\implies f(p)=0$, a contradiction. So \[f(\frac{1}{q})\ne0\implies f(\frac{p}{\frac{1}{q}})=f(pq)\ne0,\]as desired $\square$. Let $f(1)=k$ and suppose $k\ne \{-2,-1,1,2\}$. $P(1,1): k^2f(2)=2k^2\implies f(2)=2$. $P(x,1): kf(x)f(x+1)=f(x)(f(x)+k)\implies f(x)=0\text{ or }kf(x+1)=f(x)+k$. So $kf(3)=k+2\implies f(3)=1+\frac{2}{k}\ne0$ as $k\ne-2$. We have $kf(4)=k+1+\frac{2}{k}\implies f(4)=1+\frac{1}{k}+\frac{2}{k^2}$, which is nonzero over the reals. So $kf(5)=k+1+\frac{1}{k}+\frac{2}{k^2}\implies f(5)=1+\frac{1}{k}+\frac{1}{k^2}+\frac{2}{k^3}$. Claim: $f(5)\ne0$. Proof: Suppose not. Since $f(2),f(3)\ne0$, $f(6)\ne0$. $P(2,3): f(6)(f(2)+f(3))=0\implies f(2)=-f(3)\implies 1+\frac{2}{k}=-2\implies \frac{2}{k}=-3\implies k=-\frac{2}{3}$, which doesn't satisfy $f(5)=0$ $\square$. Now we get $f(6)=1+\frac{1}{k}+\frac{1}{k^2}+\frac{1}{k^3}+\frac{2}{k^4}$. $P(2,3): (2+\frac{4}{k})(1+\frac{1}{k}+\frac{1}{k^2}+\frac{2}{k^3})=(1+\frac{1}{k}+\frac{1}{k^2}+\frac{1}{k^3}+\frac{2}{k^4})(3+\frac{2}{k})$. This expands to $\frac{8}{k^4}+ \frac{8}{k^3} + \frac{6}{k^2} + \frac{6}{k} + 2 = \frac{4}{k^5} + \frac{8}{k^4} + \frac{5}{k^3} + \frac{5}{k^2} + \frac{5}{k} + 3$ Multiplying both sides by $k^5$ gives $8k+8k^2+6k^3+6k^4+2k^5=4+8k+5k^2+5k^3+5k^4+3k^5\implies k^5-k^4-k^3-3k^2+4=0$. We note that $-1,1,2$ are all roots to the equation and the roots sum up to $1$ and multiply up to $-4$ by Vieta's. $r+s=-1, rs=2$. So $s(-1-s)=-s^2-s=2\implies s^2+s=-2\implies s^2+s+2=0$, which implies the other two roots roots are not real. This is a contradiction as we assumed $k\ne\{-2,-1,1,-2\}$. So $k\in\{-2,-1,1,2\}$. $P(x,1): kf(x)f(x+1)=f(x)(f(x)+k)\implies f(x)=0\text{ or }kf(x+1)=f(x)+k$ Subcase 2.1: $k=-2$. Either $f(x)=0$ or $-2f(x+1)=f(x)-2\implies f(x+1)=\frac{2-f(x)}{2}$. Claim: $f(x)=2$ if $x\equiv 2\pmod 3$, $f(x)=0$ if $x\equiv 0\pmod3$, and $f(x)=-2$ if $x\equiv 1\pmod3$ for all positive integers $x$. Proof: We proceed by induction, base cases $x=1,2,3$. Suppose $a\equiv 1\pmod 3$, $f(a)=-2$. Then $-2f(a+1)=-4\implies f(a+1)=2$. Suppose $b\equiv 2\pmod 3$ and $f(b)=2$. Then $-2f(b+1)=0\implies f(b+1)=0$. Suppose $c\equiv 0\pmod 3$, $f(c)=0$, and all positive integers less than $c$ satisfy the claim's condition. Then we must show that $f(c+1)=-2$, and this will finish the induction. Suppose not and $f(c+1)=0$. $P(2,c-1): f(2c-2)=0$, but we also know that $f(2c-2)\ne0$ as $f(2),f(c-1)\ne0$. So we know that $f(c+1)\ne0$. Now we suppose that $f(c+3)\ne0$. Then it's obvious that $f(c+6)=0$. $P(2,c+3): 2f(c+3)f(c+5)=f(2c+6)(2+f(c+3))$. If $f(c+5)=0$, then $f(c+3)=-2, f(c+2)=6, f(c+1)=-10$. $P(4,c+1): 0=f(4c+4)$, which is obviously a contradiction. So $f(c+5)\ne0\implies f(c+5)=2\implies f(c+4)=-2\implies f(c+3)=6\implies f(c+2)=-10\implies f(c+1)=22$. Now $P(5,c+1): 0=f(5c+5)$, a contradiction. So $f(c+3)=0\implies f(c+2)=2\implies f(c+1)=-2$, as desired. We have $f(\frac{p}{q})\ne0$ if $3\nmid pq$. Claim: If $3|pq$, then $f(\frac{p}{q})=0$. If $3|p$, then $P(\frac{p}{q},q): f(\frac{p}{q})f(q)f(\frac{p}{q}+q)=0$. Since $f(q)\ne0$, either $f(\frac{p}{q})=0$ or $f(\frac{p+q^2}{q})=0$, but we know the latter isn't true as $3\nmid p+q^2,q$. So $f(\frac{p}{q})=0$. If $3|q$, then $P(\frac{p}{q},q): f(p)f(\frac{p}{q})=0\implies f(\frac{p}{q})=0$ $\square$. If $3|\frac{p}{q}+1=\frac{p+q}{q}$, then $f(\frac{p}{q})=2$. So $f(\frac{p}{q})=2$ if $3|p+q$ and $3\nmid pq$. If $3|\frac{p}{q}-1=\frac{p-q}{q}$, then $f(\frac{p}{q})=-2$. So $f(\frac{p}{q})=2$ if $3|p-q$ and $3\nmid pq$. So $ f(\frac{p}{q})= \begin{cases} 0 \text{ for } 3|pq \\ 2 \text{ for } 3\nmid pq \text{ and }3|p+q \\ -2 \text { for } 3\nmid pq\text{ and }3|p-q \\ \end{cases}\forall \frac{p}{q}\in\mathbb{Q^{+}}$ $P(1,-1): f(-1)(-2+f(-1))=0\implies f(-1)\in\{0,2\}$. Subcase 2.1.1: $f(-1)=2$. If $f(\frac{p}{q})=0$, then $P(\frac{p}{q}, -1): f(-\frac{p}{q})f(-1)=0\implies f(-\frac{p}{q})=0$. If $f(\frac{p}{q})=2$, then first we note that $f(\frac{p}{q}-1)=f(\frac{p-q}{q})=-2$. $P(\frac{p}{q}, -1): 8=4f(-\frac{p}{q})\implies f(-\frac{p}{q})=2$. Now using $P(x,1) $, we can check that $f(-\frac{p}{q})=-2$ if $f(\frac{p}{q})=-2$. Thus, the only solution here (assuming $m$ and $n\ne0$ are relatively prime integers or $m=0$) is \[ \boxed{f(\frac{m}{n})= \begin{cases} 0 \text{ for } 3|mn \\ 2 \text{ for } 3\nmid mn \text{ and }3|m+n \\ -2 \text { for } 3\nmid mn\text{ and }3|m-n \\ \end{cases}\forall \frac{m}{n}\in\mathbb{Q}},\]which works. Subcase 2.1.2: $f(-1)=0$. Now, for any $p$ and $q$ so that $3\nmid pq$, $f(-\frac{p}{q})=f(-1\cdot \frac{p}{q})=0$. $P(-3a,1): f(-3a)(f(-3a)-2)=0\implies f(-3a)\in\{0,2\}$ for all positive rationals $a$. Claim: $f(-\frac{p}{q})=0$ when $3|p$. Proof: Suppose $3|p$, let $\nu_3(p)=k$, and let $p=3^k m$, where $3\nmid m$. $P(-3^k m,\frac{1}{q}): f(-3^k m)f(\frac{1}{q})f(-3^k m+\frac{1}{q})=f(\frac{-3^k m}{q})(f(-3^k m)+f(\frac{1}{q}))$. The LHS is equal to $0$ because $-3^k m+\frac{1}{q}<0$ and has both numerator and denominator not divisible by $3$. So either $f(-\frac{p}{q})=0$ or $f(-3^k m)=-f(\frac{1}{q})$. Using $f(-2\cdot 3^k m+\frac{1}{2q})=0$, we get $P(-2\cdot 3^k m,\frac{1}{2q}): f(-\frac{3^k m}{q})(f(-3^k m)+f(\frac{1}{2q}))=0$ So either $f(-\frac{p}{q})=0$ or $f(-3^k m)=-\frac{1}{2q}$. Since one of $\{f(\frac{1}{q}),f(\frac{1}{2q})\}$ is $-2$ and the other is $2$, they are not equal and so the latter possibility can't hold true for both of them, which implies $f(-\frac{p}{q})=0$, as desired $\square$. If $3|q$, then $P(-\frac{p}{q},-\frac{q}{p}):-2f(-\frac{p}{q})=0\implies f(-\frac{p}{q})=0$. Thus, our only solution here is \[\boxed{f(\frac{p}{q})= \begin{cases} 0 \text{ for } 3|pq \\ 2 \text{ for } 3\nmid pq \text{ and }3|p+q \\ -2 \text { for } 3\nmid pq\text{ and }3|p-q \\ \end{cases}\forall \frac{p}{q}\in\mathbb{Q^{+}}\text{ and }f(x)=0\forall x\in\mathbb{Q_{\le \text{ 0}}}},\]which works. Subcase 2.2: $k=-1$. We have $-f(x+1)=f(x)-1\implies f(x+1)=1-f(x)$ if $f(x)\ne0$. So by induction for positive integers $n$, $f(n)=-1$ for odd $n$ and $f(n)=2$ for even $n$, which implies $f$ is nonzero over the positive integers. Suppose there exists a positive real $\frac{p}{q}$ so that $f(\frac{p}{q})=0$, where $p$ and $q$ are relatively prime positive integers. Then $f(\frac{p}{q}\cdot q)=0=f(p)$, a contradiction, so $f$ is nonzero over the positive reals. Thus, for positive reals $x$, $f(x+2)=1-f(x+1)=1-(1-f(x))=f(x)$. $P(2,\frac{1}{2}): 2f(\frac{1}{2})^2=-2-f(\frac{1}{2})\implies 2f(\frac{1}{2})^2+f(\frac{1}{2})+2=0$, which has no solutions over the reals. Subcase 2.3: $k=1$. Then either $f(x)=0$ or $f(x+1)=f(x)+1$. From here, it's obvious by simple induction that $f(n)=n$ for $n\in\mathbb{N}$. This implies $f$ is nonzero over the positive rationals. Assume $p$ and $q$ are relatively prime positive integers. \[P(\frac{p}{q},q): f(\frac{p}{q})q(f(\frac{p}{q})+q)=p(f(\frac{p}{q})+q)\implies f(\frac{p}{q})\in \{\frac{p}{q},-q\}.\] If $f(\frac{p}{q})=-q$, then $f(\frac{p}{q}+q)=0$, which is a contradiction as $\frac{p}{q}+q$ is positive. So $f(x)=x\forall x\in\mathbb{Q^{+}}$. Now we look at negative rationals. We note that either $f(-\frac{p}{q})=0$ or $f(-\frac{p}{q})=-\frac{p}{q}$. Subcase 2.3.1: $f(-1)=-1$. $P(-1,-\frac{p}{q}): -f(-\frac{p}{q})f(-\frac{p}{q}-1)=\frac{p}{q}(-1+f(-\frac{p}{q}))$. If $f(-\frac{p}{q})=0$, then $-\frac{p}{q}=0$, a contradiction. So $\boxed{f(x)=x\forall x\in\mathbb{Q}}$, which clearly works. Subcase 2.3.2: $f(-1)=0$. $P(-1,-\frac{p}{q}): \frac{p}{q}f(-\frac{p}{q})=0\implies f(-\frac{p}{q})=0$. This gives the solution $\boxed{f(x)=x\forall x\in\mathbb{Q^{+}}\text{ and }f(x)=0\forall x\in\mathbb{Q_{\le\text{0}}}}$, which works. Subcase 2.4: $k=2$. Then either $f(x)=0$ or $2f(x+1)=f(x)+2\implies f(x+1)=\frac{f(x)+2}{2}$. By simple induction, $f(x)=2$ for all positive integers $x$. So $f$ is nonzero over the positive rationals. By induction again, we have $f(x+q)=\frac{f(x)+2^{q+1}-2}{2^{q}}$ $P(\frac{p}{q},q): 2f(\frac{p}{q})f(\frac{p}{q}+q)=2(f(\frac{p}{q}+2)\implies f(\frac{p}{q})f(\frac{p}{q}+q)=f(\frac{p}{q})+2=f(\frac{p}{q})\frac{f(\frac{p}{q})+2^{q+1}-2}{2^{q}}$. Setting $f(\frac{p}{q})=k$, we get $k+2=k(\frac{k}{2^{q}}+2-\frac{2}{2^{q}})$. Solving the equation (it must have at most two solutions as it's a quadratic) gives $k\in\{2,-2^{q}\}$. Suppose $f(\frac{p}{q})=-2^q$ for some $p$ and $q$. Looking at $f(\frac{p}{q}+2q)$, we see that it must be either $-2^q$ or $2$. But $P(\frac{p}{q},2q): -2^{q+1}f(\frac{p}{q}+2q)=-2^{q+1}+4$. $f(\frac{p}{q}+2q)=2$ clearly doesn't work. If $f(\frac{p}{q}+2q)=-2^q$, then $-2^{q+1}+4$ is positive, a contradiction. So $f(x)=2\forall x\in\mathbb{Q^{+}}$. Subcase 2.4.1: $f(-1)=2$. $P(1,-1): f(1)+f(-1)=0$, a contradiction. Subcase 2.4.2: $f(-1)=0$. $P(-1,-\frac{p}{q}): 2f(-\frac{p}{q})=0\implies f(-\frac{p}{q})=0$. This gives the solution $\boxed{f(x)=2\forall x\in\mathbb{Q}\text{ and }f(x)=0\forall x\in\mathbb{Q_{\le\text{ 0}}}}$, which works. For anyone who wants to know, I will write the proof that all $7$ solutions work. $f\equiv 0$ is trivial. $f\equiv 2$ gives $2\cdot 2\cdot 2=2(2+2)$, which is true. $f(x)=x$ gives $xy(x+y)=xy(x+y)$, which is true. For $f(x)=x\forall x\in\mathbb{Q^{+}}\text{ and }f(x)=0\forall x\in\mathbb{Q_{\le\text{0}}}$ we can use casework. We only have three cases as the equation is symmetric. Case 1: $x,y$ negative. Trivial, both sides are zero. Case 2: $x$ negative $y$ positive. Trivial since $xy$ is negative, both sides are zero. Case 3: $x,y$ positive. True since $f(x)=x$ is a solution to this FE. For $f(x)=2\forall x\in\mathbb{Q}\text{ and }f(x)=0\forall x\in\mathbb{Q_{\le\text{ 0}}}$, we use casework again. Case 1: $x,y$ negative. Trivial. Case 2: $x,y$ positive. True since $f\equiv 2$ is a solution to this FE. Case 3: $x$ positive and $y$ negative. Trivial since $xy$ is negative, both sides are zero. For $f(\frac{m}{n})= \begin{cases} 0 \text{ for } 3|mn \\ 2 \text{ for } 3\nmid mn \text{ and }3|m+n \\ -2 \text { for } 3\nmid mn\text{ and }3|m-n \\ \end{cases}\forall \frac{m}{n}\in\mathbb{Q}$, we can use casework again. Note if we pick $x$ or $y$ to be $\frac{m}{n}$ with $3|mn$, it's trivial as both sides are $0$. If $f(x)=2$ and $f(y)=-2$, or the other way around, $x+y\equiv0\pmod 3$, and $f(x)+f(y)=0$, which implies LHS=RHS$=0$. If $f(x)=f(y)=2$, then $f(x+y)=f(xy)=-2$. So it's easy to see that LHS=RHS$=8$. If $f(x)=f(y)=-2$, then $f(x+y)=2$ and $f(xy)=-2$. So LHS=RHS$=8$. The last solution is $f(\frac{p}{q})= \begin{cases} 0 \text{ for } 3|pq \\ 2 \text{ for } 3\nmid pq \text{ and }3|p+q \\ -2 \text { for } 3\nmid pq\text{ and }3|p-q \\ \end{cases}\forall \frac{p}{q}\in\mathbb{Q^{+}}\text{ and }f(x)=0\forall x\in\mathbb{Q_{\le \text{ 0}}}$. This obviously works for $x,y$ negative because both sides are zero. For $x$ positive $y$ negative, $xy$ is negative, so both sides are zero. For $x,y$ positive, since $f(\frac{m}{n})= \begin{cases} 0 \text{ for } 3|mn \\ 2 \text{ for } 3\nmid mn \text{ and }3|m+n \\ -2 \text { for } 3\nmid mn\text{ and }3|m-n \\ \end{cases}\forall \frac{m}{n}\in\mathbb{Q}$ works, we get LHS=RHS. For anything with $f(0)=0$, we get LHS=RHS$=0$. The only other solution is when $f\equiv 2$, in which setting $x=0$ or $y=0$ obviously works.
21.07.2023 04:59
Megarnorz. Also this problem is more long than hard. Probably could headsolve if orz enough. Denote the assertion with $P(x, y)$. By $P(0, 0)$ it follows that either $f(0) = 0$ or $f(0) = 2$. Claim: If $f(0) = 2$ then $f(x) = 2$. Proof. $P(0, a)$ means that \[ f(a)^2 = 2 + f(a) \]so $f(x) \in \{-1, 2\}$. It follows that if $f(x) = -1$, then $f(y) = -1$ implies that $f(x + y)$ is the other possible value. Suppose that $f(x) = -1$ for some $x$. Since $f(2x + y) = f(y)$ it follows that $f$ is cyclic on the integers. Let $c$ be the minimal positive integer for which $f(c) = -1$. If $c > 1$, then $P(x, 1)$ implies that \[ 2f(x + 1) = f(x) + 2 \]which means that if $f(x) = 2$ then $f(x + 1) = 2$. However, this contradicts the fact that $c$ exists. As such, $c = 1$ must hold, and by $P(1, 1)$ it follows $f(2) = 2$. However, comparing $P(2, 2)$ and $P\left(\frac{1}{2}, 2\right)$ gives a contradiction. $\blacksquare$ Else, take $f(0) = 0$. Claim: If $f(c) = 0$, then $f(cx) = 0$ or $f(x) = 0$ holds for rational $x$. Proof. Follows from $P(c, x)$. $\blacksquare$ As such, if $f(1) = 0$ then $f(x)$ is universally $0$. Take $f(1) \ne 0$ as such. Then by $P(1, x)$ it follows that if $f(x) \ne 0$ \[ f(1 + x) = 1 + \frac{f(x)}{f(1)} \]and as such $f(2) = 2$. Claim: If $f(1) \ne 0$ then $f(x) = 0 \iff f\left(\frac{1}{x}\right) = 0$. Proof. If $f(x) = 0$ then one of $f\left(\frac{1}{x}\right)$ and $f\left(\frac{1}{x} \cdot x\right)$ is $0$, it can only be the first. $f\left(\frac{1}{x}\right) = 0$ is similar. $\blacksquare$ Claim: Assume for some minimal positive integer $n > 1$ that $f(n) = 0$. Then $n = 3$. Proof. Then, by $P(2, n - 2)$ it follows that \[ f(2n - 4)(f(2) + f(n - 2)) = 0 \]Since $f(n - 1) = -f(1)$ and thus $f(n - 2) = -f(1)^2 - f(1)$, $f(n - 2) = -2$ only holds if $f(1) = 1$ or $-2$. Else, this implies that $f(2n - 4) = 0$. As such, since $f\left(\frac{1}{2}\right) \ne 0$ it follows by $P\left(\frac{1}{2}, 2n - 4\right)$ that $f(n - 2) = 0$, which contradicts minimality 0. $\blacksquare$ Claim: $f(1) \in \{-2, -1, 1, 2\}$, giving $4$ solutions onto the positive integers. Proof. If $f(1) \in (-1, 0) \cup (0, 1)$ this means that $f$ is asymptotic on the integers to $O(f(1)^n)$, which gives a contradiction. There also can't be any zeros as $f(1) \ne -2$. If $|f(1)| > 2$, then the map $x \to \frac{x}{f(1)} + 1$ converges to some $c$. Solving for $c$ gives that $c = 1 + \frac{1}{f(1) - 1}$. Taking sufficiently large $P(x, y)$ it follows that $c^3 = 2c^2$ which implies that $c \in \{-2, 0, 2\}$, which allows us to solve for $f(1)$. We now classify some solution sets on the positive integers. - $f(1) = 2$ gives that $f(x) = 2$} - $f(1) = 1$ gives that $f(x) = x$} - $f(1) = -2$ gives that $f(3x) = 0$, $f(3x + 1) = -2$, $f(3x + 2) = 2$} - $f(1) = -1$ gives that $f(2x) = 2$, $f(2x + 1) = -1$} $\blacksquare$ Claim: These can be extended to the nonnegative rationals, besides the one when $f(1) = -1$. Proof. In the first case, By $P(x, n)$ for positive integer $n$ it follows that \[ 2f(x)f(n + x) = f(nx)(f(x) + 2) \]which implies that \[ \frac{f(n + x)}{f(nx)} = \frac{f(x) + 2}{2f(x)} \]is constant. If $x$ is of the form $\frac{p}{q}$, then $f(q + x) = f(2q + x)$, which by the relation from $f(x)$ to $f(1 + x)$ can only hold if $f(q + x) = f(2q + x) = 2$, which in turn implies that $f(x) = 2$. In the second case, it follows from $P(x, n)$ and the fact that $f(x + n) = f(x) + n$ that $f(nx) = nf(x)$, and as such $f(x) = x$ holds on the rational. In the third case, it follows that $f\left(\frac{1}{3n}\right)$ is $0$ for all integers $n$. This easily extends to all rationals with a negative $3$-adic valuation and by reciprocating to all rationals with nonzero $3$-adic valuation. Then, one of $f(x), f(x + 1), f(x + 2)$ must be $0$. As such, by the relation between $f(x)$ and $f(x + 1)$ it follows that \[ f\left(\frac{p}{q}\right) = \begin{cases} 0 & 3 \mid p \lor 3 \mid q \\ -2 & 3 \mid (p - q) \land 3 \nmid p \\ 2 & 3 \mid (p + q) \land 3 \nmid p \end{cases} \]which satisfies $f(x)f(y) = -f(xy)$ on the positives. In the fourth case, by $P\left(\frac{1}{2}, 2\right)$. \[ 2f\left(\frac{1}{2}\right)f\left(2 + \frac{1}{2}\right) = -1\left(f\left(\frac{1}{2}\right) + 2\right) \]However, $f(2 + \frac{1}{2})$ is simply $f(\frac{1}{2})$, so $2x^2 = -x - 2$ which has no solutions. $\blacksquare$ We now extend to the negatives. Claim: $f(-1)$ either equals $-f(1)$ or $0$. If the latter holds and $f$ is nonzero on the positives, then $f$ is uniformly $0$ which works. Proof. By $P(1, -1)$ \[ f(-1)(f(1) + f(-1)) = 0. \]If $f(-1) = 0$, then by $P(x, -1)$ \[ f(-x) \cdot f(x) = 0 \]so the result follows. $\blacksquare$ Claim: $f$ extends to the negatives by either being $0$ on them, or the additive inverse of the positives when $f$ is not uniformly $2$. Proof. First suppose $f(x) = 2$ on the positive rationals. Then by $P(1, -1)$ it follows that \[ f(-1)(f(1) + f(-1)) = 0 \]so $f(-1)$ is either $0$ or $-2$. Then, by $P(x, -1)$ for $x > 1$ as \[ 4f(-1) = f(-x)(2 + f(-1)) \]which can only hold if $f(-1) = 0$. Next, suppose $f(x) = x$ on the positives. It remains to consider $f(-1) = -1$. Then by $P(x, -1)$ again, for $x > 1$ \[ -f(x)f(x - 1) = f(-x)(f(x) - 1) \]so $f(-x)$ is nonzero for $x \ge 1$. Then, by $P(x, -x)$ it follows that \[ f(-x^2)(f(x) + f(-x)) = 0 \]which means that $f(x) = -f(-x)$ for $x \ge 1$. As such, $f\left(-\frac{1}{x}\right)$ is nonzero which in turn implies that $f(x) = -f(-x)$ for all $x$, which works. Finally, suppose that \[ f\left(\frac{p}{q}\right) = \begin{cases} 0 & 3 \mid p \lor 3 \mid q \\ -2 & 3 \mid (p - q) \land 3 \nmid p \\ 2 & 3 \mid (p + q) \land 3 \nmid p \end{cases} \]on the positives. First let $f(-1) = 0$. Then $f(-x) = 0$ for rationals $x$ with $\nu_3(x) = 0$. If $\nu_3(x) \ne 0$, then by $P(-x, -x)$ it follows that \[ f(-x)^2f(-2x) = 0 \]and since $f(-x) = 0 \iff f(-2x) = 0$ it follows that $f(-x) = 0$ holds. Next, suppose $f(-1) = 2$. By $P(x, -1)$ it follows that \[ 2f(x)f(x - 1) = f(-x)(f(x) + 2) \]Thus, $f(x) = -f(-x)$ holds if $f(x) = 2$ and $f(x - 1) = -2$. Likewise, if $f(x) = 0$ then $f(-x)$ is also $0$. Finally, if $f(x) = -2$ then $f(-x) = f(-(x+1)+1) = 1 + \frac{f(-(x+1))}{f(1)} = 1 + \frac{-f(x+1)}{-2} = 2$. $\blacksquare$ To recap, the solution set is $f(x) = 2$, $f(x) = x$, $f(x) = 0$, \[ f\left(\frac{p}{q}\right) = \begin{cases} 0 & 3 \mid p \lor 3 \mid q \\ -2 & 3 \mid (p - q) \land 3 \nmid p \\ 2 & 3 \mid (p + q) \land 3 \nmid p \end{cases}, \]and the variants of the above where $f$ is $0$ on the negatives.
03.09.2023 13:13
As usual, let $P(x;y)$ be the given assertion. $P(0;0) \Rightarrow f(0)=2$ or $f(0)=0$. If it is the first case, $P(x;0) \Rightarrow f(x)^2-f(x)-2=0$ for any $x$, thus $f(x) \in \{-1; 2\}$. Putting $P(x;1)$ and using the fact that $0 \notin Im(f)$, we get that $f(x+1)=\frac{f(x)}{f(1)} +1$. If $f(1)=2$, $P(1;1) \Rightarrow f(2)=2$, and by induction using $P(1;x)$ we get $f(n)=2$ for integer $n$. Now assume that $f(\frac{a}{b})=-1$ for some integer $a$ and $b$ and putting in $\frac{a}{b}$ and $bk$ we get a contradiction, thus $f(x)=2\; \forall x \in \mathbb{R}$ If $f(1)=-1$ We know by simple induction that $f(2k)=2$ and $f(2k+1)=-1$ for integer $k$. We also know that $f(x+2)=f(x)$ And just looking at $P(\frac{1}{2};2)$ we get $-2f(\frac{1}{2})^2=f(\frac{1}{2})+2$, but sadly, this one has no solutions in $\{-1; 2\}$ Also it is easy to see that $f(1)=0 \Rightarrow f(x)=0 \forall x \in \mathbb Q$ because of $P(1;x)$, so from now on assume $f(1) \neq 0$. Also due to the above $P(1;1)$ says $f(2)=2$. The hard work begins here: We know that or $f(x)=0$ or $f(x+1)=\frac{f(x)}{f(1)} +1$. Assume $M$ is the smallest positive integer such that $f(M)=0$. (Remember that we will deal the case when $M$ does not exist later). Now as for all natural $m < M$ we have $f(m) \neq 0$, thus $f(m+1)=\frac{f(m)}{f(1)} +1$. This means that $f(M-1)=-f(1)$,$ f(M-2)=-f(1)^2-f(1)$. Assuming $M \ge 7$ we get a that $f(1) \in \{ 1; -1; 2\}$ because of $P(2;3)$, and else we get $f(1)=-2$ is the only possibility left. So now if $f(1) \in \{-1;1;2\}$, $M$ does not exist. (If $M$ does not exist we again just put $P(2;3)$ to get $f(1) \in \{-1;1;2\}$. Now if $f(1)=-2$ we get $f(3)=0$, I will do the following few claims: Claim I:$f(x)=0$ iff $f(1/x)=0$. Just assume $f(x)=0$ and put $P(x;\frac{1}{x}$. Claim II:$f(2^n) \neq 0$. Using Claim I, $f(\frac{1}{2}) \neq 0$, now assume $f(2^a)=0$ for some smallest $a$ ($a\ge 2$), and taking $P(\frac{1}{2};2^a)$ we get $f(\frac{1}{2})f(2^a)f(2^a+\frac{1}{2})=0=f(2^{a-1})(f(\frac{1}{2})+f(2^a))=f(2^{a-1})f(\frac{1}{2})$, and obviously none of these is 0. Claim III: $f(6)=0$, this is because of $P(2;3)$. Now putting in $P(4;2)$, and using $f(8)\neq0$ we get $f(4)=-2$, so $f(5)=2$. $P(4;5)$ says that $f(9)=0$, As $f(8) \neq 0$ we know $f(8)=2$. If $f(7)=0$, we get from $P(5;2)$ that $f(10)=0$, but $P(\frac{1}{2};10) \Rightarrow f(5)=5$, contradiction. So as $f(8)=2$, $f(7)=-2$, and $P(5;2)$ says $f(10)=-2$, so $f(11)=2$, and $f(12)=0$.Now $P(4;11) \Rightarrow f(15)=0$, and this lets us with $f(14) \in \{2;0\}$ and the last one lets us with $f(13) \in \{-2;0;2\}$. If $f(13)=0, P(5;8)$ says $f(40)=0$, and $P(40;\frac{1}{2}) \Rightarrow f(20)=0$, and $P(20;\frac{1}{2}) \Rightarrow f(10)=0$ again contradiction. If $f(13)=2, f(14)=0$, and $P(14, \frac{1}{2})$ finishes, so the only possibility left is $f(13)=-2$;$f(14)=2$;$f(15)=0.$ And we easily find $f(16), f(17), f(18)$, from $f(16)$, which we get from $P(4;4)$. Now this was all just the basics of an induction. Now I will do the induction step Assume we know $f(3k)=0, f(3k+1)=-2, f(3k+2)=2$ for and numbers less than of equal to $3n$, if $3n+1$ is composite, just take some prime divisor $p$ and $P(p;\frac{3n+1}{p})\Rightarrow f(3n+1)=-2$, and this is enough to get $f(3n+2)$ and $f(3n+3)$, thus to complete the induction step. If $3n+1$ is prime, we know it is odd so $P(3n-4;5) \Rightarrow f(3n+1)= \frac{f(5(3n-4))(f(5)+f(3n-4))}{f(5)f(3n-4)}$, so $f(3n+1)=f(5(3n-4))$, by the induction hypotesis. And now $P(10;\frac{3n-4}{2}) \Rightarrow f(10)f(\frac{3n-4}{2})f(\frac{3n}{2}+8)=f(5(3n-4))(f(10)+f(\frac{3n-4}{2}))$ and as we have done a sufficiently large induction basis we know $8+\frac{3n}{2} \le 3n$, meaning we know $f(5(3n-4))=-2=f(3n+1)$, and this gets us $f(3n+2)=2$, and finally $f(3n+3)=0$, this completes the induction. So now we know $f(3n)=0, f(3n+1)=-2, f(3n+2)=2$ for any natural $n$. Using Claim I ($f(x)=0$ iff $f(1/x)=0$) we get $f(\frac{1}{3k})=0$, and $P(\frac{1}{3y};x) \Rightarrow f(\frac{x}{3y})=0$, for $x$ coprime to 3. Now this means $f(\frac{3x}{y})=0$ again for $y$ coprime to 3. Claim IV: $f(q)=0 \Rightarrow v_3(q)\neq 0$ for positive $q$. Assume otherwise, and let the counterexample be $\frac{a}{b}$. $P(\frac{a}{b};b)$ is a big contradiction. Now for $x$ divisible by 3 we know $f(\frac{n}{x})$=0, we will find $f$ for the denominator coprime to 3. By claim I, we know $f(\frac{3x}{n})=0$, and $P(1;\frac{3x-n}{n})$ togather with Claim IV, says $f(\frac{k}{n})=2$, for $k \equiv -n (\text{mod} 3)$, and $P(\frac{3x-2n}{n};1)$ together with Claim I says that $f(\frac{k}{n})=-2$, for $k \equiv n (\text{mod} 3)$. Thus we know that for positive rationals $q$,\[ f(q)=\{ \begin{array}{lr} 2 & \text{if}\ q \equiv\; -1\; \text{mod 3} \\ -2 & \text{if}\ q \equiv\; 1\; \text{mod 3} \\ 0 & \text{otherwise}\;\\ \end{array} \](Assuming modular inverses). Now we have 2 cases. First note that $P(-1;1) \Rightarrow f(-1)(f(-1)-2)=0$. The first case is if $f(-1)=0$. In this case $P(-1;x) \Rightarrow f(x)f(-x)=0$, thus $f(-a)=0$, for positive $a$ with $v_3(a)=0$. And just $P(\frac{x}{3k};\frac{9k^2}{x^2})$ together with the Claim I, shows $f(x)=0$ for all negative $x$. If $f(-1)=2$, $P(-1;x) \Rightarrow 2f(x)f(x-1)=f(-x)(2+f(x))$, Putting $x=3k+2$ for natural $k$ we get that $f(-3k+1)=-2$, And $P(x;1)$ lets us with $f(-3k+2)=2$ and $f(-3k)= 0$, and now this can easily be extended over rationals as in for positives, to get the solution: \[ f(q)=\{ \begin{array}{lr} 2 & \text{if}\ q \equiv\; -1\; \text{mod 3} \\ -2 & \text{if}\ q \equiv\; 1\; \text{mod 3} \\ 0 & \text{otherwise}\;\\ \end{array} \]again assuming modular inverses. Now we are left to deal with $f(1) \in \{-1;1;2\}$. First we deal with $f(1)=2$, this means that $f(n)=2$ for any natural $n$, Also if $f(\frac{a}{b})=0$ for positive $a$ and $b$, $P(\frac{a}{b};b)$ is a contradiction. So $f(x+1)=\frac{f(x)}{2}+1$, thus $f(x+n)=\frac{f(x)-2}{2^n}+2$ and taking $P(\frac{a}{b};bk)$ we get $f(q)=2$ for any positive rational $q$. And again like above just do cases basing on $f(-1)$ and one use $P(-1;x)$ to get the solutions $f(x)=2 \forall x \in \mathbb Q$ and $ f(x)=2 \forall x \in \mathbb Q^+$ and $f(x)=0$ else. Now we are left to deal with $f(1) \in \{-1;1\}$. We deal with $f(1)=-1$. It has already been done in the case when $f(0)=2$, and there is nothing different this time. Now we are left to deal with $f(1) =1$. This means that $f(n)=n$ and $f(x+n)=f(x)+n$. $P(\frac{a}{b};bk) \Rightarrow f(q)=q$, for any positive $q$ and now again cases for $f(-1)$ together with $P(-1;x)$ gives the 2 solutions $f(x)=x$ and $f(x)=x$ for positive $x$ and $f(x)=0$ else. So we finally get the solutions: a)$f_1(x)=0$ b)$f_2(x)=2$ c)$f_3(x)=x$ d)\[ f_4(x)=\{ \begin{array}{lr} 2 & \text{if}\ x \equiv\; -1\; \text{mod 3} \\ -2 & \text{if}\ x \equiv\; 1\; \text{mod 3} \\ 0 & \text{otherwise}\;\\ \end{array} \](Assuming modular inverses). And $f(x)=f_i(x)$ for positive $x$ and $f(x)=0$ else. Finally as a personal comment I can add that even though the problem takes really long to solve, it does not require any hard methods (As usual find $f$ for naturals and extend for rationals).