Problem: Find all polynomials $P(x)$ with real coefficients that satisfy
\[ P(x \sqrt 2) = P(x + \sqrt{1-x^2}) \]
for all real numbers $x$ with $\lvert x \rvert \le 1$.

Solution: The answer is any polynomial of the form
$P(x) = f(U(x/\sqrt2))$, where $f \in \RR[x]$
and $U$ is the unique polynomial satisfying $U(\cos\theta) = \cos(8\theta)$.

Let $Q(x) = P(x \sqrt 2)$; then the condition reads
\[
  Q(\cos\theta) = Q\left( \frac{1}{\sqrt2}(\cos\theta+\sin\theta) \right)
  = Q(\cos(\theta-45\dg)) \qquad \forall \; 0 \le \theta \le 180\dg.
\]
We call a polynomial \emph{good} if it satisfies this functional equation.
It's easy to see $U$ itself is good, and hence so is any polynomial of the form
$g(U(x))$ for $g \in \RR[x]$.
Our goal is to show that every good $Q$ is of this form.

The proof is by induction on $\deg Q$, where the case $\deg Q = 0$ is vacuous.
Note that
\begin{align*}
  Q(\cos136\dg) &= Q(\cos91\dg)
  = Q(\cos46\dg) = Q(\cos1\dg) = Q(\cos-44\dg) \\
  &= Q(\cos44\dg) = Q(\cos89\dg) = Q(\cos134\dg) = Q(\cos179\dg).
\end{align*}
Hence $Q$ is equal at eight distinct values
(not nine since $\cos -44\dg = \cos44\dg$ is repeated).
So it follows that the quotient
\[ \wt Q(x) \coloneq \frac{Q(x) - Q(\cos1\dg)}{U(x) - U(\cos1\dg)} \]
is also a good polynomial, because the polynomial
$U(x) - U(\cos1\dg)$ is the degree-eight polynomial with those distinct values as roots.

In particular, $\deg Q \ge 8$ unless $Q$ is constant, and in fact
\[ Q(x) = \left[ U(x) - U(\cos 1\dg) \right] \wt Q(x) + Q(\cos(1\dg)) \]
so if one applies the induction hypothesis to $\wt Q(x)$
(which has degree $\deg Q - 8$), the proof is completed.