Physics[Factor] - factor expressions involving noncommutative variables
Calling Sequence
Factor(expr)
Parameters
expr
-
any algebraic expression, possibly involving noncommutative variables
Description
The Factor command generalizes the standard factor command in that it can factorize expressions involving noncommutative variables. Factor complements the set of Physics commands for handling expressions with noncommutative operands, `*`, `.`, `^`, diff, Expand, Normal, Simplify, Gtaylor, and Coefficients.
The approach used is similar to the one used in the other commands of this kind, (see for instance the experimental Physics command, PerformOnAnticommutativeSystem), that is, to transform the problem into one that can be treated with the commands that work only with commutative variables, and from there extract the result for expressions involving noncommutative variables. This approach has limitations (see the Examples) but the class of problems that can be handled is well defined and the cases covered are relevant.
Note: For the conventions adopted to represent noncommutative and anticommutative objects, see Setup and the types anticommutative and noncommutative.
Examples
with⁡Physics:
Set some quantum operators for developing examples
Setup⁡quantumoperators=a,b,c,d,e,mathematicalnotation=true
mathematicalnotation=true,quantumoperators=a,b,c,d,e
First example, because of using mathematical notation, noncommutative variables are displayed in different color (olive)
α2⁢a2+α⁢sqrt⁡2⁢a⁢b+4⁢sqrt⁡2⁢λ⁢b2⁢c+4⁢λ⁢α⁢b⁢c⁢a+4⁢λ⁢sqrt⁡2⁢b⁢c⁢b+16⁢λ2⁢b⁢c2+4⁢α⁢λ⁢a⁢b⁢c+sqrt⁡2⁢α⁢b⁢a+2⁢b2
α2⁢a2+2⁢α⁢a⁢b+4⁢2⁢λ⁢b2⁢c+4⁢λ⁢α⁢b⁢c⁢a+4⁢2⁢λ⁢b⁢c⁢b+16⁢λ2⁢b⁢c2+4⁢α⁢λ⁢a⁢b⁢c+2⁢α⁢b⁢a+2⁢b2
Factor⁡
4⁢λ⁢b⁢c+α⁢a+2⁢b2
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
PDEtools:-declare⁡a,b,c,g⁡x,y
a⁡x,y⁢will now be displayed as⁢a
b⁡x,y⁢will now be displayed as⁢b
c⁡x,y⁢will now be displayed as⁢c
g⁡x,y⁢will now be displayed as⁢g
Intc⁡4⁢Dagger⁡b⁡x,y⁢c⁡x,y⁢λ+α⁢f⁡t⁢a⁡x,y⁢Dagger⁡a⁡x,y+sqrt⁡2⁢g⁡x,y⁢b⁡x,y2,x,y
∫−∞∞∫−∞∞4⁢λ⁢b†⁢c+α⁢f⁡t⁢a⁢a†+2⁢g⁢b2ⅆxⅆy
First expand to construct the problem
expand⁡
∫−∞∞∫−∞∞16⁢λ2⁢b†⁢c⁢b†⁢c+4⁢λ⁢α⁢f⁡t⁢b†⁢c⁢a⁢a†+4⁢2⁢λ⁢g⁢b†⁢c⁢b+4⁢α⁢f⁡t⁢λ⁢a⁢a†⁢b†⁢c+α2⁢f⁡t2⁢a⁢a†⁢a⁢a†+2⁢α⁢f⁡t⁢g⁢a⁢a†⁢b+4⁢2⁢g⁢λ⁢b⁢b†⁢c+2⁢g⁢α⁢f⁡t⁢b⁢a⁢a†+2⁢g2⁢b2ⅆxⅆy
Now retrieve the original expression
This following one looks simpler but it is actually more complicated:
Commutator⁡a,b⁢c
a,b−⁢c
First expand
a⁢b⁢c−b⁢a⁢c
The complication consists of the fact that the standard factor command, which assumes products are commutative, can never deal with an expression like Commutator⁡a,b=a b−b a because if products were commutative the sum of these terms is equal to 0. Through algebraic manipulations, however, the expression is also factorable
a⁢b−b⁢a⁢c
This other one is yet more complicated:
a⁢b−b⁢a⁢a+β⁢b+c2
a⁢b−b⁢a⁢β⁢b+c2+a
When you expand,
a⁢b⁢a+β⁢a⁢b2+a⁢b⁢c2−b⁢a2−β⁢b⁢a⁢b−b⁢a⁢c2
there are various terms involving the same noncommutative operands, just multiplied in different order. Generally speaking the limitation of this approach (in Maple 2016) consists of: there cannot be more than 2 terms in the expanded form containing the same operands. For instance in the expression above the 1st and 4th terms have the same operands, that are actually also present in the 5th term but there you also have beta and for that reason (involving some additional manipulations) it can still be factorized:
Here is an example where the approach implemented does not work (in Maple 2016) because of the limitation mentioned in the previous paragraph:
Commutator⁡a,b+c2
a,b−+c2
a⁢b⁢a⁢b−a⁢b2⁢a+a⁢b⁢c−b⁢a2⁢b+b⁢a⁢b⁢a−b⁢a⁢c+c⁢a⁢b−c⁢b⁢a+c2
In this expression, the 1st, 2nd, 4th and 5th terms have the same operands a,b,a,b and then there are four terms containing the operands a,b,c. This type of expression is actually also factorable - work in progress.
See Also
Commutator, diff, Expand, factor, Gtaylor, Intc, Normal, PerformOnAnticommutativeSystem, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics[*], Physics[^], Setup, Simplify
Compatibility
The Physics[Factor] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
Download Help Document