I have an expr. with the form of
Exp[a1*t]*b1+Exp[a1*t]*b2+....+Exp[a1*t]*bn,
a1 and bi are all symbols,not number
I want it in the following form:
Exp[a1*t]*(b1+b2+...+bn).
What should I do? Here Simplify doesn’t work
I have an expr. with the form of
Exp[a1*t]*b1+Exp[a1*t]*b2+....+Exp[a1*t]*bn,
a1 and bi are all symbols,not number
I want it in the following form:
Exp[a1*t]*(b1+b2+...+bn).
What should I do? Here Simplify doesn’t work
Perhaps Factor can help:
In[3]:= Factor[E^(a1 t) b1 + E^(a1 t) b2 + E^(a1 t) b3]
Out[3]= (b1 + b2 + b3) E^(a1 t)
Thanks~actually the problem is a little bit more complicated, here is the original expression:
E^(-k22 t) ((0.5 b2 bb1^2 (-1 + E^(-k22 t)))/k22 - ( 0.5 b2 c1^2 (-1 + E^(k22 t)))/k22 - ( 0.5 a1^2 b2 (-1 + E^((k22 - 2 k33) t)))/(k22 - 2 k33) -...
Expand it and we get:
-((0.5 b2 c1^2)/k22) + (0.5 b2 bb1^2 E^(-2 k22 t))/k22 - ( 0.5 b2 bb1^2 E^(-k22 t))/k22 + (0.5 b2 c1^2 E^(-k22 t))/k22 + ( 0.5 a1^2 b2 E^(-k22 t))/(k22 - 2 k33) - ...
the items of the sum are all of the form:
b E^[a t] t^n
where a,b can be very complicated,
I want to put those items with the same a and n together, i.e, to simplify the expression to make sure that
E^[a t]*t^n*(b1+b2+..)
only appear once in the sum, put the coefficients together in the bracket. Is this possible?
Hi,
Here is my suggestion. Get all of E^(a t) using Cases. Then use Collect with var = (List of E^(a t)) (see Mathematica help for details). You will need further processing to factor out the factors t^n.
Youngjoo Chung
Thanks for your suggestion, Collect works on patterns can solve this problem perfectly~