Let P(a,b,c) denote the expression
f(a+b+c)f(ab+bc+ca)=f(a)f(b)f(c)+f(a+b)f(b+c)f(c+a).
P(0,0,0)⇒f(0)2=2f(0)3. So, f(0)=21 or f(0)=0. Exclude the solution f≡0.
Case 1 (f(0)=21):
P(a,0,0)⇒41f(a)=21f(a)2⇒∀a,f(a)=0 or f(a)=21.
Now, if there is r=0 such that f(r)=21, take any a∈(−3∣r∣,3∣r∣). Then, since (r+3a)(r−a)>0, we will find real solutions to x2+(a−r)x+a(a−r)=0, which we call b and c. Then, (a+b+c)=r and (ab+bc+ca)=0. Therefore, P(a,b,c)⇒f(a)f(b)f(c)+f(a+b)f(b+c)f(c+a)=41, so f(a)=21. So f(a)=21 for all a∈(−3∣r∣,3∣r∣).
If f(a+b)=0, then P(a,b,0)⇒21f(a)f(b)=0, so f(a)=0 or f(b)=0. Therefore, if f(a)=f(b)=21, then f(a+b)=21. Since f=21 in an interval containing 0, we can therefore conclude f=21 on R. Clearly, f≡21 is a solution.
We claim that f(0)=21 and f(x)=0 for all x=0 is a solution to the functional equation. If a=b=c=0, or (a+b)=(b+c)=(c+a)=0, then P(a,b,c) is satisfied. So, we only need to show that if (a+b+c)=(ab+bc+ca)=0, then a=b=c=0. However, in this case, a,b,c are the three roots (with multiplicity) of x3−abc=0, and the only way they can all be real is if a=b=c=0.
Case 2 (f(0)=0):
Define sets R={x∈R∣f(x)=0}, S={x∈R∣f(x)=0}. We know S is nonempty and does not contain 0.
Claim 1. There are arbitrarily large negative numbers in S.
Proof. Suppose c∈S. Then P(c,c,c)⇒2c∈S or 3c∈S. This implies that S cannot be bounded on both sides, and if S contains a negative real then it contains arbitrarily large negative reals. So suppose S does not contain any negative reals, i.e. f(x)=0 for negative x. Then, for 2b>a>b>0,
P(a,−b,a)⇒f(a−b)2f(2a)=f(a−b)f(a2−2ab)+f(a)2f(−b)=0.
Let c∈S. Take b>c and a=b+c. Then f(2a)=0. So, f(x)=0 for all x>4c. So, S⊂(0,4c]. This contradicts that S cannot be bounded on both sides. □
Claim 2. c,d∈R⇒(c+d)∈R.
Proof. If a+b=d, then P(a,b,c)⇒f(c+d)f(ab+cd)=0.
Varying a,b over all reals such that a+b=d, ab takes all values in (−∞,4d2]. Since S contains arbitrarily large negative numbers, we can find f(ab+cd)=0 for some a,b with a+b=d. Therefore f(c+d)=0. □
Claim 3. r∈R⟺−r∈R. Also, s∈S⟺−s∈S.
Proof. Take −r∈R. By Claim 2, −nr∈R for all n∈N.
P(2r,2r,−r)⇒f(r)2f(4r)=f(3r)f(0)+f(2r)2f(−r)=0
So, r∈R or 8r∈R. If 8r∈R, then so is 8r+(−7r)=r. So, r∈R in either case.
Therefore r∈R⟺−r∈R. Since S=R∖R, the other equivalence follows. □
Claim 4. If r∈R∖{0} and s∈S, then rs∈R.
Proof.
P(r,rs,0)⇒f(r+rs)f(s)=f(r+rs)f(r)f(rs)=0⇒f(r+rs)=0
Using Claim 2 and Claim 3, we get that rs=(r+rs)+(−r)∈R.
Claim 5. r∈R,s∈S⇒(r+s)∈S,rs∈R
Proof. If (r+s)∈R, we will get s=(r+s)+(−r)∈R , which is a contradiction. Thus, (r+s)∈S. Now,
P(r,s,0)⇒f(rs)=f(r)f(s)=0⇒rs∈R.
Claim 6. f is injective at 0, i.e. R={0}
Proof. We know there is some s∈S. Assume that we have r∈R∖{0}. By Claim 5 and Claim 3, (r+s),(−s)∈S. Also Claim 4 implies rs∈R. Therefore, by Claim 5, we get (rs)⋅(r+s)∈R and (rs)⋅(−s)∈R. Then, by Claim 2, s=(rs)⋅(r+s)+(rs)⋅(−s)∈R, which is a contradiction.
Therefore, we can conclude that R={0}.
So, for any a,b such that (a+b)=0, P(a,b,0)⇒f(ab)=f(a)f(b).
Given c∈S, P(a,−a,c)⇒f(a)f(−a)f(c)=f(−a2)f(c)⇒f(−a2)=f(a)f(−a). These two statements combined imply that f is multiplicative. So f(1)=1.
Now, take abc=q and (a+b)(b+c)(c+a)=p. Then, since f is multiplicative,
f(p+q)=f((a+b+c)(ab+bc+ca))=f((a+b)(b+c)(c+a))+f(abc)=f(p)+f(q)
Lemma. Given any p,q∈R∖{0}, we can find a,b,c∈R such that (a+b)(b+c)(c+a)=p and abc=q.
Proof. If we find a,b,c such that abc(a+b)(b+c)(c+a)=qp, then by scaling a,b,c by (abcq)1/3, we will get appropriate numbers.
Now if we take b=0 and c=0 to have opposite signs such that (b+c)=0, then abc(a+b)(b+c)(c+a)=qp⟺a2+(b+c)a+bc=a⋅q(b+c)pbc. Treating this as a quadratic in a, the discriminant is positive. Now, take a to be one of the roots.
Therefore f is additive. So, for any q∈Q, we have f(q)=qf(1)=q. However, since f:R→R is multiplicative as well, f(x)>0 for all x>0, so f is monotonically increasing. Since rationals are dense in R, we get f(x)=x for all x∈R.
Final answer:
The solutions are:
- f(x)≡21 for all x∈R.
- f(0)=21 and f(x)=0 for all x=0.
- f(x)=x for all x∈R.