4. Let $f(x)=x^{3}+3 x^{2}+5 x+7$. Find the polynomial $g(x)$ of the smallest degree such that

$$
f(3)=g(3), \quad f(3-\sqrt{3})=g(3-\sqrt{3}), \quad f(3+\sqrt{3})=g(3+\sqrt{3}) .
$$
Answer: $12 x^{2}-19 x+25$.

Solution. Consider the polynomial $h(x)=g(x)-f(x)$. It is equal to zero at points $x=3$ and $x=3 \pm \sqrt{3}$. Therefore, $h(x)$ is divisible by the polynomial

\[
\begin{gathered}
q(x)=(x-3)(x-(3+\sqrt{3}))(x-(3-\sqrt{3}))= \\
=(x-3)\left((x-3)^{2}-3\right)=(x-3)\left(x^{2}-6 x+6\right)=x^{3}-9 x^{2}+24 x-18
\end{gathered}
\]

that is, for some polynomial $s(x)$, the identity

\[
g(x)-f(x)=s(x) \cdot\left(x^{3}-9 x^{2}+24 x-18\right)
\]

or

\[
g(x)=x^{3}+3 x^{2}+5 x+7+s(x) \cdot\left(x^{3}-9 x^{2}+24 x-18\right)
\]

holds. For $s(x)=-1$, we get $g(x)=12 x^{2}-19 x+25$. For any other polynomial $s(x)$, the degree of $g(x)$ is not less than three.

Evaluation. 14 points for a complete solution. If the polynomial is found but the minimality of the degree is not proven, 11 points.