Long Division in LaTeX: How to Write Each Line

In summary, to write long division in LaTeX, you can use the longdivision package or manually create the division symbol and alignment using various commands and align environments. Examples and resources for creating long division in LaTeX can be found on Tex StackExchange and the Tex Users Group.
  • #1
binbagsss
1,254
11
How do you write each line of long division in LaTeX on here ?

Thanks
 
Physics news on Phys.org
  • #2
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
  • #4
## \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
  • #5
Have you looked at the longdivision package?

i.e.

\usepackage{longdivision}
 

1. What is long division in LaTeX?

Long division in LaTeX is a way of writing mathematical equations, particularly division problems, in the typesetting language LaTeX. It allows for more professional and organized formatting of equations compared to traditional pen and paper methods.

2. How do I write each line of long division in LaTeX?

To write each line of long division in LaTeX, you will need to use the \longdiv{} command. This command takes two arguments: the dividend and the divisor. It will automatically generate the proper formatting for each line of the division problem.

3. Can I customize the appearance of the long division in LaTeX?

Yes, you can customize the appearance of the long division in LaTeX by changing the parameters of the \longdiv{} command. For example, you can change the size of the numbers, the spacing between lines, and the length of the division bar.

4. Are there any packages or templates available for long division in LaTeX?

Yes, there are several packages and templates available for long division in LaTeX. Some popular ones include \usepackage{longdiv} and \usepackage{polynom}. These packages provide additional features such as the ability to show remainders and to add annotations to the division problem.

5. Is long division in LaTeX difficult to learn?

Long division in LaTeX may seem complicated at first, but with practice, it can become easy to use. There are many online resources, tutorials, and forums available to help you learn and troubleshoot any issues you may encounter. Once you understand the basic syntax, writing each line of long division in LaTeX will become second nature.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
828
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
233
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
783
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
376
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
Back
Top