It seems Mathematica likes to factor some things in less than optimal ways. For example, for the oscillating exponential function (F) below, is there any way to force it to reduce both the number of exponential terms and appearance of constants like A? I can of course look at the result and manually rewrite it as function G, but this gets trickier for more complex equations.
F = A E^(-I t (\[Omega] + Subscript[\[Omega], 12])) (-1 + E^(I t (\[Omega] + Subscript[\[Omega], 12])))
Expand[F]
G = A*(1 - E^(-I t (\[Omega] + Subscript[\[Omega], 12])) )
Simplify[F == G]
Factor[Expand[F]]
Collect
instead ofFactor
does the factoring that you want. For instance,Collect[F, A, Simplify]
does things nicely. $\endgroup$Factor
's intended use is to factor in P[ℤ], it's certainly not the right function to use. @march, your answer is entirely correct. Would you like writing an answer? $\endgroup$