A question about a palindromic polynomial of even degree In Wikipedia it is stated,

If $p(x)$ is a palindromic polynomial of even degree $2d$, then there is a polynomial $q$ of degree $d$ such that $p(x) = x^d q(x + \frac{1}{x})$.

My question is:

How does one find the polynomial $q$ given $p$.

The specific example I have in mind is:
$p(t) = t^{12} - t^{11} - t^{10} + t^8 + t^7 - 2t^6 + t^5 + t^4 - t^2 - t + 1 =(t^2 + t + 1)^2(t^2 - t + 1)(t + 1)^2(t - 1)^4 $
Any help is highly appreciated.
 A: Write $q(y) = a_6 y^6 + \cdots + a_1 y + a_0$. Using your example, we have $$\begin{align*}q(x + x^{-1}) =& x^6 - x^5 - x^4 + x^2 + x -2 + x^{-1} + x^{-2} - x^{-4} - x^{-5} + x^{-6} \\
=& a_6 x^6 + a_5 x^5 + (6 a_6 + a_4) x^4 + (5 a_5 + a_3) x^3 + \\&(15 a_6 + 4 a_4 +a_2) x^2 + (10 a_5 + 3 a_3 + a_1) x + \\
&(20a_6 + 6 a_4 + 2 a_2 + a_0) + \text{symmetrical part}\end{align*}.$$
This gives two linear systems: $$\begin{align*} a_6 &=1 \\ 6 a_6 + a_4 &= -1 \\ 15a_6 + 4 a_4 + a_1 &=1 \\ 20 a_6 + 6 a_4 + 2 a_2 + a_0 &= -2  \\ \end{align*}$$
which has solution $(a_6, a_4, a_2, a_0) = (1, -7, 14, -8)$, and $$\begin{align*} a_5 &= -1 \\ 5a_5 + a_3 &= 0 \\ 10 a_5 + 3a_3 + a_1 &= 1 \end{align*}$$
which has solution $(a_5, a_3, a_1) = (-1, 5, -4)$, so $$q(y) = y^6 - y^5 - 7y^4 + 5y^3 + 14y^2 - 4y - 8.$$
You can confirm this in WolframAlpha.

To solve the problem in more generality, let's construct polynomials $S_n$ with the property that $S_n(x + x^{-1}) = x^n + x^{-n}$. Obviously $S_0(y) = 2$ and $S_1(y) = y$, and from then on we have a recurrence relation $$S_{n+1}(y) = y S_n(y) - S_{n-1}(y)$$ which you can confirm by substituting $y = x + x^{-1}$, $S_n(y) = x^n + x^{-n}$, $S_{n-1}(y) = x^{n-1} + x^{1-n}$ and simplifying. The first few such polynomials are $$\begin{align*}S_0(y) &= 2 \\ S_1(y) &= y \\ S_2(y) &= y^2 - 2 \\ S_3(y) &= y^3 - 3y \\ S_4(y) &= y^4 - 4y + 2 \\ S_5(y) &= y^5 - 5y^3 + 5y \\ S_6(y) &= y^6 - 6y^4 + 9y - 2. \end{align*}$$
It's not hard to see that in general, $S_n(y) = 2 T_n(y/2)$, where $T_n$ is the Chebyshev polynomial of the first kind defined by $T_0(y) = 1, T_1(y) = y, T_{n+1}(y) = 2y T_n(y) - T_{n-1}(y).$ Then given a palindromic polynomial $p(x) = a_d x^{2d} + \cdots + a_1 x^{d+1} + a_0 x^d + a_{1} x^{d-1} + \cdots + a_d$, the polynomial $q$ such that $p(x) = x^d q(x + x^{-1})$ is simply $$q(y) = 2 \sum_{i=0}^d a_i T_i\left(\frac{y}{2}\right).$$
