# Math Help - long division

1. ## long division

Can long division be done with latex?

2. 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 $\text{\LaTeX}$ installed on your computer, you can download the $\texttt{polynom}$ package. You can find documentation and the package download for that here.

3. Hello, VonNemo19!

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: . $(x^3 - 5x^2 + 10x - 8) \div (x - 2) \;=\;x^2-3x + 4$

. . $\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}$$

4. Originally Posted by VonNemo19
Can long division be done with latex?
$
\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}$$

5. Originally Posted by shawsend
$
\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!!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 6, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.895110011100769, "perplexity": 2988.046115532848}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-40/segments/1443736675218.1/warc/CC-MAIN-20151001215755-00182-ip-10-137-6-227.ec2.internal.warc.gz"}