Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Hold and Simplify

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


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


I had more luck with

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

ReplaceRepeated[Exp[a + b], rule]

which gave me Exp[a]Exp[b]


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

gave me:


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]

Thanks for your time!



  • 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