LaTeX Long Division in LaTeX: How to Write Each Line

  • Thread starter Thread starter binbagsss
  • Start date Start date
  • Tags Tags
    Division Latex
Click For Summary
SUMMARY

This discussion focuses on writing long division in LaTeX, specifically using the longdivision package. Users shared various methods to display each line of long division, including examples using MathJax and traditional LaTeX commands. Key solutions involve using the \hspace command for alignment and the \underline command for underlining results. The discussion also references external resources from TeX StackExchange and TUGboat for further examples and techniques.

PREREQUISITES
  • Familiarity with LaTeX syntax and commands
  • Understanding of the longdivision package in LaTeX
  • Basic knowledge of MathJax for web-based LaTeX rendering
  • Experience with formatting mathematical expressions in LaTeX
NEXT STEPS
  • Explore the longdivision package documentation for advanced features
  • Learn how to use \hspace for precise alignment in LaTeX
  • Investigate MathJax integration for displaying LaTeX on web pages
  • Review additional examples of long division formatting on TeX StackExchange
USEFUL FOR

Mathematicians, educators, students, and anyone looking to present long division clearly in LaTeX or on web platforms using MathJax.

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 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 SammyS, Mark44, jim mcnamara and 1 other person
Have you looked at the longdivision package?

i.e.

\usepackage{longdivision}
 

Similar threads

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