1

How to make a multiplication or division, the intermediate steps. The numbers can be rational - decimals? enter image description here

it seems the OP merely wants Mathematica to show him how to multiply and divide the way a kid in primary school would do it. That's a whole lot of digit carrying

This is the idea, for integers and decimals.

edit

enter image description here

wally
  • 417
  • 2
  • 9
  • 1
    @Oleksandr, it seems the OP merely wants Mathematica to show him how to multiply and divide the way a kid in primary school would do it. That's a whole lot of digit carrying… :o – J. M.'s missing motivation Aug 02 '15 at 03:21
  • 2
    "it seems the OP merely wants Mathematica to show him how to multiply and divide the way a kid in primary school would do it. That's a whole lot of digit carrying" this is the idea, for integers and decimals – wally Aug 02 '15 at 03:48
  • 2
    @wally. Mathematica doesn't perform any intermediate steps such as you show when it does arithmetic. It could be programed to demonstrate the steps of school arithmetic, but would not be a trivial project. You might challenge followers of this site to produce such code. However, you will have to reword your question to make it clear that's what you want. Can't say whether or not you will get any takers. – m_goldberg Aug 02 '15 at 03:52
  • 2
    Related: Showing steps for TrigExpand. But I think this question is not related to an actual issue encountered while programming in Mathematica. Perhaps you should show what you've already tried. – Jens Aug 02 '15 at 03:56
  • Mathematica doesn't have this built in. You would have to program it from scratch. – Szabolcs Aug 02 '15 at 07:14

2 Answers2

6

I feel like I should be prefacing this answer with three confessions, considering that this is an question. First, I had a hard time with the multiplication tables until I was nine years old. Second, even after I finally got the hang of multiplication, I was never a fan of multiplying from right-to-left; I preferred going left-to-right. (Arthur Benjamin seems to approve.) Finally, I confess I actually spent five six minutes writing this:

kidTimes[p_Integer?Positive, q_Integer?Positive] := Module[{cv, d, m, n},
   {m, n} = Through[{Max, Min}[{p, q}]]; d = IntegerLength[n] - 1;
   cv = ListConvolve[IntegerDigits[m], IntegerDigits[n], {1, -1}, 0, 
                     Times, Composition[Reverse, List]];
   Grid[ReplacePart[PadLeft[Append[{IntegerDigits[m], IntegerDigits[n]} ~Join~
        Table[ArrayPad[IntegerDigits[FromDigits[Diagonal[cv, k - d]]], {0, k}, ""],
              {k, 0, d}], IntegerDigits[m n]], Automatic, ""], {2, 1} -> "×"],
        Alignment -> {Right, Baseline},
        Dividers -> {False, {3 -> True, -2 -> True}}]]

how I NEVER did multiplication

(Writing this answer took longer than writing the routine from scratch.)

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
0

The following is too long for a comment and rather describes a strategy of searching for answers than giving an answer. It is certainly not a direct response to the question in favor of the question.

But it is also not a marketing response in favor of Wolfram Alpha.

Anyway, next https://mathematica.stackexchange.com/ and the Internet, I recommend the following pages for searches;

http://search.wolfram.com/ with the querry basic arithmetic,there are yet some good links, Results

http://demonstrations.wolfram.com/ with the querry multiplication,there are yet some good links, Results, in particular look at Long Multiplication

http://www.wolframalpha.com/pro/problem-generator/ from the Media:

Our online math practice problems offer hints and integrated Step-by-step solutions. Prefer pen and paper? Generate a printable worksheet for study sessions and quizzes.

And a really nice article Solving Basic Arithmetic Step by Step with Wolfram|Alpha

Have Fun!