PowerUnfold
expands all powers of products and unfolds powers of indexed arguments into products.PowerUnfold[var1, var2, …]
expands only with respect to the variables var1
, var2
, …PowerUnfold
is similar to PowerExpand
when applied to indexless expressions.PowerUnfold
is effectively the inverse of CollectScalars.Unfold power of tensors:
println PowerUnfold >> '(A_m*A^m)**3'.t
> A_{m}*A^{m}*A_{a}*A^{a}*A_{b}*A^{b}
Unfold with respect to A_m
:
println PowerUnfold['A_m'] >> '(A_m*A^m)**3*(B_m*B^m)**2'.t
> (B_m*B^m)**2*A_{m}*A^{m}*A_{a}*A^{a}*A_{b}*A^{b}
PowerUnfold
works same as PowerExpand in the case of indexless expressions:
println PowerUnfold >> '(a*b)**(1/2)'.t
> a**(1/2)*b**(1/2)