# Polynomial with rational coefficients

Let $a$ be a root of $X^4 + 2X + 1 = 0$. How to express $(a+1)/(a^2 - 2a + 2)$ as a polynomial in $a$ with rational coefficients? I know $X^4 + 2X + 1 = (X+1)(X^3 - X^2 + X + 1)$ but I don't know how to proceed from here.

• You should format your math text using MathJax. Here is a reference that may be useful: meta.math.stackexchange.com/questions/5020/…
– Dave
Feb 21, 2017 at 5:21
• @Homaniac I am a bit confused with "express as a polynomial in $a$". Do you mean to express $(a + 1)(a^2 - 2a + 2)^{-1}$ as $c_0 + c_1 a + \dots + c_n a^n$ for some $c_i \in \mathbb{Q}$? Feb 21, 2017 at 5:39
• Yes I think so~ ^^ Feb 21, 2017 at 5:44
• @Homaniac I am going to hospital right now. Hint: $x^3 - x^2 + x + 1$ is irreducible over $\mathbb{Q}$. Hence $(a^2 - 2a + 2)^{-1}$ can be written as $c_0 + c_1a + c_2a^2$. Good luck! Feb 21, 2017 at 6:04
• Since your polynomial is not irreducible, there will be two correct answers, depending on whether $a$ is a root of $x+1$ or of $x^3-x^2+x+1$. Feb 21, 2017 at 6:07

$${a+1\over a^2-2a+2}=Qa^2+Ra+S$$ where $Q,R,S$ are the unknown rational numbers we have to find.
We'll assume $a$ is a root of the irreducible polynomial $x^3-x^2+x+1$. It follows that $a^3=a^2-a-1$, and $a^4=a^3-a^2-a=(a^2-a-1)-a^2-a=-2a-1$.
$$a+1=(a^2-2a+2)(Qa^2+Ra+S)$$ Now multiply out the right side, and reduce to degree two by using $a^3=a^2-a-1$ and $a^4=-2a-1$. Then equate the coefficients of $1$, of $a$, and of $a^2$ on the two sides of the equation. That will give you a system of three equations in the three unknowns $Q,R,S$. Solve the system, and you win.
Let $M = \begin{pmatrix} 0 & 0 & -1\\ 1 & 0 & -1 \\0 & 1 & 1 \end{pmatrix}$ be the companion matrix of the polynomial $p(x) = x^3 -x^2 +x +1$. It has the property $p(M) = 0$. Let $A$ be the algebra generated by $M$. It is three dimensional and a basis is $1, M, M^2$. Note that the coefficients of an element of $A$ w.r.t. this basis can be found in its first column (try out $M^0, M$ and $M^2$). Then $(M+I)/(M^2-2M+2)$ gives $\begin{pmatrix} -1 & -2 & -1\\ -1 & -3 & -3 \\2 & 1 & -2 \end{pmatrix}$ so the result (reading from the first column) is $-1 -a + 2a^2$.