# 2012 IMO Problems/Problem 4

Find all functions $f: \mathbb{Z} \to \mathbb{Z}$ such that, for all integers $a, b,$ and $c$ that satisfy $a + b+ c = 0$, the following equality holds: $$f(a)^2 + f(b)^2 + f(c)^2 = 2f(a)f(b) + 2f(b)f(c) + 2f(c)f(a).$$ (Here $\mathbb{Z}$ denotes the set of integers.)

## Solution

Consider $a = b = c = 0.$ Then $f(0)^2 + f(0)^2 + f(0)^2 = 2f(0)f(0) + 2f(0)f(0) + 2f(0)f(0) \Rightarrow 3f(0)^2 = 6f(0)^2 \Rightarrow$ $$f(0) = 0.$$ Now we look at $b = -a, c = 0.$ $f(a)^2 + f(-a)^2 + f(0)^2 = 2f(a)f(-a) + 2f(-a)f(0) + 2f(0)f(a) \Rightarrow$ $f(a)^2 + f(-a)^2 = 2f(a)f(-a) \Rightarrow$ $f(a)^2 - 2f(a)f(-a) + f(-a)^2 = 0 \Rightarrow$ $(f(a) - f(-a))^2=0 \Rightarrow$ $$f(a)=f(-a).$$

We can write $f(c)^2 - 2f(c)(f(a)+f(b)) + (f(a)-f(b))^2 = 0 \Rightarrow$

$$f(c) = f(-c) = f(a+b) =\frac{2(f(a)+f(b)) \pm \sqrt{4(f(a)+f(b))^2 - 4(f(a)-f(b))^2}}{2}$$

$$\Rightarrow f(a+b) = f(a) + f(b) \pm 2\sqrt{f(a)f(b)}$$

If $f(b) = 0$, then $$f(a+b) = f(a) = f((a)mod(b))$$

Case 1: $f(1) = 0 \Rightarrow f(x)= 0$ $\forall$ $x.$ $\Box$

Case 2: $f(1) \not= 0$, we will have $f(2) = f(1) + f(1) \pm 2\sqrt{f(1)f(1)} \Rightarrow f(2) = 0$ or $f(2) = 4f(1)$

Case 2.1: $f(1) \not= 0, f(2) = 0 \Rightarrow f(x) = f(x$ $mod$ $2) \Rightarrow f(x) = f(1)$ if $x$ is odd, $f(x) = 0$ if $x$ is even. $\Box$

Case 2.2: $f(1) \not= 0, f(2) = 4f(1) \Rightarrow f(3) = f(2) + f(1) \pm 2\sqrt{f(2)f(1)}$

$\Rightarrow f(3) = 5f(1) \pm 4f(1) \Rightarrow f(3) = f(1)$ or $9f(1)$

Case 2.2.1: $f(1) \not= 0, f(2) = 4f(1), f(3) = f(1).$

$\Rightarrow f(4) = f(1) + f(3) \pm 2\sqrt{f(1)f(3)}$ and $f(4) = f(2) + f(2) \pm 2\sqrt{f(2)f(2)}$

$\Rightarrow f(4) = f(1)$ or $0$ and $f(4) = 16f(1)$ or $0$

$\Rightarrow f(4) = 0 \Rightarrow f(x) = f(x$ $mod$ $4).\Box$

Case 2.2.2: $f(1) \not= 0, f(2) = 4f(1), f(3) = 9f(1).$

$\Rightarrow f(4) = f(1 + 3) = f(1) + f(3) \pm 2\sqrt{f(1)f(3)} = 16f(1)$ or $4f(1)$

and $f(4) = f(2) + f(2) \pm 2\sqrt{f(2)f(2)} = 16f(1)$ or $0. \Rightarrow f(4) = 16f(1).$

If $x \le 4$ then $f(x) = f(1)x^2.$

We will prove by induction $f(x) = f(1)x^2$ $\forall$ $x.$

If $x \le m$ then $f(x) = f(1)x^2.$ $\forall$ $x$ is true for some $m$.

and if the statement is true for $m=k$

$\Rightarrow f(k+1) = f(k) + f(1) \pm 2\sqrt{f(k)f(1)} = f(1)(k+1)^2$ or $f(1)(k-1)^2$

and $f(k+1) = f(k-1) + f(2) \pm 2\sqrt{f(k-1)f(2)} = f(1)(k+1)^2$ or $f(1)(k-3)^2$

$\Rightarrow f(k+1) = f(1)(k+1)^2.$

$\Rightarrow$ the statement is true for $m=k+1$ as well.

As the statement is true for $m = 4$, by mathematical induction we can conclude

$f(x) = f(1)x^2$ $\forall$ $x.\Box$

So, Case 2.1, Case 2.2.1 and Case 2.2.2 are the three independent possible solutions.

--Dineshram