Re: Forcing Certain Algebraic Forms With FullSimplify

• To: mathgroup at smc.vnet.net
• Subject: [mg123211] Re: Forcing Certain Algebraic Forms With FullSimplify
• From: Scott Fortmann-Roe <scottfr at gmail.com>
• Date: Sat, 26 Nov 2011 05:09:52 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <7BB0E96E72E84E41B24A1FF8ED13F5E61568A749E0@IE2RD2XVS581.red002.local>

```Thank you David and Alexei, for the suggestion, I think I will probably
purchase the presentations package as I have heard a lot of good things

However, I am looking for a bit more general solution. With the FactorOut
solution, I will need to analyze my equations to determine the
transformations. However, I would like something that takes any arbitrary
equation and isolates the "b" from multiplication without any extra
analysis on my part.

It seems like the FullSimplify/ComplexityFunction I presented should do
that, but it doesn't. Are there any tricks or Gotchas you know of that I am
missing in my ComplexityFunction that would make it work correct.

-Scott

On Fri, Nov 25, 2011 at 1:42 AM, Alexei Boulbitch
<Alexei.Boulbitch at iee.lu>wrote:

> Hi, Scott,****
>
> There is a package =93Presentations=94 of David Park that enables one doing
> such things. There are several ways doing with the presentations of what
> you need. For example:****
>
> ** **
>
> Needs["Presentations`Manipulations`"];****
>
> a b + g // FactorOut[a]****
>
> ** **
>
> a (b + g/a)****
>
> ** **
>
> Alexei ****
>
> ** **
>
> ** **
>
> 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****
>
> ** **
>
> *Alexei BOULBITCH**, Dr., habil.*****
>
> IEE S.A.****
>
> ZAE Weiergewan,****
>
> 11, rue Edmond Reuter,****
>
> L-5326 Contern, LUXEMBOURG****
>
> ** **
>
> Office phone :  +352-2454-2566****
>
> Office fax:       +352-2454-3566****
>
> mobile phone:  +49 151 52 40 66 44****
>
> ** **
>
> e-mail: alexei.boulbitch at iee.lu****
>
> ** **
>
> ** **
>

```

• Prev by Date: Re: Matrices as operators
• Next by Date: Re: FindShortestTour Function- Error
• Previous by thread: Re: Forcing Certain Algebraic Forms With FullSimplify
• Next by thread: Contour lines in middle of contour sectors