Find all functions $f : \mathbb Z \to \mathbb Z$ such that $$(f(x + y))^2 = f(x^2) + f(y^2)$$for all $x, y \in \mathbb Z$.
Problem
Source: Pan African Math Olympiad 2018, Problem 1
Tags:
01.07.2018 01:07
Tunisian wrote: Find all functions $f : Z -> Z$ such that $(f(x + y))^2 = f(x^2) + f(y^2)$ for all $x, y \in Z$
Wrong Solution.. Thanks to @below for pointing it out!
01.07.2018 04:56
@Above What about \[ f(x)=\begin{cases} 2 &\text{ if } x\in\mathbb{S} \\ -2 &\text{ if } x\not\in\mathbb{S} \end{cases}\]Where $\mathbb{S}$ is an arbitrary subset of $\mathbb{Z}$ that contain all perfect squares? achen29 wrote:
Case One: $f(x+y)=f(x-y)$ You fall into pointwise trap here. Tunisian wrote: Find all functions f : Z -> Z such that (f(x + y))² = f(x²) + f(y²) for all x, y ∈ Z Let $P(x,y)$ be the assertion. $P(0,0)\, ; \, f(0)^2=2f(0)\implies f(0)\in\{0,2\}$ $P(x,-x)\, ; \, f(x^2)=\frac{f(0)^2}{2}$ Thus the assertion become $$(f(x+y))^2=f(0)^2\,\forall x,y\in\mathbb{Z}$$$$\implies f(x)^2=f(0)^2\,\forall x\in\mathbb{Z}$$ Case 1 : If $f(0)=0$,then we get $\boxed{f(x)\equiv 0}.$ Case 2 : If $f(0)=2$,then $f(x^2)=2$ for all integers $x$,also the above equality implies that $f(x)\in\{2,-2\}$ for all integers $x$,giving the answer : \[ \boxed{f(x)=\begin{cases} 2 &\text{ if } x\in\mathbb{S} \\ -2 &\text{ if } x\not\in\mathbb{S} \end{cases}}\]Where $\mathbb{S}$ is an arbitrary subset of $\mathbb{Z}$ that contain all perfect squares.
31.01.2021 16:35
Define $\mathbb{S}$ to be the set of all perfect squares. The functions are $f \equiv 0$ and $$f(x)=\begin{cases} 2 &\text{ if } x\in X \\ -2 &\text{ if } x\not\in X\end{cases}$$where $X$ is any set such that $\mathbb{S} \subseteq X \subseteq \mathbb{Z}$. It is easy to check that $f \equiv 0$ works. For the second function, note that $f(x)^2$ is always $4$. Since $x^2,y^2 \in \mathbb{S} \implies x^2,y^2 \in X$ it follows that $f(x^2)=f(y^2)=4$, so both sides of the equation are indeed equal. Now we show that these are the only solutions. Let $P(x,y)$ denote the given assertion. Also let $f(0)=n$. From $P(0,0)$ we get $c^2=2c$, so $c=0$ or $c=2$. We consider these cases: Case 1: $c=0$. Then from $P(x,0)$ we get $f(x)^2=f(x^2)$. Applying this, we can rewrite the given as: $$f(x+y)^2=f(x)^2+f(y)^2$$Letting $g(x)=f(x)^2$ (note that $g$ is from $\mathbb{Z} \to \mathbb{Z}$ still) we see that $g$ satisfies Cauchy's functional equation, so $g(x)=ax$ for some integer $a$. But $g(x)$ must always be nonnegative, since it is the square of $f(x)$. By taking $x$ extremely large in the positive or negative direction we see that $a=0$ is the only one that works, so $g \equiv 0$ and $f \equiv 0$ as well. Case 2: $f(0)=2$. Then from $P(x,0)$ we get $f(x)^2=f(x^2)+4$. Using this, the FE rewrites as: $$f(x+y)^2-4=(f(x)^2-4)+(f(y)^2-4)$$Letting $g(x)=f(x)^2-4$, we see that $g$ satisfies Cauchy's functional equation, so $g(x)=ax$ for some integer $a$. But we require $g(x) \geq -4$ for all $x$. The only way this is possible is if $a=0$, so $g \equiv 0$. This gives us $f(x)^2=4 \implies f \in \{2,-2\}$. All we have to do is show that $f(x)=2$ whenever $x$ is a square. To do this, consider the original FE. By $P(x,-x)$, along with the fact that $f(x)^2=4$ always, we get: $$2f(x^2)=4 \implies f(x^2)=2$$So $f(x)=2$ whenever $x$ is a square. This gives all functions of the form described previously. $\blacksquare$
22.04.2021 06:46
Let $P(x,y)$ be the assertion $f(x+y)^2=f\left(x^2\right)+f\left(y^2\right)$. $P(x,-x)\Rightarrow f(0)^2=2f\left(x^2\right)$ so the original assertion becomes $f(x+y)^2=f(0)^2$, or $f(x)^2=f(0)^2$. $P(0,0)\Rightarrow f(0)^2=f(0)\Rightarrow f(0)\in\{0,2\}$ If $f(0)=0$ then $\boxed{f(x)=0}$, which works. Now assume $f(0)=2$. We get that $\forall x$, either $f(x)=2$ or $f(x)=-2$. Note that $P(x,-x)$ is now $f\left(x^2\right)=2$. The solution is $\boxed{f(x)=\begin{cases}2&\text{if }x\in S\\-2&\text{if }x\notin S\end{cases}}$, for any set $S$ such that $\left\{x^2|x\in\mathbb Z\right\}\subseteq S\subseteq\mathbb Z$. To check that this works, we notice that $f(x)^2=4$ for any $x$ and that $f\left(x^2\right)=2$, so $P(x,y)\Leftrightarrow 4=2+2$, which is true.
11.05.2021 02:46
Tunisian wrote: Find all functions $f : \mathbb Z \to \mathbb Z$ such that $$(f(x + y))^2 = f(x^2) + f(y^2)$$for all $x, y \in \mathbb Z$. Let $P(x,y)$ the assertion of the given FE: $P(0,0)$ $$f(0)^2=2f(0) \implies f(0)=0 \; \text{or} \; f(0)=2$$If $f(0)=0$ $P(x,0)$ $$f(x)^2=f(x^2)$$$P(x.-x)$ $$0=2f(x^2) \implies f(x)^2=0 \implies f(x)=0 \; \forall x \in \mathbb Z$$If $f(0)=2$ $P(x,-x)$ $$4=2f(x^2) \implies f(x^2)=2 \; \forall x \in \mathbb Z$$That means that if $\mathbb C$ is the set of all integer perfect squares then $f(x)= \pm 2 \; \forall x \in \mathbb C$. Then the solutions are: $\boxed{f(x)=0 \; \forall x \in \mathbb Z}$ $\boxed{f(x)=\begin{cases} 2 &\text{ if } x\in\mathbb C \\ -2 &\text{ if } x\not\in\mathbb C \end{cases}}$ Thus we are done
01.10.2021 18:59
01.10.2021 21:12
Incorrect, see previous solutions.
09.09.2022 05:22
We claim all such functions are either of the form $f\equiv 0$ or $f(x) = 2 $ for all perfect squares $x$ and $f(x) \in \{-2,2\}$ for all other $x$. These work. Let $P(x,y)$ denote the given assertion. $P(0,0): f(0)^2 = 2f(0)$, so $f(0)\in \{0,2\}$. If $f(0) = 0$, then $P(x,-x)$ and $P(x,0)$ combined give $f\equiv 0$. Now assume $f(0) = 2$. $P(x,-x): f(x^2) = 2$. So we have \[f(x+y)^2 = f(x^2) + f(y^2) = 4,\]so $f(x)\in \{-2,2\}$ for all $x$, done.
09.09.2022 07:34
Setting $y=-x$ we have $f(x^2)=f(0)^2/2.$ Set $z=x+y$ then $f(z)^2=f(0)^2.$ We have $f(0)=0,2$ from setting $x=y=0$ and so either $f(x)\equiv 0$ else $f(x)=\pm 2.$ Since $f(x^2)=f(0)^2/2=4$ we have $f(x)=2$ for perfect square $x.$ Easily to verify these work.
01.03.2023 08:20
if the notation $\mathbb C$ is easily confused with the set of complex numbers !!!
10.11.2023 08:10
Why is my solution terrible? Claim: $\text{Im}(f)$ is finite. First, note that $S = \{ f(x^2) \colon x \in \mathbb{Z} \}$ has the property that for any $a,b \in S$ then $a+b$ is a perfect square. Choose any positive element $s \in S$, note that all elements of $S$ have to be between $-s$ and $s^2$ since $s^2+s<(s+1)^2$. Thus, $S$ is forced to be finite. Now, note that \[ f(x)^2 = f(x^2)+f(0) \implies f(x) \in \left \{ \pm \sqrt{s+f(0)} \colon s \in S \right \}\]Since $S$ is finite, it follows that $\text{Im}(f)$ is finite. Denote $\text{Im}(f)$ as $A$. Let $M,m \in A$ be the maximal and minimal elements. It follows that there is some $u \in \mathbb{Z}$ where \[ M^2 = f(u)^2 = f(u^2)+f(0) \leq M+M=2M \implies M \leq 2 \]Moreover, there is some $v \in \mathbb{Z}$ where \[ m^2 = f(v)^2 = f(v^2)+f(0) \leq M + M \leq 2M \leq 4 \implies m \geq -2\]Thus, $A \subseteq \{-2,-1,0,1,2\}$. Note that $f(0)^2 = 2f(0) \implies f(0)=0,2$. Assume $f(0)=0 \implies f(x^2+0) = f(x^2)+f(0) \implies f(x^2) = f(x^2)$. Thus, \[ f(x+y)^2 = f(x^2)+f(y^2) \implies f(x+y)^2 = f(x)^2 + f(y)^2 \]which implies that $f(x)^2$ is a solution to the Cauchy FE over $\mathbb{Z}$. Thus, $f(x)^2=cx \implies f(x) = \sqrt{cx}$ which is a clear contradiction. Thus, $f(0)=2$. So, we have \[f(n)^2=f(n^2)+f(0^2) \implies f(n)^2=f(n^2)+2 \implies f(n^2) = \pm 2 \implies f(n)^2 = \pm 4 \]So, $A \subseteq \{-2,2\}$. Assume $f(k^2)=-2$ for some $k \in \mathbb{Z}$. We have \[ f(2k)^2 = 2f(k^2) = -4\]which is a contradiction. Thus, $f(k^2)=2$ for all $k \in \mathbb{Z}$. So, our final solution set is $f(x^2)=2$ and $f(x)=\pm 2$ for all $x \in \mathbb{Z}$ where $x \not = y^2$ for some $y \in \mathbb{Z}$. It is easy to see that this solution set indeed works.
12.04.2024 16:46
$P(x,-x)$ gives $f(0)^2=2f(x^2)$. In particular, $f(0)^2=2f(0)$, so $f(0)\in\{0,2\}$. Thus, $f(0)=f(x^2)$ for all $x$, so $f(x+y)^2=2f(0)$ for all $x,y$, so $f(x)^2=2f(0)$ for all $x$. If $f(0)=0$, then $f\equiv 0$. Otherwise, $f(0)=2$, so $f(x)\in\{-2,2\}$. Thus the LHS is always $4$ so the RHS would require that every square maps to $2$, then everything else can map to whatever. Therefore, our solutions are $\boxed{f\equiv 0}$ and $f(x)=2$ when $x$ is a square and otherwise you get to choose between $2$ and $-2$.
12.04.2024 17:10
We claim the solutions are of the following form: $$1. f(x) \equiv 0$$$$2. f(x) = \begin{cases} 2 & \text{ if } x \text{ is a perfect square } \\ \text{either } 2 \text{ or } (-2) & \text{otherwise} \end{cases}.$$Clearly all functions of these forms work, now we show they are the only ones. Denote the given equation by $P(x, y)$. Then from $P(0,0)$ we obtain $f(0) \in \{0, 2\}$. Case 1: $f(0) = 0$ $P(x, -x)$ gives us $2f(x^2) = 0 \implies f(x^2) = 0 \forall x$. Substituting in, we get $f(x+y)^2 = 0 \implies f(x) = 0 \forall x$, the first class of solutions. Case 2: $f(0) = 2$. Then $P(x, -x)$ gives us $4 = 2f(x^2) \implies f(x^2)= 2 \forall x$. Subbing in, $f(x+y)^2 = 4 \implies f(x) \in \{2, -2\} \forall x$, leading to the second class of solutions. Therefore we are done. $\square$