How can I simplify
trivial expressions under the
Here is one example:
The expected output:
z2p^-ϵ (1 - z3)^-ϵ
Currently I am trying to look at the
FullForm and decide the rule like below:
(z2p-z2p z3)^-ϵ /. Plus[x_,Times[-1,x_,y_]] -> x(1-y) //PowerExpand
However, how can I extend it to a general case where there could be multiple terms connected with
+-? Or is there a better way to handle?
In a general scenario one would have factors multiplied with these kind of terms.
expr= ((1 - z2p)^-e (1 - z3)^-e z3^-e (z2p - z2p z3)^-e)/ ( z2p (-1 + z3)^2 (1 - z2p + z2p z3))
Basically how should one proceed to simplify/Factor out these terms?
(-z2p)^-ϵ (z3 - 1)^-ϵis an equally valid output. What criterion should be used to decide between the two? $\endgroup$
Reals). Even Mathematica loves to write
2 (1 - x) y // Simplifyas
-2 (-1 + x) y(probably it takes less strings/internal operations to write second one? ). I personally dont like this output but this hurts less than the examples in this question. It is really annoying that it can not do the simplification/Factor. I expected
PowerExpandwould have factor out everything using
Assumptionsbut not. $\endgroup$