Is there a function similar to PowerExpand which expand exponentials? This would, for example, take

Exp[5(a + b)] 

and return

  • $\begingroup$ Exp[5 a + 6 b] /. Exp[Plus[a_, b_]] :> CenterDot @@ {Exp[a], Exp[b]}, which outputs $e^{5 a}\cdot e^{6 b}$, is one simple way to go. Making it correctly work in all cases might take some tinkering, but it's a step in the right direction. $\endgroup$ – DumpsterDoofus Sep 27 '14 at 3:15
  • 1
    $\begingroup$ Besides given answers take a look at What's the correct method to simplify exponentials? $\endgroup$ – Artes Sep 27 '14 at 4:14

The desired representation will automatically simplify when evaluated

Exp[5 a]*Exp[5 b]

enter image description here

To get and maintain the desired factored form requires any of several methods of holding the evaluation. As suggested by DumpsterDoofus, one approach is to use an unassigned operator. A slightly modified version of this approach:

expr = Exp[5 (a + b)];

f = CenterDot @@ (Exp /@ List @@
       (Log[#] // PowerExpand // Expand)) &;

invf = # /. CenterDot -> Times &;

expr2 = expr // f

enter image description here

Using the inverse

expr2 // invf

enter image description here

% // Simplify

enter image description here


This could also be a case where the version-10 command Inactive may be useful. Before inserting an inactive version of Exp, I also split up exponents consisting of sums by temporarily replacing powers of E with a function exp that only implements the desired multiplicative property. To cast these replacements in the form of a function expExpand, we have to make sure the expression expr provided as its argument is not touched in any way. That's what the HoldAllComplete attribute is for:

ClearAll[expExpand, exp];
exp[x_Plus] := Times @@ exp /@ x

SetAttributes[expExpand, HoldAllComplete];

expExpand[expr_] := 
 ReleaseHold[Hold[expr] /. E^x_ :> exp[x]] /. exp -> Inactive[Exp]

expExpand[1/2 (E^(5 a) E^(7 b + 8 c + z)) + 1/(1 + E^(4 a))]


The expression is now displayed in the desired form, with the inactive Exp in a different color. You can then do Activate to get the expression to be returned to its canonical form if desired.

  • $\begingroup$ It works for my project. Thanks. $\endgroup$ – hlren Jul 21 '20 at 16:42

Times is converted internally to power because Times is not a canonical form. I would also suggest the following:

r=Dot @@ Exp /@ Level[(Exp[5 (a + b + c)] // ExpandAll), {2}]
(*E^(5 a).E^(5 b).E^(5 c)*)

if you want to bring back the result,then:

Times @@ r
(*E^(5 a + 5 b + 5 c)*)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.