Dear forum members,
I am having major problems with the polynom package. I am trying to perform polynomial long division on the expression n^3-1. I used the following code
\polyset{vars=n}
\polylongdiv{x^3-1}{x-1}
and the result is in the attachment. The expression goes all weird when I try to change the variable, because I desperately need it to be n instead of x. Why won't the package accept n as a variable?
Could someone please help me?
Thank you!
Math & Science ⇒ Polynom package and change of variable
Polynom package and change of variable
- Attachments
-
- polynomial.jpg (7.86 KiB) Viewed 5332 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Polynom package and change of variable
You missed something. When declaring n as a variable, you have to use it as variable. The following code works fine for me.
The manual of the polynom package is a little bit misleading in this point.
Best regards
Thorsten
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{polynom}
\parindent0em
\begin{document}
\polyset{vars=n}
\polylongdiv{n^3-1}{n-1}
\end{document}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Polynom package and change of variable
Thank you so much!
It works now.
It works now.