4. Determine all polynomials $P(x)$ that for every real number $x$ satisfy the equation

$$
P(2 x)=8 P(x)+(x-2)^{2} .
$$
SOLUTION. The degree of the polynomial $P$ is at least two. Let first $P(x)=a x^{2}+b x+c$. By substituting this expression into the relation given in the problem, we get

$$
4 a x^{2}+2 b x+c=(8 a+1) x^{2}+(8 b-4) x+8 c+4 .
$$

By comparing the coefficients of the same powers of $x$ on the left and right sides, we obtain $4 a=8 a+1, 2 b=8 b-4$ and $c=8 c+4$. From this, $a=-\frac{1}{4}, b=\frac{2}{3}, c=-\frac{4}{7}$.

If the degree $n$ of the polynomial $P$ is greater than two, we find analogously that its term $a_{n} x^{n}$ with the highest power of $x$ satisfies the relation $2^{n} a_{n}=8 a_{n}$, i.e., $n=3$, where $a_{n} \neq 0$ can be any value. The coefficients of the polynomial $P$ for the powers $x^{2}, x^{1}$ and $x^{0}$ will come out the same as in the previous situation.

Overall conclusion: $P(x)=a x^{3}-\frac{1}{4} x^{2}+\frac{2}{3} x-\frac{4}{7}$, where $a$ is any real number.

AUXILIARY PROBLEMS: