I have the following expression:
Exp[a * x + b * y + c * z]
I want to write this expression as:
Exp[a * x] * Exp[b * y] * Exp[c * z]
How can I force Mathematica to apply this change to an exponential expression?
I have the following expression:
Exp[a * x + b * y + c * z]
I want to write this expression as:
Exp[a * x] * Exp[b * y] * Exp[c * z]
How can I force Mathematica to apply this change to an exponential expression?
The desired form automatically simplifies to your original expression, i.e.,
expr = Exp[a*x]*Exp[b*y]*Exp[c*z]
(* E^(a x + b y + c z) *)
Consequently, the desired form will need to be either held or inactive.
expr2 = expr /. E^t_ :> Times @@
(HoldForm[Exp[#]] & /@ t)
expr2 // ReleaseHold
(* E^(a x + b y + c z) *)
expr3 = expr /. E^t_ :> Times @@
(HoldForm[E^#] & /@ t)
expr3 // ReleaseHold
(* E^(a x + b y + c z) *)
expr4 = expr /. E^t_ :> Times @@
(Inactive[Exp][#] & /@ t)
expr4 // Activate
(* E^(a x + b y + c z) *)
expr5 = expr /. E^t_ :> Times @@
(Inactive[Power][E, #] & /@ t)
expr5 // Activate
(* E^(a x + b y + c z) *)
expr = Exp[a*x]*Exp[b*y]*Exp[c*z] evaluates to E^(a x + b y + c z); that is its stored value. That is exactly why the desired output must be held or inactive to keep the desired form. Each subsequent expression starts with expr which is E^(a x + b y + c z)
– Bob Hanlon
Dec 05 '21 at 07:12