Results 1 to 2 of 2

Math Help - writing division with latex

  1. #1
    Junior Member
    Joined
    Nov 2008
    Posts
    54

    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?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    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}<br />
&&x^2&+7x&+10\\<br />
\cline{2-5}<br />
x-3\;|&\;x^3 &+ 4x^2& - 11x& - 25 \\<br />
&x^3&-3x^2 \\<br />
\cline{2-3}<br />
&&7x^2&-11x \\<br />
&&7x^2&-21x \\<br />
\cline{3-4}<br />
&&&10x&-25 \\<br />
&&&10x&-30&\quad\mbox{The quotient is }x^2+7x+10. \\<br />
\cline{4-5}<br />
&&&&5&\quad\mbox{The remainder is }5.<br />
\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@{}}<br />
&&2\\<br />
\cline{2-3}<br />
5\;|&\;1&2 \\<br />
&1&0 \\<br />
\cline{2-3}<br />
&&2 \\<br />
\end{array}<br />
    Last edited by Opalg; December 18th 2008 at 12:12 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: December 10th 2011, 06:40 PM
  2. Writing p = x^2 + y^2
    Posted in the Number Theory Forum
    Replies: 8
    Last Post: June 28th 2010, 11:35 AM
  3. LaTex inside of LaTex
    Posted in the LaTeX Help Forum
    Replies: 2
    Last Post: November 12th 2009, 11:07 AM
  4. Polynomial division vs synthetic division
    Posted in the Algebra Forum
    Replies: 2
    Last Post: April 9th 2009, 05:49 AM
  5. Writing a bit pattern
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: May 25th 2008, 09:49 AM

Search Tags


/mathhelpforum @mathhelpforum