Mathematica 8.0, obvious simplification omitted, why?

I apologize in advance if this is the obvious answer, I'm not a Mathematica user, but Im working on a borrowed laptop, and this is what I have at the moment. For some reason, Simplify and FullSimplify lack obvious simplifications, for example:

 Simplify[1/2 (2/5 (x - y)^2 + 2/3 z)] 

Productivity:

 1/2 (2/5 (x - y)^2 + (2 z)/3) 

For some reason, he does not get rid of the factor 1/2, try it yourself!

Of course, I can do it manually, but I have a lot more expressions with the same problem.

Am I missing something?

PS: this laptop has Mathematica 8.0

EDIT : FullSimplify works for the previous example, but not for

 FullSimplify[1/2 (2 (x - y)^2 + 2/5 (y - z)^2)] 
+4
source share
4 answers

FullSimplify works for me:

 In[693]:= Simplify[1/2 (2/5 (x - y)^2 + 2/3 z)] Out[693]= 1/2 (2/5 (x - y)^2 + (2 z)/3) In[694]:= FullSimplify[1/2 (2/5 (x - y)^2 + 2/3 z)] Out[694]= 1/5 (x - y)^2 + z/3 In[695]:= $Version Out[695]= "8.0 for Mac OS X x86 (64-bit) (October 5, 2011)" 
+4
source

I don't know why Simplify skips this case, but FullSimplify helps here:

 FullSimplify[1/2 (2/5 (x - y)^2 + 2/3 z)] 

gives:

Mathematica graphics

+3
source

Sometimes Collect may be more appropriate:

  In[1]:= Collect[1/2 (2/5 (x - y)^2 + 2/3 z), {z}] Out[1]= 1/5 (x - y)^2 + z/3 

Edit

 In[2]:= Collect[1/2 (2 (x - y)^2 + 2/5 (y - z)^2), {x - y, y - z}] Out[2]= (x - y)^2 + 1/5 (y - z)^2 

In this particular case, the Verbeia approach using Ditribute seems to be the easiest way to get what you want, however Collect[expr, list] configured for general cases by ordering a list. Mathematica has many features that can help in a variety of cases. While Simplify and FullSimplify can be a little smarter, they can do quite a lot. A good example of their different behavior, which you can find below:

enter image description here

I recommend taking a closer look at a neat demonstration of what you might expect in general: Simplifying some algebraic expressions with Mathematica .

+3
source

For your second example, Distribute works:

 Distribute[1/2 (2 (x - y)^2 + 2/5 (y - z)^2)] 

leads to

  (x - y)^2 + 1/5 (y - z)^2 

what i guess you want.

+2
source

Source: https://habr.com/ru/post/1391745/


All Articles