4. Find all functions $f$, defined on the set of real numbers and taking real values, such that for any real $x$ and $y$ the equality $f(x y)=f(x) f(y)-2 x y$ holds.
Answer: The solutions are the linear functions $f(x)=2x$ and $f(x)=-x$.

Solution. Substitute 1 for $x$ and $y$. Then $f(1)=f(1)^{2}-2$. Therefore, $f(1)=a-$ is a root of the quadratic equation: $a^{2}-a-2=0$. The equation has two roots 2 and -1. Substitute 1 for $y$ in the equation. We get $f(x)=f(x) f(1)-2x$. If $f(1)=2$, then $f(x)=2x$. If $f(1)=-1$, then $f(x)=-x$. By verification, we confirm that both functions are valid. Verification for $f(x)=-x$. $f(xy)=-xy=xy-2xy=(-x)(-y)-2xy=f(x)f(y)-2xy$. The equality holds for any $x$ and $y$. Verification for $f(x)=2x$. $f(xy)=2xy=4xy-2xy=(2x)(2y)-2xy=f(x)f(y)-2xy$. The equality holds for any $x$ and $y$.

Criteria. The functions are found, but there is no verification that they fit: 6 points.