Finding Polynomials to Satisfy a Condition I need to find polynomials $x(n), y(n)$ s.t. $x(n)(n^{2}+n+1)+y(n)(n^{2}+1)=1$, $\forall n \in \mathbb{Z}$.
I tried distributing it out:
$x(n)n^{2} + x(n)n + x(n) + y(n)n^{2}+y(n)=1$. I understand that for this to work, one of the terms has to equal one, and the other terms have to cancel each other out. But the answer isn't coming to me yet. Can anyone give me a hint?
 A: Hint: You have $(n^2+1)\left(x(n)+y(n)\right) + n x(n) = 1$. Note that $n^2+1 + n(-n)=1$.
A: Do you know Euclidean algorithm which compute the gcd of two integers $p$ and $q$? 
If you reverse the steps in computing the gcd, you will be able to find two integers $m$, $n$ such that $\gcd(p,q) = m p + n q$. Exactly the same thing happens for polynomials.
You can use it to express the gcd of two polynomials as a linear combination of two polynomials. For example, for the two polynomials in the question, we have:
$$\begin{align}
& \begin{cases}
\color{red}{n^2 + n + 1} & = 1\cdot\color{green}{( n^2 + 1 )} + \color{blue}{n} &(*1)\\
\color{green}{n^2 + 1}    & = n \cdot \color{blue}{n} + 1 &(*2)
\end{cases}\\
\\
\implies &
\begin{cases}
1 & \stackrel{*2}{=} \color{green}{( n^2 + 1 )} - n \cdot \color{blue}{n}\\
  & \stackrel{*1}{=} \color{green}{( n^2 + 1 )} - n \cdot( \color{red}{(n^2 + n + 1 )} - \color{green}{(n^2+1)} )\\
  & = (-n)\cdot\color{red}{(n^2+n+1)} + (n+1) \cdot \color{green}{(n^2+1)}
\end{cases}
\end{align}
$$
