Problem: Find all polynomials $P$ with real coefficients such that
\[ \frac{P(x)}{yz} + \frac{P(y)}{zx} + \frac{P(z)}{xy} = P(x-y) + P(y-z) + P(z-x) \]
for all nonzero real numbers $x$, $y$, $z$ obeying $2xyz = x+y+z$.

\end{enumerate}

Solution: The given can be rewritten as saying that
\begin{align*}
  Q(x,y,z) &\coloneq xP(x) + yP(y) + zP(z) \\ &- xyz \left( P(x-y) + P(y-z) + P(z-x) \right)
\end{align*}
is a polynomial vanishing whenever $xyz \neq 0$ and $2xyz = x+y+z$, for real numbers $x$, $y$, $z$.
\begin{claim*}
  This means $Q(x,y,z)$ vanishes also for any complex numbers $x$, $y$, $z$ obeying $2xyz=x+y+z$.
\end{claim*}
\begin{proof}
  Indeed, this means that the rational function
  \[ R(x,y) \coloneq Q\left( x,y,\frac{x+y}{2xy-1} \right) \]
  vanishes for any real numbers $x$ and $y$
  such that $xy \neq \half$, $x \neq 0$, $y \neq 0$, $x+y \neq 0$.
  This can only occur if $R$ is identically zero as a rational function with real coefficients.
  If we then regard $R$ as having complex coefficients, the conclusion then follows.
\end{proof}
\begin{remark*}
  [Algebraic geometry digression on real dimension]
  Note here we use in an essential way that $z$
  can be solved for in terms of $x$ and $y$.
  If $s(x,y,z) = 2xyz-(x+y+z)$ is replaced with some general condition,
  the result may become false; e.g.\ we would certainly not expect the result to hold when
  $s(x,y,z) = x^2+y^2+z^2-(xy+yz+zx)$ since for real numbers $s = 0$ only when $x=y=z$!

  The general condition we need here is that $s(x,y,z) = 0$ should have ``real dimension two''.
  Here is a proof using this language, in our situation.

  Let $M \subset \RR^3$ be the surface $s=0$.
  We first contend $M$ is two-dimensional manifold.
  Indeed, the gradient $\nabla s = \left< 2yz-1, 2zx-1, 2xy-1 \right>$
  vanishes only at the points $(\pm 1/\sqrt2, \pm 1/\sqrt2, \pm 1/\sqrt2)$
  where the $\pm$ signs are all taken to be the same.
  These points do not lie on $M$, so the result follows by the \emph{regular value theorem}.
  In particular the topological closure of points on $M$
  with $xyz \neq 0$ is all of $M$ itself; so $Q$ vanishes on all of $M$.

  If we now identify $M$ with the semi-algebraic set consisting of
  maximal ideals $(x-a,y-b,z-c)$ in $\opname{Spec} \RR[x,y,z]$
  satisfying $2abc = a+b+c$, then we have
  \href{https://en.wikipedia.org/wiki/Dimension_of_an_algebraic_variety#Real_dimension}{real dimension} two,
  and thus the Zariski closure of $M$
  is a two-dimensional closed subset of $\opname{Spec} \RR[x,y,z]$.
  Thus it must be $Z = \mathcal V(2xyz-(x+y+z))$,
  since this $Z$ is an irreducible two-dimensional closed subset
  (say, by \emph{Krull's principal ideal theorem}) containing $M$.
  Now $Q$ is a global section vanishing on all of $Z$,
  therefore $Q$ is contained in the (radical, principal) ideal $(2xyz-(x+y+z))$ as needed.
  So it is actually divisible by $2xyz-(x+y+z)$ as desired.
\end{remark*}

Now we regard $P$ and $Q$ as complex polynomials instead.
First, note that substituting $(x,y,z) = (t,-t,0)$ implies $P$ is even.
We then substitute
\[ (x,y,z) = \left(x, \frac{i}{\sqrt2}, \frac{-i}{\sqrt2}\right) \]
to get
\begin{align*}
  &\phantom= xP(x) + \frac{i}{\sqrt2}
  \left( P\left( \frac{i}{\sqrt2} \right)
    - P\left( \frac{-i}{\sqrt2} \right) \right) \\
  &= \half x\left( P(x-i/\sqrt2) + P(x+i/\sqrt2) + P(\sqrt2i) \right)
\end{align*}
which in particular implies that
\[ P\left( x + \frac{i}{\sqrt2} \right) + P\left( x - \frac{i}{\sqrt2} \right)
  - 2P(x) \equiv P(\sqrt 2i) \]
identically in $x$.
The left-hand side is a second-order finite difference in $x$ (up to scaling the argument),
and the right-hand side is constant, so this implies $\deg P \le 2$.

Since $P$ is even and $\deg P \le 2$, we must have $P(x) = cx^2 + d$ for some real numbers $c$ and $d$.
A quick check now gives the answer $P(x) = c(x^2+3)$ which all work.