0

I must be doing something wrong using polynom package with TL 2021. This is first time I used it. Reference polynom

First example

I wanted to divide {X^2-\frac{X^6}{6}+\frac{X^10}{120}} by {1-\frac{X^4}{2}} but the display shows only {X^2-\frac{X^6}{6} divide by {1-\frac{X^4}{2}}

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{polynom}
\begin{document}
\[
\polylongdiv{X^2-\frac{X^6}{6}+\frac{X^10}{120}}{1-\frac{X^4}{2}}
\]
\end{document}

enter image description here

Second example

Adding one extra term to the divisor in the above example gives error

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{polynom}
\begin{document}
\[
\polylongdiv{X^2-\frac{X^6}{6}+\frac{X^10}{120}}{1-\frac{X^4}{2}+X^8}
\]
\end{document}

Now

lualatex foo5.tex
This is LuaHBTeX, Version 1.12.0 (TeX Live 2020)
 restricted system commands enabled.
(./foo5.tex
LaTeX2e <2020-10-01> patch level 2


 L3 programming layer <2020-12-07> xparse <2020-03-03> (/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size11.clo)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/polynom/polynom.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-luatex.def) (./foo5.aux) (/usr/local/texlive/2020/texmf-dist/tex/latex/base/ts1cmr.fd)
! Undefined control sequence.
<argument> \ifpld@InsidePolylongdiv \expandafter \pld@insert@remainder \pld@last@remainder
                                                                                +\relax \relax \fi
l.18 \polylongdiv{X^2-\frac{X^6}{6}+\frac{X^10}{120}}{1-\frac{X^4}{2}+X^8}

?

Example 3

Wrong quotient and remainder are given.

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{polynom}
\begin{document}
\polydiv\polya{X^2-\frac{X^6}{6}+\frac{X^10}{120}}{1-\frac{X^4}{2}+\frac{X^8}{24}}
‘The quotient is \polyprint\polya,
the remainder \polyprint\polyremainder
\end{document}

gives

enter image description here

But the above does not match result using Maple:

p1:=x^2-x^6/6+x^10/120;
p2:=1-x^4/2+x^8/24;
q := quo(p1, p2, x);
r := rem(p1, p2, x);

enter image description here

What Am I doing wrong?

Using lualatex to compile all latex. TL 2021 on Linux

1
  • Try with X^{10} instead of X^10. That solves all issues for me. – Luis Sibaja Jan 27 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.