Latex for Long-Division: Displaying Code

  • Context: LaTeX 
  • Thread starter Thread starter jackmell
  • Start date Start date
  • Tags Tags
    Latex
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 4K views
jackmell
Messages
1,806
Reaction score
54
Hi,

Can we display a long-division? I tried copying the code in this reference (post 6) and it's not working:

http://www.artofproblemsolving.com/...084071&hilit=latex+for+long+division#p1084071

Someone in the Homework forum was asking a question about long
division and I think it's helpful if they see what it looks like.
Can PF display this code? I did try copying it to here, add tex delimiters and also spaces every 30 or so characters as per a FAQ I think.
But it did not work.

[tex] \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} [/tex]

Thanks,
Jack
 
Last edited:
Physics news on Phys.org