3
$\begingroup$

I am pretty new to Mathematica (and programming in general). Often, I use Mathematica to check some results (mainly consisting of linear equations) and I wonder why the equations do not equal 0. Then, (sometimes after 10 minutes or so) I find out that I forgot the Simply command (again). I then put my expression into "Simplify[...]" and get 0. However, I wonder, what is the purpose of this command? Why doesn't Mathematica automatically simplify "simple" expressions? E. g. I have the following expression:

-3 a66 + 2 (-a66 + 2 (2 a66 - a77)) + 2 (2 a66 - a77) + a77 - 2 (-2 a66 + 2 (-a66 + 2 (2 a66 - a77)) + a77)

which, only when using Simplify, reduces to

-a66 + a77

I don't see why any user would prefer the former form. So the only reason I could think of is that simplifying needs a lot of computational power. While this may be the case for "difficult" expressions involving trigonometrical expressions, I can't see why this could be the case here.

My Internet search doesn't give any results on this question and it's hard to imagine no one had this question before.

Note that this is not a rant but I genuinely wonder what the reasoning behind this is.

$\endgroup$

closed as primarily opinion-based by yohbs, Szabolcs, Artes, m_goldberg, garej Jun 12 '17 at 20:55

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ The short answer is just what you said: simplifying can cost extra computational power, so you need to tell Mathematica to do it explicitly. The longer answer is that there is a basic difference between evaluation of expressions and manipulation of mathematical formulae. In the end, Mathematica is a programming language: if you want it to do mathematics, you need to use the functions that tell it to do mathematics. $\endgroup$ – Sjoerd Smit Jun 12 '17 at 13:47
  • 1
    $\begingroup$ There is Refine, Simplify, FullSimplify, TrigReduce, TensorReduce, Reduce, PossibleZeroQ. This question is not well posed, after all. I find it a duplicate of What is the difference between a few simplification techniques? $\endgroup$ – Artes Jun 12 '17 at 13:47
  • 4
    $\begingroup$ It does auto-simplify in the most trivial cases, and you will find many complaints on this site about this. There is often value of keeping an expression in a certain form. In non-trivial cases simplification takes a long time (because it is neither a straightforward, nor a well defined task). Finally, you forgot that Mathematica is a programming language, not a machine that answers questions (for that see Wolfram|Alpha). Doing too much automatically is counterproductive when programming specific tasks $\endgroup$ – Szabolcs Jun 12 '17 at 13:48
  • 1
    $\begingroup$ Possible duplicate of What is the difference between a few simplification techniques? $\endgroup$ – Artes Jun 12 '17 at 13:51
  • $\begingroup$ Thank you for your answers. I am really sorry; I did not know about the many simplification commands. I also did not thought that Mathematica is a programming language - to me, it was presented as a powerful computing tool. However, as at least I find it quite annoying, do you know if there is a trick which tells something like "in this notebook, try for every computation for 1 second if you can simplify it (in the way the Simplify command would do), if it can be simplified, return the simplified expression, if not, do what you usually would do"? $\endgroup$ – user49466 Jun 13 '17 at 10:07
0
$\begingroup$

I wonder, what is the purpose of this command?

It is easier to understand the meaning of equation when it is in simplest form. In your case, the un-simplified equation is hard to read for user who wants to determine if it is quadratic,linear or nonlinear by quick glance. The simplified one tells you quickly what it is.

Why doesn't Mathematica automatically simplify "simple" expressions?

Sometimes over simplification destroys the power form expression which is easier to read than expanded form which Simplify always does. Example (x-10+y)^10 is easier to read than x^10 + .......etc and all other terms.

$\endgroup$
  • $\begingroup$ I am sorry, but I don't understand your last command. My Mathematica (Version 8) does not expand your expression (x-10+y)^10 if I use Simplify. Is this what you mean? $\endgroup$ – user49466 Jun 13 '17 at 10:01
  • $\begingroup$ It does expands it first and then simplifies it. Something user wants to keep equation in original form with a very little modification. For example, if you have (x-10+y)^10+(x-10)^+10(10+y)^10+(x+y)^3 $\endgroup$ – Aschoolar Jun 13 '17 at 13:49
  • $\begingroup$ When I type in Mathematica Simplify[(x - 10 + y)^10 + (x - 10)^+10 (10 + y)^10 + (x + y)^3], I get (-10 + x)^10 (10 + y)^10 + (-10 + x + y)^10 + (x + y)^3 as output. I am sorry but I don't understand your comment. $\endgroup$ – user49466 Jun 14 '17 at 12:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.