Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > LaTex Help
Reply
 
Thread Tools Display Modes
  #1  
Old December 18th, 2008, 08:41 AM
Junior Member
 
Join Date: Nov 2008
Posts: 53
Country:
Thanks: 16
Thanked 0 Times in 0 Posts
sah_mat is on a distinguished road
Default writing division with latex

ı want to write a code with latex which can give me the solution of a division with a picture.
ı aimed to say as all you remembered from elementary school while we were trying to solve a problem like this 12/5;
12 |___5__
-__| 2
2
we draw this simple picture so can ı write this in latex?
Reply With Quote
Advertisement
 
  #2  
Old December 18th, 2008, 01:00 PM
Opalg's Avatar
MHF Contributor

 
Join Date: Aug 2007
Location: Leeds, UK
Posts: 2,455
Country:
Thanks: 150
Thanked 1,495 Times in 1,250 Posts
Opalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant future
Default

I think that the way I lay out the diagram for long division is different from that. If it's any help, here is an example of the code that I used some years ago when teaching a class how to do long division of polynomials. The code is
Code:
\begin{array}{r@{}rrrrl}
&&x^2&+7x&+10\\
\cline{2-5}
x-3\;|&\;x^3 &+ 4x^2& - 11x& - 25 \\
&x^3&-3x^2 \\
\cline{2-3}
&&7x^2&-11x \\
&&7x^2&-21x \\
\cline{3-4}
&&&10x&-25 \\
&&&10x&-30&\quad\mbox{The quotient is }x^2+7x+10. \\
\cline{4-5}
&&&&5&\quad\mbox{The remainder is }5.
\end{array}
It produces this:

\begin{array}{r@{}rrrrl}&&x^2&+7x&+10\\\cline{2-5}x-3\;|&\;x^3 &+ 4x^2& - 11x& - 25 \\&x^3&-3x^2 \\\cline{2-3}&&7x^2&-11x \\&&7x^2&-21x \\\cline{3-4}&&&10x&-25 \\&&&10x&-30&\quad\mbox{The quotient is }x^2+7x+10. \\\cline{4-5}&&&&5&\quad\mbox{The remainder is }5.\end{array}

A simpler version for dividing 12 by 5 would look like this:
Code:
\begin{array}{r@{}r@{}r@{}}
&&2\\
\cline{2-3}
5\;|&\;1&2 \\
&1&0 \\
\cline{2-3}
&&2 \\
\end{array}
It gives this: \begin{array}{r@{}r@{}r@{}}&&2\\\cline{2-3}5\;|&\;1&2 \\&1&0 \\\cline{2-3}&&2 \\\end{array}

Last edited by Opalg; December 18th, 2008 at 01:12 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 12:29 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.