# Simplifying an expression by multiplication of terms

I have an expression $e^{x-a}(e^{bx}+c)$. I just want it multiplied throughout to get $e^{(b+1)x-a}+ce^{x-a}$. To achieve this I have tried Expand, Simplify, Collect (using pattern Exp[q_*x]). The best output I could get is

Expand[Exp[x-a]*(Exp[b*x]+c)]
(* Exp[-a+x+b*x]+c*Exp[-a+x] *)


I have tried Evaluate after this step to obtain proper exponent, but to no avail. How do I make it come with $e^{(b+1)x-a}$ in the first term?

Make a rule:

Expand[Exp[x - a]*(Exp[b*x] + c)] /. Exp[a_] :> Exp[Collect[a, x]]


MapAt with specified position:

tmp = Exp[x - a] (Exp[b x] + c) // Expand;
pos = Position[tmp, p_Plus /; ! FreeQ[p, x]];
MapAt[Collect[#, x] &, tmp, pos]


c E^(-a + x) + E^(-a + (1 + b) x)

• +1 Thanks a lot. It is nice to be aware of different ways of approaching a problem.
– Deep
Nov 28, 2016 at 4:48