Typesetting synthetic division

I’m teaching an Algebra course that highlights the Fundamental Theorem of Algebra. So of course we’re looking closely at polynomial division, and in particular at synthetic division. My students are preparing their homework assignments using LaTeX, so this begs the question about how to typeset their computations.

One of my students found the LaTeX package polynom, which can automatically compute and typeset polynomial long division and synthetic division. The examples in the polynom manual are:

\polylongdiv{X^3+X^2-1}{X-1}

which yields

Screen Shot 2014-09-07 at 2.57.19 PM

 

 

 

 

 

and for synthetic division, the polynom command

\polyhornerscheme[x=1]{x^3+x^2-1}

which yields

Screen Shot 2014-09-07 at 2.57.28 PM

 

 

 

But what if you want to show division by x - m using synthetic division, rather than x - 1? These commands no longer work.

Instead, you can make fancy use of \cline and \multicolumn in the array environment:

\begin{array}{r|rrrr}
& 1 & 1 & 0 & -1 \\
m & & m & (m^2 + m) & (m^3 + m^2) \\ \cline{2-5}
\multicolumn{2}{r}{1} & (m + 1) & (m^2 + m) & (m^3 + m^2 - 1)
\end{array}

which yields

Screen Shot 2014-09-07 at 3.02.21 PM

 

 

 

Interesting! If you divide a polynomial by x - m, the remainder is just the value of that polynomial at m!


Posted

in

,

by

Tags: