I have been working with non-commuting algebra, which is indicated in Mathematica by **
. However, I want to suppress the **
from the output. Consider:
n = 4;
Sum[Binomial[n, r] b^r ** a^(n - r), {r, 0, n}]
which gives
1 ** a^4 + 4 b ** a^3 + 6 b^2 ** a^2 + 4 b^3 ** a + b^4 ** 1
Note that all b's appear to the left of any a's. This is since they do not commute. Instead of the output above, I want to drop the **
to instead have:
a^4 + 4 b a^3 + 6 b^2 a^2 + 4 b^3 a + b^4
since it is better suited when n
becomes large.