0

I'm having trouble using \polynom for variables with negative exponents.

When I run

\polylongdiv[style=A]{1+2z^{-2}+z^{-4}}{z^{-1} - z^{-3}} 

I get something not at all correct.

Is there a more manual way input the answer and the subtracted variables?

  • Welcome to TeX.SE!! – manooooh Feb 15 at 5:45
  • 4
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Stefan Pinnow Feb 15 at 5:56
  • Could you not put w=z^{-1} and rewrite? – Andrew Swann Feb 15 at 7:45
0

The polynum package uses internal macros to decide how to perform the long division, and I'm not aware of any high level options to change its behaviour. But of course you can do the long division manually using an array. \cline is useful to draw horizontal lines spanning only part of the array.

The simplest set-up would have you using just two, left-justified columns, the first being empty apart from in the second row for the divisor. Here is example code to get you started:

\documentclass{article}
\begin{document}
\begin{equation*}
    \def\arraystretch{1.6} % Stetch the arrary, increasing row separation (looks nicer)
    \begin{array}{ll} % Two left justified colums
    &1+2z^{-2}+1z^{-4}  \\  \cline{2-2} % hoizontal line spanning second column only
    \left.z^{-1} - z^{-3}\right)\, & \\
    \end{array}
\end{equation*}
\end{document}

output1

To achieve a better output, you may want to add additional columns (for example, see this related answer).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.