Long Division in LaTeX: How to Write Each Line

  • Context: LaTeX 
  • Thread starter Thread starter binbagsss
  • Start date Start date
  • Tags Tags
    Division Latex
Click For Summary

Discussion Overview

The discussion centers on how to represent long division in LaTeX, exploring various methods and examples for formatting each line of the division process. The scope includes technical explanations and practical applications of LaTeX for mathematical notation.

Discussion Character

  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant asks how to write each line of long division in LaTeX.
  • Another participant provides a solution using polynomial long division, though notes the alignment is sub-optimal.
  • Links to external resources from Tex StackExchange and the Tex Users Group are shared for additional examples and methods.
  • A participant shares a specific LaTeX code snippet for formatting long division with numerical examples.
  • Another participant suggests using the longdivision package in LaTeX for potentially better formatting.

Areas of Agreement / Disagreement

Participants have not reached a consensus on a single method for writing long division in LaTeX, as multiple approaches and resources are presented without clear agreement on the best solution.

Contextual Notes

Some participants express concerns about alignment and formatting, indicating that the solutions may depend on specific use cases or preferences in presentation style.

binbagsss
Messages
1,291
Reaction score
12
How do you write each line of long division in LaTeX on here ?

Thanks
 
Physics news on Phys.org
binbagsss said:
How do you write each line of long division in LaTeX on here ?

Thanks
This has been my solution:
(Sorry, for the sub-optimal alignment.)

##(x^3+2x+1) : (x-a) \rightarrow x^2##
##-[(x-a)\cdot x^2] = -x^3+ax^2##
##\text{+________________________}##
##ax^2 + 2x +1 / : (x-a) \rightarrow ax##
##-[(x-a)\cdot ax] = -ax^2+a^2x##
##\text{+________________________}##
##2x+a^2x+1 / :(x-a) \rightarrow (2+a^2)##
##-[(x-a)\cdot (2+a^2)] = -2x+2a-a^2x+a^3##
##\text{+________________________}##
##2a+a^3+1##
 
  • Like
Likes   Reactions: jim mcnamara and Janosh89
## \hspace{11.5mm}536##
## 23\overline{)12345}##
## \hspace{7mm}\underline{115}##
## \hspace{11.5mm}84##
## \hspace{11.5mm}\underline{69}##
## \hspace{11.5mm}155##
## \hspace{11.5mm}\underline{138}##
## \hspace{14mm}17##

# \hspace{11.5mm}536#
# 23\overline{)12345}#
# \hspace{7mm}\underline{115}#
# \hspace{11.5mm}84#
# \hspace{11.5mm}\underline{69}#
# \hspace{11.5mm}155#
# \hspace{11.5mm}\underline{138}#
# \hspace{14mm}17#
 
  • Like
  • Love
Likes   Reactions: SammyS, Mark44, jim mcnamara and 1 other person
Have you looked at the longdivision package?

i.e.

\usepackage{longdivision}
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K