Re: simplify problem
- To: mathgroup at smc.vnet.net
- Subject: [mg5166] Re: simplify problem
- From: danl (Daniel Lichtblau)
- Date: Wed, 6 Nov 1996 01:34:29 -0500
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
In article <55dkc8$22v at dragonfly.wolfram.com> Tomasz Bieruta <bieruta at chemie.uni-halle.de> writes: > I have following problem: > > In[1] u=(a+b)^2; v=(c+d)^2; > In[2] uv=Expand[u+v] > Out[2] a^2+2ab+b^2+c^2+2cd+d^2 > > How can I revers the above Operation, in this example from > > a^2+2ab+b^2+c^2+2cd+d^2 > > I want to have (a+b)^2 + (c+d)^2. > Can someone help me, please ? > > Tomasz B. > > ---- > e-mail: bieruta at chemie.uni-halle.de > > In version 3.0 one can do this as follows: In[30]:= u=(a+b)^2; v=(c+d)^2; In[31]:= uv=Expand[u+v]; In[32]:= FullSimplify[uv] // InputForm Out[32]= (a + b)^2 + (c + d)^2 Simplify alone is not quite up to the task, though it will factor one pair. Be aware that FullSimplify can be quite expensive re speed. Daniel Lichtblau Wolfram Research, Inc. danl at wolfram.com