Re: Forcing Certain Algebraic Forms With FullSimplify

• To: mathgroup at smc.vnet.net
• Subject: [mg123161] Re: Forcing Certain Algebraic Forms With FullSimplify
• From: "David Park" <djmpark at comcast.net>
• Date: Fri, 25 Nov 2011 04:54:19 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <1845150.123858.1322134597179.JavaMail.root@m06>

```This is easy with the Presentations application:

<< Presentations`

a*b + g // FactorOut[a]

a (b + g/a)

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: Scott Fortmann-Roe [mailto:scottfr at gmail.com]

Hi,

I would like to have Mathematica generate an output for an equation
where a certain variable is isolated.

For instance, I have the equation "a*b+g". I would like "b" to not be
multiplied by anything in the result. Thus, I would prefer the form
"a(b+g/a)".

I have attempted to do this with FullSimplify and ComplexityFunction.
The complexity function (cf) evaluates the way I want it to, but for
some reason FullSimplify gives me the answer I don't want.

Sample code:

cf[e_] := 100 Count[e, Times[b, __], Infinity] + LeafCount[e] ;

cf[a b + g]
cf[a (b + g/a)]

FullSimplify[a b + g, ComplexityFunction -> cf]

Output:

105
9
a b + g

Any ideas?

Thank you,
Scott

```

• Prev by Date: Read images embedded in MS ACCESS 2007 File (" .accdb")
• Next by Date: Calculate an image mean withouth the "mean" command
• Previous by thread: Forcing Certain Algebraic Forms With FullSimplify
• Next by thread: Re: Forcing Certain Algebraic Forms With FullSimplify