I have an expression with multiple powers, for example


Any simplification like FullSimplify leads to

$$ N^\alpha (NB)^{-\beta}$$

How do I separate the different bases? I want to have the expression organized like

$$ N^{\alpha - \beta} B^{-\beta} $$

and in a more complicated expression with many different bases, I want them all separated. None of the functions described here is suitable for this.


Try this:

expr = n^a/(n*b)^c;
expr // PowerExpand

(*  b^-c n^(a - c)   *)

Do not use the capital N since in Mma it is a service word.

Have fun!

| improve this answer | |
  • $\begingroup$ I do not want to have the the terms sorted by powers, but rather by bases - this appears not to do what I want. $\endgroup$ – FooBar Nov 22 '19 at 14:09
  • $\begingroup$ I do not see any difference between the result and the form you wish up to Mma internal ordering. The latter is out of reach, unless you use the functions of the Hold group. $\endgroup$ – Alexei Boulbitch Nov 22 '19 at 14:42
  • $\begingroup$ You don't see a difference in the ordering between $N^{\alpha - \beta} B^{-\beta}$ and $N^\alpha (NB)^{-\beta}$? $\endgroup$ – FooBar Nov 22 '19 at 15:21
  • 1
    $\begingroup$ No, I do not see the difference between b^-c n^(a - c) that I obtained and n^(a - c) b^-c that you wish. $\endgroup$ – Alexei Boulbitch Nov 22 '19 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.