AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Wolframalpha subscript12/21/2023 ![]() I should add that I have not in any sense fully tested the above code. For this you would need to modify the rule marked ( !!!) to account for such commutators. Whenever j > i, then you could canonicalize, say by putting a before a in all expressions. In general if you have commutator rules such as ncTimes,a] = ncTimes,a]+(j-i)*a commutator, y_] / x =!= y || !VariableQ := 0 For example, we already have (implicitly) applied this one in formulating the rules above. Out= ncTimes^2, a, b, b, c, c, c]Īn advantage to this seemingly laborious method is you can readily define commutators. NonCommutativeMultiply := ncTimesĪ ** b ** a ** b ** a ** c ** c ** c I'll use your input form only slightly modified, so we'll convert ** expressions to use ncTimes instead. I am not taking this nearly as far as one might go, and am only defining scalars to be fairly obvious "non-variables". We will classify certain "basic" entities as scalars or variables, the latter being the things that have commutation restrictions. Also I will use a instead of Subscript for ease of ascii notation and cut-paste of Mathematica input/output. I first mention (again) that I'm going to define and work with my own noncommutative operator, to avoid pattern matching headaches from built-in NonCommutativeMultiply. How to expand the arithematics of differential operators in mathematica I cited a library notebook the other day for a related question. That is, commute variables with different subscripts while preserving the non-communicative nature of variables with the same subscripts. I need to at least order expressions like above in the following way: a_-4 ** a_-4 ** b_-4 ** c_-4 ** b_1 ** a_1 ** c_1 ** c_5, The second thing (I would like) to do is to combine like terms once the order is correct. ![]() The most important thing I need is to order the terms in the expression by subscripts while preserving the rules about what commutes and what does not. I need a way to simplify the expression and combine like terms (if possible) the output should be something like: (a_-4)^2 ** b_-4 ** c_-4 ** b_1 ** a_1 ** c_1 ** c_5 * variables with different subscripts do commute. * Variables with the same subscript to don't commute, in mathematica its easy to do that with help of Subscripts but there is no Subscript in matlab to do that. i think its possible to write these codes as two for-loops in matlab. I would like to simplify this expression. i have some mathematica codes that i want to change them to matlab codes. Using Subscript in Mathematica 7.0+, I have expressions of the following form: a_-4 ** b_1 ** a_-4 ** b_-4 ** a_1 ** c_-4 ** c_1 ** c_5
0 Comments
Read More
Leave a Reply. |