Let a=f(0) and denote (∗) as the given condition. Assume that a=0, substituting x=2a and y=0 in (∗), we get
2a2=2a(f(2a))2+a
or
4a−2=(2af(2a))2.
This follows that 4a−2 is a perfect square which is a contradiction since there is no perfect square congruent to 2 modulo 4. Thus a=0, or f(0)=0. Now, substituting y=0 in (∗), we get
x2f(−x)=(f(x))2,∀x∈Z,x=0
It follows that
x2f(x)=(f(−x))2,∀x∈Z,x=0
Therefore
(f(x))4=x4(f(−x))2=x6f(x),∀x∈Z,x=0
From this and f(0)=0, we get f(x)=0 or f(x)=x2 for any integer x. Clearly, the function f(x)=x2 satisfies the original equation. Let us consider now the case there exists some integer c=0 such that f(c)=0. Replacing y=c in (∗), we get
c2f(2x)=0,∀x∈Z,x=0
Thus, for any even integer x, we have f(x)=0. Now, if there exists some odd number d such that f(d)=d2, taking x even and y=d in (∗), we get
d2f(2x−d2)=f(d3),∀x∈Z,x=0,2∣x
If f(d3)=0, then f(2x−d2)=0 and hence f(d3)=d6,f(2x−d2)=(2x−d2)2. Plug back into the above equation, we get a contradiction. Therefore, f(d3)=0 and hence f(2x−d2)=0 for any nonzero even integer x. It follows that f(x)=0 for any integer x such that x≡−1(mod4) and x=−d2.
In x2f(−x)=(f(x))2, taking x≡−1(mod4),x=−d2, we get f(−x)=0. It follows that f(x)=0 for any integer x such that x≡1(mod4) and x=d2. Thus f(x)=0 for any integer x=±d2. However, we have f(d)=d2=0, so d=±d2 or d=±1. It follows that d=d3 and so f(d)=f(d3)=0, which is a contradiction. Therefore, in this case, we have f(x)=0 for any integer x.
In conclusion, the equation has two solution: f(x)=0 and f(x)=x2.