       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   u=(a+b)^2; v=(c+d)^2;
> In   uv=Expand[u+v]
> Out  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:= u=(a+b)^2; v=(c+d)^2;

In:= uv=Expand[u+v];

In:= FullSimplify[uv] // InputForm
Out= (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

```

• Prev by Date: Programming: Replace Heads
• Next by Date: Re: 3.0 = Rip Roaring Resource Hog :-(