[Tex/LaTex] Can’t get polylongdiv to work

polynom

I've tried to use the package polynom.

I've used the following command:

\polylongdiv[style=C]{z^4-8z^3+39z^2-122z+170}{z^2+8}

But my polynom division ends up like this:

enter image description here

I have also tried:

\polylongdiv[style=C]{z^4-8z^3+39z^2-122z+170}{z^2+0z+8}

Best Answer

See the manual of the polynom package, e.g. with the command texdoc polynom under Linux. You have to use \polyset{vars=...} (for a global change) or the option vars=... (for a one time change) to indicate what the variables are. The code

\documentclass{article}
\usepackage{polynom}
\begin{document}
% \polyset{vars=z} % alternative to option vars=z below
\polylongdiv[style=C,vars=z]{z^4-8z^3+39z^2-122z+170}{z^2+8}
\end{document}

gives the output enter image description here

Related Question