0
$\begingroup$

I would expect the following:

FullSimplify[(a*b)^i, a > 0 && b > 0 && i > 0]

to give me a^i * b^i as output. Much like (a*b)^2 is immediately reduced to a^2 * b^2. How can I achieve this?

$\endgroup$
  • $\begingroup$ Generally speaking LeafCount[(a b)^i] < LeafCount[a^i b^i], so it would require some special simplification rule for Simplify to give you what you want. As I understand it, the (a b)^2 case is not being simplified, but simply processed that way by the parser before evaluation. $\endgroup$ – MarcoB Apr 4 at 17:46
  • $\begingroup$ Distribute[(a*b)^i,Times, Power] $\endgroup$ – chuy Apr 4 at 17:47
2
$\begingroup$

As mentioned in the comments, the default ComplexityFunction considers a^i b^i to be more complex than (a b)^i, hence your desired form will not be returned.

Besides using PowerExpand, you could also use a ComplexityFunction that penalizes complex expressions in the base of Power objects:

cf[expr_] := LeafCount[expr] + Total @ Cases[expr, Power[a_, _] :> 10 LeafCount[a], All]
FullSimplify[
    (a b)^i,
    a>0 && b>0 && i>0,
    ComplexityFunction -> cf
]

a^i b^i

$\endgroup$
2
$\begingroup$
(a*b)^i // PowerExpand

a^i b^i

As @MarcoB points out, there are many assumptions here, detailed in the documentation: in this case, it is assumed that i is an integer and a and b are positive real numbers.

$\endgroup$
  • $\begingroup$ ... with the usual caveat that PowerExpand makes some assumptions (real values of variables), which happen to be upheld in this particular case. $\endgroup$ – MarcoB Apr 4 at 17:44

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.