5. (51st Czech and Slovak Mathematical Olympiad (Open Book) Problem) Find all real-coefficient polynomials $P(x)$, for all real numbers $x$, satisfying $(x+1) P(x-1)+(x-1) P(x+1)=2 x P(x)$.


5. When $x=1$ and $x=-1$, we get
$$
P(1)=P(0)=P(-1) \text {. }
$$

Let $P(0)=d, P(x)=x(x-1)(x+1) Q(x)+d$, substituting into the original equation and eliminating $x(x-1)(x+1)$, we get
$$
(x-2) Q(x-1)+(x+2) Q(x+1)=2 x Q(x) \text {. }
$$

By the problem's condition, when $x \neq 0, \pm 1$, the above equation holds. Therefore, the polynomial $(x-2) Q(x-1)+(x+2) Q(x+1)-2 x Q(x)$ has more roots than its degree, so the polynomial is identically zero.
Let $Q(2)=a$, when $x=2$, we have
$0 \cdot Q(1)+4 Q(3)=4 Q(2)$, i.e., $Q(3)=a$.
If $Q(n)=Q(n+1)=a$, then
$Q(n+2)=\frac{2(n+1) Q(n+1)-(n-1) Q(n)}{n+3}=a$.
Thus, $Q(x) \equiv a$.
Therefore, $P(x)=a x(x-1)(x+1)+d=a x^{3}-a x+d$. Where $a, d$ are constants.