MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: The audience for Mathematica

  • To: mathgroup at
  • Subject: [mg102179] Re: [mg102150] Re: The audience for Mathematica
  • From: "David Park" <djmpark at>
  • Date: Fri, 31 Jul 2009 05:58:15 -0400 (EDT)
  • References: <31768270.1248950619222.JavaMail.root@n11>


Easy with Presentations. These are just cases where you want to apply Factor
to selected portions of a sum. The MapLevelParts command allows you to do
that (as opposed to ReplacePart that acts independently on each part.)


expr = -a^2 b^2 c^2 + 4 a^3 c^3 + 4 a^2 b^3 d - 18 a^3 b c d + 
  27 a^4 d^2

To obtain the first form:

expr // MapLevelParts[Factor, {{2, 4}}]
% // MapLevelParts[Factor, {{1, 2, 3}}]
% // MapLevelParts[Factor, {2, 2, {1, 2}}]


-a^2 b^2 c^2 + 4 a^2 b^3 d + 27 a^4 d^2 + 2 a^3 c (2 c^2 - 9 b d)
2 a^3 c (2 c^2 - 9 b d) + a^2 (-b^2 c^2 + 4 b^3 d + 27 a^2 d^2)
2 a^3 c (2 c^2 - 9 b d) + a^2 (27 a^2 d^2 + b^2 (-c^2 + 4 b d))

The last command, for example, says to use Factor on parts 1 and 2 of the
second part of the second part of the previous expression.

To obtain your second form of the expression use:

expr // MapLevelParts[Factor, {{2, 5}}]
% // MapLevelParts[Factor, {{2, 3}}]


-a^2 b^2 c^2 + 4 a^2 b^3 d - 18 a^3 b c d + a^3 (4 c^3 + 27 a d^2)
-a^2 b^2 c^2 - 2 a^2 b (-2 b^2 + 9 a c) d + a^3 (4 c^3 + 27 a d^2)

This is all what I call 'doing surgery on expressions' and doing it with
Mathematica is less error prone than doing it by hand.

The Manipulations section of Presentations has a number of convenient
routines for doing surgery: CompleteTheSquare, FactorOut, AddZero,
MultiplyByOne, LinearBreakout, PushOnto, HoldOp, CreateSubexpression,
MapLevelParts, MapLevelPatterns, EvaluateAt, EvaluateAtPattern,

David Park
djmpark at  

From: Alexei Boulbitch [mailto:Alexei.Boulbitch at] 

Dear Community,

This question seems to be an important one, if to judge by the number of
I would like to look at this problem from a little bit different

I belong to the group #3 according to AES classification cited below. And as
such, I see great 
advantages of Mathematica for me and for people like myself, as well as
lacks of some properties 
that Mathematica might, but does not have.
Therefore, it may be a constructive idea to make a list of such desired
features classified according to  
classes of Mathematica users like the ones cited below. This may help the
developers in their great and difficult 

Here I start from myself and invite you to do the same, if you would like

What I badly need are instruments that would enable one to easily bring an
expression to a desired form 
when making analytical transformations. Let me explain this in more details.
Operations like
Simplify, Apart, Factor etc. make a great job. However, when the answer is
lengthily it often helps,
if one can group terms in the answer, factorize some parts of those terms
separately from one another. 
Here it is important that transformation should go not automatically (like
it goes now when say, Simplify is applied).
What I have in mind is a complete control of the transformation applied on
different levels of the expression by the user
together with a possibility to apply simultaneously different operations on
different levels and to different 
parts of the same level.
To give an example, (just the first that that I could think of) here is a
simple algebraic expression which is grouped
and factorized in different ways:

expr = -a^2 b^2 c^2 + 4 a^3 c^3 + 4 a^2 b^3 d - 18 a^3 b c d +
     27 a^4 d^2 = 
  =a^2 (b^2 (-c^2 + 4 b d) + 27 a^2 d^2) + 2 a^3 c (2 c^2 - 9 b d) = 

   =a^3 (4 c^3 + 27 a d^2) - 2 a^2 b (-2 b^2 + 9 a c) d - a^2 b^2 c^2 

Such transformations may result in a further simplification that is not most
simple according to the Mathematica
criterion, but is most simple from the user point of view. It may also help
in understanding of relative contributions of
terms and may enable one to neglect some and thus, to further simplify the
whole expression and so on.
That is how we worked during the pre-Mathematica era, and it often brought a
success. I know people (and many of them)
who made important contributions just because they zealously rewrote and
rewrote long expressions 
many times in many different forms until they have found advantageous ones.

At present sometimes it is also possible to do so on-screen (e.g. without
going to the paper as an intermediate step),
 but (i) not in all cases, (ii) this requires 
programming which is not always evident and (iii) because of this it draws
one away from his primary subject 
to a secondary one (e.g. to programming). 

Please understand me correctly: what already exists is already great. I do
not propose to refuse of it (or of any its part).
What I would like to, is to have an additional tool, to be applied when
necessary by those who need it.

Therefore, it would be great, if in say, next Mathematica version some tools
would be introduced helping to fulfill
such tasks.

Let me also comment few words on the discussion nucleated by the
contribution of Helen Reed, to its part concerning 
advantages and dangers of Mathematica in teaching. 

As much as I understand it, it is a methodological, rather than
"ideological" problem. That is,
application of Mathematica for teaching requires a special approach. One has
to think carefully of what could and should 
be done and how, and what should not be done. Applying Mathematica for
teaching without thinking may of coarse, make harm. 

But who says that we should apply it without thinking? Development of the
methodology of class-room application of Mathematica
is non-trivial. For this reason it is important to share such a
methodological experience among those who do such work. 

I wish you all a success, Alexei    //

/From/: AES 

As a more specific definition of an expected audience, it seems to me 
(and, I think, Helen Read) that Mathematica -- or at least a more 
consistent and less perplexing form of Mathematica:

1) Could be very accessible to bright high school students, maybe with 
some hand holding; 

2)  Could be (and to some extent is) useful to average college students 
and to working BS level engineers as a helpful working tool in any 
technical or mathematically oriented area; and 

3)  Could be (and to a considerable extent is) a very, very powerful 
personal hands-on tool for graduate students, faculty, designers, 
engineers, and researchers for doing real work in a very wide range of 
fields (not just engineering, math or science).

And that's a very massive audience.

(Note that I'm writing here about people whose primary focus is on, and 
whose energies are primarily devoted to, the work they want to do -- the 
problems they want to solve -- and who do not want to convert their 
primary focus to becoming a Mathematica expert.)

Of course, there's the alternative audience of professional Mathematica 
experts, whose full time or near full time occupation is becoming expert 
at using Mathematica, with all its complexities and perplexing features.  
That's a much smaller audience.  (And to be just a little snide here, 
many of those people are essentially "programmers", who are hired as 
such by the upper levels of my audience #3 above.)

Alexei Boulbitch, Dr., habil.
Senior Scientist

ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern

Phone: +352 2454 2566
Fax:   +352 2454 3566


This e-mail may contain trade secrets or privileged, undisclosed or
otherwise confidential information. If you are not the intended recipient
and have received this e-mail in error, you are hereby notified that any
review, copying or distribution of it is strictly prohibited. Please inform
us immediately and destroy the original transmittal from your system. Thank
you for your co-operation.

  • Prev by Date: Re: The audience for Mathematica (Was: Re: Show doesn't work inside
  • Previous by thread: Re: The audience for Mathematica
  • Next by thread: Skellam distribution