One of the interesting things about the Physics package is that it was designed from scratch to extend the domain of operations of the Maple system from commutative variables to one that includes commutative, anticommutative and nonocommutative variables, as well as abstract vectors and related (nabla) differential operators. In this line we have, among others, the following Physics commands working with this extended domain: `*` , `.` , `^` , diff , Expand , Normal , Simplify , Gtaylor , and Coefficients .
More recently, Pascal Szriftgiser (from Laboratoire PhLAM, Université Lille 1, France), suggested a similar approach to factorize expressions involving noncommutative variables. This is a pretty complicated problem though. Pascal's suggestion, however, spinned around an idea beautiful for its simplicity, similar to what is done in the experimental Physics command, PerformOnAnticommutativeSystem , that is, to transform the problem into one that can be treated with the command that works only with commutative variables and from there extract the result for noncommutative ones.The approach has limitations but it is surprising how far one can go using imaginative algebraic manipulations to extend these commands that otherwise only work with commutative variables.
In brief, we now have a new command, Physics:Factor, with already powerful performance for factorizing algebraic expressions that involve commutative, noncommutative and anticommutative variables, making Maple's mathematical capabilities more advanced in very interesting directions. This command is in fact useful not just in advanced theoretical physics, but for instance also when working with noncommutative symbols representing abstract matrices (that can have dependency, and so they can be differentiated before saying anything about their components, multiplied, and be present int expressions that in turn can be expanded, simplified and now also factorized), and also useful with expressions that include differential operators, now that within Physics you can compute with the the covariant and noncovariant derivatives D_ and d_ algebraically. For instance, how about solving differential equations using Physics:Factor (reducing their order by means of factoring the involved differential operators) ? :)
What follows are some basic algebraic examples illustrating the novelty, and as usual to reproduce the results in this worksheet you need to update your Physics library with the one available in the Maplesoft R&D Physics webpage.
> 


(1) 
> 


(2) 
First example, because of using mathematical notation, noncommutative variables are displayed in different color (olive)
> 


(3) 
> 


(4) 
A more involved example from a physics problem, illustrating that the factorization is also happening within function's arguments, as well as that we can also correctly expand mathematical expressions involving noncommutative variables
> 


(5) 
> 


(6) 
So first expand ...
> 


(7) 
Now retrieve the original expression by recursing over the arguments and so factoring the integrand
> 


(8) 
This following one looks simpler but it is actually more complicated:
> 


(9) 
> 


(10) 
The complication consists of the fact that the standard factor command, that assumes products are commutative, can never deal with factors like because if products were commutative these factors are equal to 0. Of course we not just us factor but include a number of algebraic manipulations before using it, so that the approach handles these cases nicely anyway
> 


(11) 
This other one is more complicated:
> 


(12) 
When you expand,
> 


(13) 
you see that there are various terms involving the same noncommutative operands, just multiplied in different order. Generally speaking the limitation (n this moment) of the approach is: "there cannot be more than 2 terms in the expanded form containing the same operands" . For instance in (13) the 1st and 4th terms have the same operands, that are actually also present in the 5th term but there you also have and for that reason (involving some additional manipulations) it can be handled:
> 


(14) 
Recalling, in all these examples, the task is actually accomplished by the standard factor command, and the manipulations consist of ingeniously rewriting the given problem as one that involves only commutative variables, and from extract the correct result for non commutative variables.
To conclude, here is an example where the approach implemented does not work (yet) because of the limitation mentioned in the previous paragraph:
> 


(15) 
> 


(16) 
In this expression, the 1st, 2nd, 4th and 5th terms have the same operands and then there are four terms containing the operands . We do have an idea of how this could be done too ... :) To be there in one of the next Physics updates.
> 

