       Hold and Simplify

• To: mathgroup at smc.vnet.net
• Subject: [mg77143] Hold and Simplify
• From: "news.inode.at" <paul.g.schneider at google.com>
• Date: Tue, 5 Jun 2007 06:25:56 -0400 (EDT)

```
Hi,

I would like to change Exponential functions of sums to products of

exponential functions. From reading postings from the year 2004 I tried

the following:

f[Exp[x_ + y_]] := Exp[x + y] /. Exp[a_ + b_] :> HoldForm[Exp[x]*Exp[y]];

Simplify[Exp[a + b], TransformationFunctions -> f]

Unfortunately this gave me

Exp[a+b]

rule = {Exp[a_ + b_] -> f[Exp[a + b]]}

ReplaceRepeated[Exp[a + b], rule]

which gave me Exp[a]Exp[b]

Trying

ReplaceRepeated[Exp[a + b + c], rule]

gave me:

Exp[a]Exp[b+c]

Why doesn't the TransformationFunction trick work? Why does

ReplacedRepeated stop?

My ultimate goal would be the following: (I need to transfer large

formulae into C code and would like to avoid use of exponential function

as much as possible)

myreplacelist={Exp[var1]->expvar1, Exp[var2]->expvar2}

myformula=Exp[2 var1 - 3 var2 + a * Exp[var1]];

ultimate rule applied to my formula gives:

expvar1 * expvar1 / (expvar2 * expvar2 * expvar2) * Exp[a expvar1]

best,

Paul

```

• Prev by Date: Best practice for Mathematica package development
• Next by Date: Re: Fun with zero sums
• Previous by thread: Re: Best practice for Mathematica package development
• Next by thread: Re: Hold and Simplify