Consider two $n\times n$ real symmetric polynomial matrices, $P(x)$ and $Q(x)$ in a single indeterminate $x$. That is, $$P(x)=\sum_{i=0}^m P_i x^i ~~~~~ Q(x)=\sum_{i=0}^m Q_i x^i ~~~~~ P_i,Q_i\in S_n(\mathbb{R}) ~~~ m<n$$ Further assume that $P(x)$ and $Q(x)$ are orthogonally similar - that is, there is an orthogonal matrix $U(x)$ (not necessarily polynomial) such that: $$U^T(x)P(x)U(x)=U^{-1}(x)P(x)U(x)=Q(x)$$ I need to show that this implies we can actually choose $U(x)$ to be constant (i.e. independent of $x$).
I have seen this proven in the case that $U(x)$ and $U^{-1}(x)$ belong to the ring of matrix polynomials (e.g. here) in which case it is true much more generally even over other domains that the reals. I am explicitly interested in the generalization where $U(x)$ and/or $U^{-1}(x)$ are not necessarily polynomials but are instead allowed to be general functions of $x$. The intuition (and investigation) suggests that the result will still hold as the equality for all $x$ imposes an infinite number of constraints on the coefficients of $P(x)$ and $Q(x)$ and there are only finitely many variables that can be used to satisfy those relationships. But I have as yet been unable to prove the result. I would even be happy with a proof for the linear case $m=1$.
I have tried several strategies: First, I tried the natural process of expanding $U(x)$ in a Taylor series about $x=0$. This results in a series of constraints (e.g. the constant term implies $ U^T(0) P_0 U(0)=Q_0$, $x^1$ shows that the diagonal elements of $U^T(0) P_1 U(0)$ and $Q_1$ are equal and defines $U_1$, etc.). But I have yet to show that we can force $U^T(0) P_i U(0)=Q_i$ (which would imply the desired result). I have also attempted differentiating $U^T(x)P(x)U(x)=Q(x)$ and treating the result as a differential equation. This leads to some nice relationships that come from looking at the converse relationship $U(x)Q(x)U^T(x)=P(x)$, but again no proof that the non-constant terms can be made to vanish. Finally, I have looked at it from a linear algebra standpoint and noted that the eigenvalues, characteristic polynomial and minimal polynomials of $P(x)$ and $Q(x)$ must be the same. But that doesn't lead to any progress at all so far as I can see.
Edit: Adjusted statement of the problem from "is constant" to "can be chosen constant". This re-statement accounts for the fact that if there are degenerate eigenvalues, there can be many possible $U(x)$ - some of which may not be constant. In this situation, it is sufficient to prove that one of the possible $U(x)$ is constant.