Determine all polynomials $P(x)$ with real coefficients for which the polynomial

$$
Q(x)=(x+1) P(x-1)-(x-1) P(x)
$$

is constant.
Suppose $P(x)$ is a constant polynomial, say $P(x)=a$ with $a \in \mathbb{R}$. Then

$$
Q(x)=(x+1) a-(x-1) a=a x+a-a x+a=2 a,
$$

and this is constant. So every constant polynomial $P(x)$ satisfies the condition.
Now assume that $P$ is not constant. We can then write $P(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\ldots+a_{1} x+a_{0}$ with $n \geq 1$ and $a_{n} \neq 0$. Consider the coefficient of $x^{n}$ in $Q(x)$. This is the sum of the coefficients of $x^{n}$ in $x P(x-1), P(x-1),-x P(x)$, and $P(x)$. In the first, this coefficient is $a_{n-1}-n a_{n}$, in the second it is $a_{n}$, in the third it is $-a_{n-1}$, and in the fourth it is $a_{n}$. Together, this is

$$
a_{n-1}-n a_{n}+a_{n}-a_{n-1}+a_{n}=(2-n) a_{n} .
$$

But in $Q(x)$, this coefficient must be equal to 0. Since $a_{n} \neq 0$, it follows that $n=2$. Thus, $P(x)=a_{2} x^{2}+a_{1} x+a_{0}$ with $a_{2} \neq 0$.
Now consider the constant coefficient of $Q(x)$. This is the sum of the constant coefficients of $x P(x-1), P(x-1),-x P(x)$, and $P(x)$. These are, respectively, $0, a_{2}-a_{1}+a_{0}, 0$, and $a_{0}$. Together, this is $a_{2}-a_{1}+2 a_{0}$. On the other hand, we can compute $Q(1)$:

$$
Q(1)=2 P(0)-0=2 a_{0}
$$

Since $Q$ is constant, $Q(1)$ is equal to the constant coefficient of $Q$, so $2 a_{0}=a_{2}-a_{1}+2 a_{0}$. We see that $a_{2}=a_{1}$. Thus, $P(x)$ is of the form $P(x)=b x^{2}+b x+a=b x(x+1)+a$ with $a, b \in \mathbb{R}$ and $b \neq 0$. To check if all polynomials of this form satisfy the condition, we substitute this form into $Q(x)$:

$$
\begin{aligned}
Q(x) & =(x+1)(b(x-1) x+a)-(x-1)(b x(x+1)+a) \\
& =(x-1) x(x+1) b+(x+1) a-(x-1) x(x+1) b-(x-1) a \\
& =2 a
\end{aligned}
$$

This is indeed constant, so all polynomials of this form satisfy the condition. In fact, every constant polynomial is also of this form, but with $b=0$. We conclude that the solutions are: all polynomials of the form $P(x)=b x^{2}+b x+a$ with $a, b \in \mathbb{R}$.