I would like to do the long division between polynomials p(x)=-x^4+2x^2-(a-1)^2x+1 (where a is a real number) and q(x)=x+1:
I tried to use polynom package as follows:
\documentclass{article}
\usepackage{polynom}
\begin{document}
\polylongdiv[style=D,vars=x]{-x^4+2x^2-(a-1)^2x+1}{x+1}
\end{document}
without results.
EDIT. I tried to expand (a-1)^2 but errors seem to appear. Also, I changed (a-1)(a-1) by (a-1)(a+1) and LaTeX goes a little crazy but with no errors:
Does anyone know any trick to make it work or a package that allows the insertion of variables?

