Pascal4QM

458 Reputation

12 Badges

6 years, 19 days

MaplePrimes Activity


These are replies submitted by Pascal4QM

@vv The difficulty is that, in eq1, there is both x*y and y*x. To isolate x, one need to have only term like x*y (or equivalently only term like y*x), but not both. So there is no many choice, one need to permute one of those guys. This is a common task performed in non-commutative algebra. The price to pay is that a commutator will appear.

To my knowledge, “solve” is not documented in Physics. Here, I think “solve” should have outputted an error message to not introduce an incorrect result.

 

CoeffTest.mw

with(PDEtools):

(diff(g(z), x))*g(z)^3+(diff(g(z), z, z))*g(z)^4+(diff(g(z), z, z, z))*g(z)^5+(diff(g(z), z))/g(z)^2

(diff(diff(g(z), z), z))*g(z)^4+(diff(diff(diff(g(z), z), z), z))*g(z)^5+(diff(g(z), z))/g(z)^2

(1)

CoeffTest := proc (ee, n) options operator, arrow; select(has, ee, g(z)^n)/g(z)^n end proc

proc (ee, n) options operator, arrow; select(has, ee, g(z)^n)/g(z)^n end proc

(2)

CoeffTest((diff(diff(g(z), z), z))*g(z)^4+(diff(diff(diff(g(z), z), z), z))*g(z)^5+(diff(g(z), z))/g(z)^2, -2)

diff(g(z), z)

(3)

CoeffTest((diff(diff(g(z), z), z))*g(z)^4+(diff(diff(diff(g(z), z), z), z))*g(z)^5+(diff(g(z), z))/g(z)^2, 4)

diff(diff(g(z), z), z)

(4)

CoeffTest((diff(diff(g(z), z), z))*g(z)^4+(diff(diff(diff(g(z), z), z), z))*g(z)^5+(diff(g(z), z))/g(z)^2, 5)

diff(diff(diff(g(z), z), z), z)

(5)

CoeffTest((diff(diff(g(z), z), z))*g(z)^4+(diff(diff(diff(g(z), z), z), z))*g(z)^5+(diff(g(z), z))/g(z)^2, 3)

0

(6)

``


Download CoeffTest.mw

@mskalsi A more elegant solution could be:

CoeffTest := proc (ee, n) options operator, arrow; select(has, ee, g(z)^n)/g(z)^n end proc

 

 

 

 

@Markiyan Hirnyk There is an ambiguity in the example given by Entvex. X and B could either be vectors or a matrices. Anyway in both cases, the product A*X cannot be commuted. For instance, if X is a vector, X*A has no meaning. So the result is the same, X and B are non-commutative objects in all cases.

@Markiyan Hirnyk Yes, both X and B are treated as noncommutative operators.

1 2 3 4 Page 4 of 4