Find all the functions $f: \mathbb{Z}\to \mathbb{Z}$ satisfying the following property: if $a$, $b$ and $c$ are integers such that $a+b+c=0$, then $$f(a)+f(b)+f(c)=a^2+b^2+c^2.$$
Problem
Source: Centroamerican 2020, problem 3
Tags: algebra, functional equation, function
29.10.2020 00:10
The functions that satisfy the equation are $f(x)=x^2+kx$ where $k$ is a integer constant. They are solutions as $$f(a)+f(b)+f(c)=a^2+b^2+c^2+k(a+b+c)=a^2+b^2+c^2$$as $a+b+c=0$ Let $P(a,b,c)$ be the functional equation. $P(0,0,0)$ implies $f(0)=0$ $P(a,-a,0)$ implies $$f(a)+f(-a)=2a^2$$ $P(a+b,-a,-b)$ implies $$f(a+b)+f(-a)+f(-b)=2a^2+2b^2+2ab$$ Then combining the second one and the third one we get that for all $a,b$ \begin{align*} f(a+b)&-f(a)-f(b)=2ab\\ \iff f(a+b)&=f(a)+f(b)+2ab \end{align*}We define $g(x)=f(x)-x^2$. Then the last equation becomes $$g(a+b)=g(a)+g(b)$$which is Cauchy's functional equation on the integers. Thus the only solution is $g(x)=kx$ for some $k\in \mathbb{Z}$. Then $f(x)=x^2+kx$ as desired.
29.10.2020 00:13
We claim that $f$ satisfies this property iff there exists a $c\in\mathbb{Z}$ such that $f(n) =cn + n^2-n$ for every $n\in\mathbb{Z}$. We proceed as follows. Let $P(a,b,c)$ denotes the assertion \[ a+b+c=0\implies f(a)+f(b)+f(c)=a^2+b^2+c^2. \]$P(0,0,0)$ yields $f(0)=0$. Now, for every $k$, $P(k,-k,0)$ yields $2k^2=f(k)+f(-k)$. In particular, if $f(k)=ck+k^2-k$ for some $k\ge 0$, then $f(-k) = k^2+k -ck = c(-k)+(-k)^2-(-k)$, proving the claim for $-k$. For this reason, it suffices to prove this formula over $\mathbb{Z}_{\ge 1}$. Now, set $f(1)=c$, inspect $P(1,-1,0)$, $P(1,1,-2)$, $P(-1,-1,2)$ and $P(2,-2,0)$ to get $f(2)=2a+2$, $f(-2)=-2a+6$, and $f(-1)=2-a$. From here we proceed by induction: suppose that for any $-k+1\le N\le k-1$, $f(N) = cN + N^2-N$. Inspect $P(k,-k+1,-1)$ to obtain $f(k)=ck+k^2-k$, and use the observation above to complete the picture for $f(-k)$. This will conclude the inductive step; and the proof.
29.10.2020 11:16
Let $P(a,b,c):a+b+c=0:f(a)+f(b)+f(c)=a^2+b^2+c^2$ be the assertion. $P(0,0,0)\implies 3f(0)=f(0)$ thus $f(0)=0$. $P(a,-a,0)\implies f(a)+f(-a)=2a^2$ $P(a+b,-a,-b)\implies f(a+b)+f(-a)+f(-b)=2a^2+2b^2+2ab$ $\implies f(a+b)=f(a)+f(b)+2ab$ Set $a=k$ and $b=1$ in the last relation and we have $$f(k+1)-f(k)=2n+f(1)$$So by induction both sides we have $f(x)=x(x+c)$ where $c=f(1)-1$. So $f(x)=x^2+xc$ which indeed works.
19.11.2020 21:21
Let $g(x)=f(x)-x^2$. Then we have $a+b+c=0 \implies g(a)+g(b)+g(c)=0$. Taking $P(a,-a,0) \implies g(a)=-g(-a)$. Now,we have $g(a)+g(b)+g(-a-b)=0 \implies g(a+b)=g(a)+g(b) \implies g $ satisfies cauchy. Hence $g(x)=kx$.Hence $f(x)=x^2+kx \forall k \in \mathbb Z$
16.09.2021 22:35
Let $P(a,b,c)$ the assertion of the given F.E. $P(0,0,0)$ $$3f(0)=0 \implies f(0)=0$$$P(-a,a,0)$ $$f(a)+f(-a)=2a^2$$$P(b+c,-b,-c)$ $$f(b+c)+f(-b)+f(-c)=2b^2+2c^2+2bc=f(b)+f(-b)+f(c)+f(-c)+2bc \implies f(b+c)=f(b)+f(c)+2bc$$Let $f(x)=g(x)+x^2$, by this replace on the last equation: $$g(b+c)=g(b)+g(c) \implies g(a)=k \cdot a$$Thus we have $f(a)=a^2+ka$ and we are done
16.09.2021 22:43
Let $g(x)=f(x)-x^2$ and $P(a,b,c)$ the assertion that $g(a)+g(b)+g(c)=0$ for $a+b+c=0$. $P(0,0,0)\Rightarrow g(0)=0$ $P(x,-x,0)\Rightarrow g(x)+g(-x)=0$ $P(x,y,-x-y)\Rightarrow g(x+y)=g(x)+g(y)\Rightarrow g(x)=cx,c\in\mathbb Z$ and all such solutions work, so $\boxed{f(x)=x^2+cx},c\in\mathbb Z$ are the solutions.
30.09.2021 09:24
We claim that $\boxed{f(x)=x^2+kx}$ is the only solution. Let $P(x,y,z)$ be our assertion then, $P(0,0,0) \rightarrow $ $$f(0)=0$$$P(a,-b,c) \rightarrow $ $$f(a)+f(-b)=a^2+b^2+c^2=f(a)+f(-b)+f(c) \Rightarrow f(b)=f(-b) \Rightarrow \text{f is an even function}$$$P(a+b,-a,-b) \rightarrow$ $$f(a+b)+f(-a)+f(-b)=2a^2+2b^2+2ab=2(f(a)+f(b))+2ab \Rightarrow f(a+b)=f(a)+f(b)+2ab$$Setting $g(x)=f(x)-x^2$ we get, $$g(a+b)=g(a)+g(b) \ \forall a,b \in \mathbb{Z}$$which is cauchy over $\mathbb{Z}$ Therefore $g(x)=kx$ and $f(x)=x^2+kx$ as desired.
21.10.2021 03:58
Notice $c=-a-b$ so the given FE is equivalent to \[ f(a)+f(b)+f(-a-b)=2a^2+2b^2+2ab. \]Let $P(a, b)$ denote the assertion. \begin{align*} P(0, 0)&\implies f(0)=0 \\ P(n, -n)&\implies f(n)+f(-n)=2n^2 \\ P(1, n-1)&\implies f(1)+f(n-1)+f(-n)=2n^2-2n+2 \end{align*}Now this means that $f(n)-f(n-1)=2n-2+f(1)$ meaning that $f$ is a quadratic. So we find that the only possible solutions are $f(x)=x^2+cx$.
21.10.2021 04:42
Let $P(a, b, c)$ denote the assertion. Let $g(x) = f(x) - x^2,$ then $g: \mathbb{Z} \rightarrow \mathbb{Z}$. Now we have $g(a)+g(b)+g(c) = 0$ whenever $a+b+c=0$. $P(0, 0, 0)$ implies $f(0)=0$, while $P(a, 0, -a)$ implies $f(a) + f(-a) = 2a^2$, or $f(a) - a^2 = -(f(-a) - (-a)^2) \Leftrightarrow g(a) = -g(-a)$ for all integers $a$, hence $g$ is odd. Now finally, $P(a, b, -a-b) \Rightarrow g(a)+g(b) = -g(-a-b) = g(a+b),$ hence $g(x) = cx \forall x \in \mathbb{Z}$, where $c$ is an integer, therefore $f(x) = x^2 + cx$ for all $x \in \mathbb{Z},$ and this function clearly works.
21.10.2021 04:59
In fact, it's easily generalized to this: If $f,g:\mathbb Z\to\mathbb Z$ are two functions such that: $$f(a)+f(b)+f(c)=g(a)+g(b)+g(c)$$for all $a,b,c\in\mathbb Z$ such that $a+b+c=0$, prove that $f(n)=g(n)+cn$ for all $n\in\mathbb Z$, where $c\in\mathbb Z$.
21.10.2021 05:02
Do you mean $f(n) = g(n) + kn$ for some constant $k$, by any chance?
21.10.2021 05:06
jasperE3 wrote: In fact, it's easily generalized to this: If $f,g:\mathbb Z\to\mathbb Z$ are two functions such that: $$f(a)+f(b)+f(c)=g(a)+g(b)+g(c)$$for all $a,b,c\in\mathbb Z$ such that $a+b+c=0$, prove that $f(n)=g(n)$ for all $n\in\mathbb Z$. Yeah, you're right. Just one thing, (as djmathman pointed out) $f(n) - g(n) = cn$ for constant integer $c$. I'm hoping that we can somewhat generalize this into a hard problem. Edit: I think that we can also generalize from $f, g: \mathbb{Z} \rightarrow \mathbb{Z}$ to $f, g: \mathbb{Q} \rightarrow \mathbb{Q}$, this time $c$ is some rational constant.
07.05.2022 14:24
Let $f(x)=g(x)+x^2,$ it follows that $g(a)+g(b)+g(c)=0,$ let this be denoted by $P(a,b,c).$ $P(a,-a,0)\implies g(a)=-g(-a).$ $P(a,b,-a-b)\implies g(a)+g(b)=g(a+b).$ Thus the only solution for any constant $c$ is $\boxed{f(x)=cx+x^2},\forall x\in \mathbb{Z}$ which readily works.
11.05.2022 06:28
Jutaro wrote: Find all the functions $f: \mathbb{Z}\to \mathbb{Z}$ satisfying the following property: if $a$, $b$ and $c$ are integers such that $a+b+c=0$, then $$f(a)+f(b)+f(c)=a^2+b^2+c^2.$$ Answer: $f(x)=x^2+kx$ for some $k\in \mathbb{Z}.$ Proof: Set $a=b=c=0,$ we get $f(0)=0$. Then, set $(a,b,c) \rightarrow (a,-a,0)$, we get \[f(a)+f(-a)=2a^2.\]Setting $(a,b,c)\rightarrow (-a,a-1,1),$ we get \[f(a)-f(a-1)=2a+f(1)-2.\]Let $k=f(1)-1$, then by induction, we can derive $f(a)=a^2+ka$ for all integer $a$. Checking that it indeed works, we are done. $\ \blacksquare$
02.01.2023 10:27
By setting $a=b=c=0$, we have that $f(0)=0$. Letting $b=-a$ and $c=0$ gives the identity $$f(a)+f(-a)=2a^2.$$For the next step, note that if $f(x)$ is a solution, then so is $g(x)=f(x)+kx$. Therefore, we can WLOG that $f(1)=1$, and undo this later. Note that the identity $$f(a)+f(-a)=2a^2$$also gives $f(-1)=1.$ Plugging in $(a+1,-a,-1),$ we obtain $$f(a+1)+f(-a)+f(-1)=(a+1)^2+a^2+1$$$$f(a+1)+(2a^2-f(a))+1=2a^2+2a+2$$$$f(a+1)=f(a)+2a+1.$$Therefore, combining this with $f(0)=0,$ by induction, we have $f(a)=a^2$ for all integers $a$. However, undoing our WLOG earlier, the complete solution set is $$f(a)=a^2+ka.$$
25.03.2023 17:51
The answer is $x^2+kx$ for all real numbers $k$ Let $P(a, b,c)$ denote the given assertion. Note that $f(0) = 0$, and from $P(a, -a, 0)$ we obtain $f(a) + f(-a) = 2a^2$ for all $a$. Furthermore, from $P(x, -x-1, 1)$, $$f(x) + f(-x-1)+f(1) = x^2+(x+1)^2+1,$$which upon simplification yields $$2f(x) - f(x+1) + (x+1)^2-x^2 = 1-f(1).$$Thus we may now establish inductively $f(x) =x^2+kx$.
30.03.2023 06:32
Let $g(x) = f(x) - x^2$. We get $g(a) + g(b) + g(c) = 0$. We let $(a, b, c) = (0, 0, 0)$ to get $g(0) = 0$. We let $(a, b, c) = (a, -a, 0)$ to get $g(x) +g(-x) = 0$. We prove now by indcution that for every nonnegative integer $x$ (and thus every negative integer) we have $g(x) = xg(1)$. We have our base case of $0$ which is trivial. Our formula for $x+1$ given $x$ is as follows $g(x) + g(1) + g(-x-1) = 0$. This gives the desired. Thus we can see that our answer is $\boxed{f(x) = x^2+cx}$. We can see that this works. $\blacksquare$
07.07.2023 20:26
Let $P(a,b,c):=f(a)+f(b)+f(c)=a^2+b^2+c^2$ $P(0,0,0)$ yields $3f(0)=0\Longrightarrow f(0)=0$ $P(a,-a,0)$ yields $f(a)+f(-a)=2a^2$ (!) Furthermore notice that $P(a+b,-a,-b)$ yields $f(a+b)+f(-a)+f(-b)=(a+b)^2+a^2+b^2\Longrightarrow f(a+b)+f(-a)+f(-b)=2a^2+2b^2+2ab$ Therefore, using (!) we obtain $f(a+b)+f(-a)+f(-b)=f(a)+f(b)+f(-a)+f(-b)+2ab\Longrightarrow f(a+b)=f(a)+f(b)+2ab$ Now, let's define $g(x)=f(x)-x^2$, and by using this in our previous equation we obtain $g(a+b)=g(a)+g(b)$, thus since it is additive we obtain $g(x)=kx$. For some integer constant. Therefore $f(x)=x^2+kx$ In conclusion $\boxed{f(x)=x^2+kx, \forall x\in\mathbb{Z}\text{ and for all }c\in\mathbb{Z}}$ $\blacksquare$.
17.10.2023 09:04
Let $g(x)=f(x)-x^2$. Then, if $a+b+c=0$, we have $g(a)+g(b)+g(c)=0$. Plugging in $(a,b,c)=(0,0,0)$ gives $g(0)=0$. Hence, we can plug in $(a,b,c)=(k,-k,0)$ to get \[g(k)+g(-k)+g(0)=0\] so $g$ is odd. Then, plugging in $(a,b,c)=(a,b,-a-b)$ gives \[g(a)+g(b)+g(-a-b)=0\]\[\implies g(a)+g(b)=g(a+b)\] which satisfies Cauchy (since we are solving over integers). This means $g$ is linear and our answer is $\boxed{f(x)=x^2+cx, \ c \in \mathbb{Z}}$, which work.
31.12.2023 12:54
$f \equiv x^2 + kx$ works. Substitute $c=-(a+b)$ to get $f(a) + f(b) + f(-(a+b)) = a^2 + b^2 + (-(a+b))^2$. Now putting $a=b=0$ gives $f(0) = 0$. Set $b=-a$ to get $f(-a) = 2a^2 - f(a) \implies f(a) + f(b) = f(a+b) - 2ab$. Setting $b=1$, we get, \begin{align*} f(a+1) - f(a) &= f(1) + 2a\\ f(a) - f(a-1) &= f(1) + 2(a-1)\\ &\phantom{.}\vdots \\ f(1) - f(0) &= f(1) + 2(0) .\end{align*} Adding all these up, we get $f(a+1) - f(0) = (a+1)f(1) + \dfrac{2a(a+1)}{2}\implies f(a+1) = a^2 + a + (a+1)f(1) \; \forall a\ge 0$. Thus we get $f(a) = (a-1)(a) + af(1) = a^2 + a(f(1) - 1) = a^2 + ka \; \forall a \ge 1$. Also, $f(-a) = 2a^2 - f(a) = 2a^2 - (a^2+ka) = a^2 -ka = (-a)^2 + k(-a)$. Thus combining all these information, we get that $f(x) = x^2 + kx$ for all $x\in \mathbb Z$.
24.01.2024 06:57
Boring, bashy problem. The answers are $f(n)=n^2+kn$ which work. Now, obviously $f(0)=0$, so let $f(1)=k$, so $f(-1)=2-k$. Then, by induction, we can show that $f(n)=n\cdot k+n^2-n$. This is because \[n^2+(-n+1)^2+1=f(n)+f(-n+1)+f(-1)=f(n)+(-n+1)\cdot k+n^2-n+2-k\]This rearranges into the desired.
11.03.2024 23:51
The answer is $f(x) = x^2 + cx$ for some integer $c$. Let $P(a, b, c)$ denote the original assertion. From $P(0, 0, 0)$ we have $f(0) = 0$. Now, set $f(x) = x^2 + g(x)$ for all integers $x$. Substituting this in, we see that whenever $a + b + c = 0$, we have $g(a) + g(b) + g(c) = 0$; denote this assertion by $Q(a, b, c)$. Since $g(0) = f(0) - 0 = 0$, from $Q(a, -a, 0)$, we find that $g$ is odd. Now, let $g(1) = c$. We will show that for all positive integers $k$, $g(k) = ck$ and $g(-k) = -ck$ by induction on $k$, which will easily imply the solution set for $f$. The base case of $k = 1$ is obviously true. For the inductive step, assume that $g(k) = ck$ and $g(-k) = -ck$. From $Q(k + 1, -k, -1)$, we have $g(k + 1) = -g(-k) - g(-1) = c(k + 1)$. Since $g$ is odd, we have $g(-(k + 1)) = -g(k + 1) = -c(k + 1)$, which completes the induction.
23.03.2024 20:24
The answer is $f(x) = x^2 + Cx$ for all $C \in \mathbb{Z}$, which works since \[ \sum_{cyc} a^2 + Ca = a^2 + b^2 + c^2 + C(a+b+c) = a^2 + b^2 + c^2 \]over all $a + b + c = 0$. Let $g(x) = f(x) - x^2$ - the condition translates into $g(a) + g(b) + g(c) = 0$ for all $a + b + c = 0$. Clearly $g(0) = 0$. Let $g(1) = C$ - we prove by induction that $g(x) = Cx$ which clearly finishes. Indeed, $P(a, -a, 0)$ gives $g$ odd, and by induction with base case $x = 1$ (and assuming we have proved it for $1$ through $n$), $P(n, 1, -n-1)$ for gives $g(-n-1) = C(-n-1)$. Since $g$ is odd, we are done.
14.06.2024 01:06
Let $g(x)=f(x)-x^2$. Then $g(a)+g(b)+g(c)=0$ for $a+b+c=0$. Plugging in $a=b=c=0$ gives $g(0)=0$. Plugging in $b=-a$ and $c=0$ gives $g(a)+g(-a)=0$ so $g$ is odd. Plugging in $c=-a-b$ gives $g(a)+g(b)=g(a+b)$, so $g(x)=cx$ for some $c$. Therefore, $\boxed{f(x)=x^2+cx}$.
14.06.2024 01:29
We claim the only functions are $\boxed{f(x)\equiv x^2+kx}$ for $k\in\mathbb{Z}$. It is easy to check that these work. Let $P(a,b,c)$ denote the given assertion. $P(0,0,0)$ gives $f(0)=0$. $P(x,-x,0)$ gives $f(x)+f(-x)=2x^2$. $P(x,1,-1-x)$ gives $f(x+1)=f(x)+f(1)+2x$. By induction, $f(x)=xf(1)+x^2-x$, as desired. $\square$
26.07.2024 00:26
Since $a+b+c=0$, our equation becomes $f(a)+f(b)+f(-(a+b))=a^2+b^2+(a+b)^2$. Our answer is $f(x)=x^2+cx$ for $c\in\mathbb{Z}$, and it is easy to see this satisfies our equation. Plugging in $a=b=0$, we get $f(0)=0$, and plugging in $b=-a$ and $c=0$, we get $f(a)+f(-a)=2a^2$. Thus, we have \[f(a)+f(b)+f(-(a+b))+f(a+b)=f(a)+f(b)+2(a+b)^2=a^2+b^2+(a+b)^2+f(a+b),\]which gives $f(a)+f(b)+2ab=f(a+b)$. Now, Let $g(x)=f(x)-x^2$, so \[g(a)+g(b)=(f(a)-a^2)+(f(b)-b^2)+(2ab-2ab) = f(a+b)-(a+b)^2 = g(a+b),\]meaning $g$ satisfies Cauchy. Since $g$ is over the integers, we must have that $g$ is linear, so $g(x)=cx$, and $f(x)=x^2+cx$, as desired.
02.08.2024 17:15
The only solution is $f(x) = x^2 + nx$ for some integer constant $n$. These work. Now we prove they are the only solutions. Let $g(x) = f(x) - x^2$. We have $g(a) + g(b) + g(c) = 0$ if $a + b + c = 0$. Let $P(a,b,c)$ be this assertion. $P(0,0,0): g(0) = 0$. $P(a,-a,0): g(a) + g(-a) = 0$, so $g$ is odd. $P(a, b, -(a+b)): g(a) + g(b) + g(-(a+b)) = 0$, so $g(a) + g(b) = g(a+b)$, implying that $g(x) = nx$ for some constant $n$.