IMO 2012 · Problem 4

Find all functions \(f:\mathbb Z\to\mathbb Z\) such that, for all integers \(a,b,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.)

Official text of the problem. Official problem paper (PDF)

Answer

The solutions are the following three families, with an arbitrary integer \(k\): \[ \boxed{f(n)=kn^2\qquad(n\in\mathbb Z);} \] \[ \boxed{ f(n)= \begin{cases} 0,&n\text{ even},\\ k,&n\text{ odd}; \end{cases}} \] \[ \boxed{ f(n)= \begin{cases} 0,&n\equiv0\pmod4,\\ k,&n\text{ odd},\\ 4k,&n\equiv2\pmod4. \end{cases}} \]

Solution

Setting \(a=b=c=0\) gives \(3f(0)^2=6f(0)^2\), so \(f(0)=0\). Next, applying the equation to \((n,-n,0)\) gives \[ (f(n)-f(-n))^2=0. \] Thus \(f\) is even.

Consequently, applying the original equation to \((x,y,-x-y)\) and rearranging yields \[ \bigl(f(x+y)-f(x)-f(y)\bigr)^2=4f(x)f(y) \qquad(x,y\in\mathbb Z). \tag{1} \] In particular, if \(f(d)=0\), then \[ f(n+d)=f(n)\qquad(n\in\mathbb Z). \tag{2} \]

Put \(k=f(1)\). If \(k=0\), equation (2) with \(d=1\) shows that \(f\) is constant, hence identically zero. This is included in the answer. We may therefore assume \(k\ne0\).

Taking \(x=y=1\) in (1), we obtain \[ (f(2)-2k)^2=4k^2, \] so \[ f(2)\in\{0,4k\}. \]

Case 1: \(f(2)=0\). Equation (2) shows that \(f(n+2)=f(n)\) for every integer \(n\). Since \(f(0)=0\) and \(f(1)=k\), this gives exactly the second family.

We now assume \(f(2)=4k\). Taking \((x,y)=(2,1)\) in (1) gives \[ (f(3)-5k)^2=16k^2, \] and therefore \[ f(3)\in\{k,9k\}. \]

Case 2: \(f(3)=k\). Taking \((x,y)=(3,1)\) in (1) gives \[ f(4)\in\{0,4k\}, \] whereas taking \((x,y)=(2,2)\) gives \[ f(4)\in\{0,16k\}. \] Because \(k\ne0\), these two conditions force \(f(4)=0\). Equation (2) now gives \(f(n+4)=f(n)\) for all integers \(n\). The values \[ f(0)=0,\qquad f(1)=k,\qquad f(2)=4k,\qquad f(3)=k \] therefore give exactly the third family.

Case 3: \(f(3)=9k\). We prove by induction that \[ f(n)=kn^2\qquad(n\ge0). \] This already holds for \(n=0,1,2,3\). Suppose \(n\ge3\) and it holds for every integer from \(0\) through \(n\).

Using \((x,y)=(n,1)\) in (1), we obtain \[ \bigl(f(n+1)-(n^2+1)k\bigr)^2=4n^2k^2, \] hence \[ f(n+1)\in\{(n+1)^2k,(n-1)^2k\}. \tag{3} \] Using \((x,y)=(n-1,2)\) instead gives \[ \bigl(f(n+1)-((n-1)^2+4)k\bigr)^2 =16(n-1)^2k^2, \] hence \[ f(n+1)\in\{(n+1)^2k,(n-3)^2k\}. \tag{4} \] Since \[ (n-1)^2-(n-3)^2=4(n-2)>0 \] and \(k\ne0\), the only common possibility in (3) and (4) is \[ f(n+1)=(n+1)^2k. \] This completes the induction. Evenness extends the formula to all integers, giving the first family.

It remains to verify all three families.

For \(f(n)=kn^2\), we have \[ \bigl(f(x+y)-f(x)-f(y)\bigr)^2 =(2kxy)^2 =4f(x)f(y). \] Since this function is even, this is equivalent to the required equation.

For the second family, whenever \(a+b+c=0\), either none or exactly two of \(a,b,c\) are odd. Thus their function values are, up to permutation, either \((0,0,0)\) or \((k,k,0)\). Both satisfy the equation.

For the third family, consider the residues of \(a,b,c\) modulo \(4\). If one residue is \(0\), the other two are negatives of each other, so their function values are equal. The three values are therefore \((0,u,u)\), up to permutation, which satisfy the equation. If no residue is \(0\), the only residue triples whose sum is \(0\) modulo \(4\) are, up to permutation, \[ (1,1,2)\quad\text{and}\quad(3,3,2). \] Both give function values \((k,k,4k)\), for which \[ k^2+k^2+(4k)^2 =18k^2 =2k^2+2k(4k)+2(4k)k. \] Thus the third family also satisfies the equation, completing the classification.

The solution was checked against the official IMO shortlist solutions.