# Expression arrange by base

I have an expression with multiple powers, for example

N^α/(B*N)^β


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!

• I do not want to have the the terms sorted by powers, but rather by bases - this appears not to do what I want. Nov 22, 2019 at 14:09
• 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. Nov 22, 2019 at 14:42
• You don't see a difference in the ordering between $N^{\alpha - \beta} B^{-\beta}$ and $N^\alpha (NB)^{-\beta}$? Nov 22, 2019 at 15:21
• 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. Nov 22, 2019 at 15:32