# long division

• Jun 26th 2009, 01:40 PM
VonNemo19
long division
Can long division be done with latex?
• Jun 26th 2009, 01:52 PM
Chris L T521
Quote:

Originally Posted by VonNemo19
Can long division be done with latex?

It would be terribly messy trying to do it in the forums...the TeX code would be a bit long... xD

However, if you have $\displaystyle \text{\LaTeX}$ installed on your computer, you can download the $\displaystyle \texttt{polynom}$ package. You can find documentation and the package download for that here.
• Jun 26th 2009, 03:01 PM
Soroban
Hello, VonNemo19!

Quote:

Can long division be done with LaTexX?
I devised a method, but I don't recommend it.

As Chris pointed out, it's messy and takes a bit of planning.

Example: .$\displaystyle (x^3 - 5x^2 + 10x - 8) \div (x - 2) \;=\;x^2-3x + 4$

. . $\displaystyle \begin{array}{ccccccccc} & & & & x^2 & - & 3x & + & 4 \\ & & -- & -- & -- & -- & -- & -- & -- \\ x-2 & ) & x^3 & - & 5x^2 & + & 10x & - & 8 \\ & & x^3 & - & 2x^2 \\ & & -- & -- & -- \\ & & & & 3x^2 & + & 10x \\ & & & & 3x^2 & + & 6x \\ & & & & -- & -- & -- \\ & & & & & & 4x & - & 8 \\ & & & & & & 4x & - & 8 \\ & & & & & & -- & -- & -- \end{array}$

$$\begin{array}{ccccccccc} & & & & x^2 & - & 3x & + & 4 \\ & & -- & -- & -- & -- & -- & -- & -- \\ x-2 & ) & x^3 & - & 5x^2 & + & 10x & - & 8 \\ & & x^3 & - & 2x^2 \\ & & -- & -- & -- \\ & & & & 3x^2 & + & 10x \\ & & & & 3x^2 & + & 6x \\ & & & & -- & -- & -- \\ & & & & & & 4x & - & 8 \\ & & & & & & 4x & - & 8 \\ & & & & & & -- & -- & -- \end{array}$$

• Jun 28th 2009, 08:22 AM
shawsend
Quote:

Originally Posted by VonNemo19
Can long division be done with latex?

$\displaystyle \begin{array}{rc@{}c} & \multicolumn{2}{l}{\, \, \, \frac{1}{z}+\frac{z}{3}+\frac{z^3}{15}-\dotsb} \vspace*{0.12cm} \\ \cline{2-3} \multicolumn{1}{r}{z^2-\frac{z^4}{3}+\frac{2z^6}{45}-\dotsb \hspace*{-4.8pt}} & \multicolumn{1}{l}{ \hspace*{-5.6pt} \Big) \hspace*{4.6pt} z} \\ & \multicolumn{2}{l}{\, \, \, z-\frac{z^3}{3}+\frac{2z^5}{45}-\dotsb} \end{array}$

here's some more of it that didn't fit with the 450 char limit (seek the aesthetics, much will be found :))

$$\begin{array}{rc@{}c} & \multicolumn{2}{l}{\, \, \, \frac{1}{z}+\frac{z}{3}+\frac{z^3}{15}-\dotsb} \vspace*{0.12cm} \\ \cline{2-3} \multicolumn{1}{r}{z^2-\frac{z^4}{3}+\frac{2z^6}{45}-\dotsb \hspace*{-4.8pt}} & \multicolumn{1}{l}{ \hspace*{-5.6pt} \Big) \hspace*{4.6pt} z} \\ & \multicolumn{2}{l}{\, \, \, z-\frac{z^3}{3}+\frac{2z^5}{45}-\dotsb} \\ \vspace{1mm} \cline{2-3} \vspace{1mm} & \multicolumn{2}{l}{\, \, \, \phantom{1{}-{}} \frac{z^3}{3}-\frac{2z^5}{45}+\dotsb} \\ & \multicolumn{2}{l}{\, \, \, \phantom{1{}-{}} \frac{z^3}{3}-\frac{z^5}{9}+\frac{2z^7}{135}+\dotsb} \vspace*{0.12cm} \\ \vspace{1mm} \cline{2-3} \vspace{1mm} & \multicolumn{2}{l}{\, \, \, \phantom{z{}-{}\frac{z^3}{3}{}-{}} \frac{z^5}{15}-\dotsb} \end{array}$$
• Jun 28th 2009, 09:11 AM
Chris L T521
Quote:

Originally Posted by shawsend
$\displaystyle \begin{array}{rc@{}c} & \multicolumn{2}{l}{\, \, \, \frac{1}{z}+\frac{z}{3}+\frac{z^3}{15}-\dotsb} \vspace*{0.12cm} \\ \cline{2-3} \multicolumn{1}{r}{z^2-\frac{z^4}{3}+\frac{2z^6}{45}-\dotsb \hspace*{-4.8pt}} & \multicolumn{1}{l}{ \hspace*{-5.6pt} \Big) \hspace*{4.6pt} z} \\ & \multicolumn{2}{l}{\, \, \, z-\frac{z^3}{3}+\frac{2z^5}{45}-\dotsb} \end{array}$

here's some more of it that didn't fit with the 450 char limit (seek the aesthetics, much will be found :))

$$\begin{array}{rc@{}c} & \multicolumn{2}{l}{\, \, \, \frac{1}{z}+\frac{z}{3}+\frac{z^3}{15}-\dotsb} \vspace*{0.12cm} \\ \cline{2-3} \multicolumn{1}{r}{z^2-\frac{z^4}{3}+\frac{2z^6}{45}-\dotsb \hspace*{-4.8pt}} & \multicolumn{1}{l}{ \hspace*{-5.6pt} \Big) \hspace*{4.6pt} z} \\ & \multicolumn{2}{l}{\, \, \, z-\frac{z^3}{3}+\frac{2z^5}{45}-\dotsb} \\ \vspace{1mm} \cline{2-3} \vspace{1mm} & \multicolumn{2}{l}{\, \, \, \phantom{1{}-{}} \frac{z^3}{3}-\frac{2z^5}{45}+\dotsb} \\ & \multicolumn{2}{l}{\, \, \, \phantom{1{}-{}} \frac{z^3}{3}-\frac{z^5}{9}+\frac{2z^7}{135}+\dotsb} \vspace*{0.12cm} \\ \vspace{1mm} \cline{2-3} \vspace{1mm} & \multicolumn{2}{l}{\, \, \, \phantom{z{}-{}\frac{z^3}{3}{}-{}} \frac{z^5}{15}-\dotsb} \end{array}$$

As I said, it would be messy...but hey, at least it works!! (Rofl)