Let f:Q→Q be a function such that
f(2xy+21)+f(x−y)=4f(x)f(y)+21
for all x,y∈Q.
First, we denote the given functional equation as P(x,y):
P(x,y):f(2xy+21)+f(x−y)=4f(x)f(y)+21.
By considering P(x,0), we have:
f(21)+f(x)=4f(x)f(0)+21.
Let c=f(0). Then:
f(21)+f(x)=4cf(x)+21.
Next, consider P(0,y):
f(21)+f(−y)=4f(0)f(y)+21.
Since f(x)=f(−x) from symmetry in the functional equation, we have:
f(21)+f(y)=4cf(y)+21.
By comparing the two equations, we see that f(x)=21 or f(x)=44x2+1.
To determine the specific form of f(x), we use P(x,21):
f(x+21)+f(x−21)=2f(x)+21.
Assuming f(x)=44x2+1, we verify:
f(x+21)=44(x+21)2+1=44x2+4x+1+1=44x2+4x+2=x2+x+21,
f(x−21)=44(x−21)2+1=44x2−4x+1+1=44x2−4x+2=x2−x+21.
Adding these:
f(x+21)+f(x−21)=(x2+x+21)+(x2−x+21)=2x2+1=2f(x)+21.
Thus, the function f(x)=44x2+1 satisfies the functional equation. Therefore, the function f(x) is:
f(x)=x2+21.
The answer is: f(x) = x^2 + 21.