70 Reputation

5 Badges

5 years, 125 days

MaplePrimes Activity

These are replies submitted by shzan

@vv Yes, exactly that's what I wanted. Thank you so much. Now, I have my own normal form for polynomials :)

@vv thank you but this is not exactly what I was looking for. We need to sort and for that we need to define an order, by u[i]=v[i], I mean that the order is same, eg, u[3] has the same order as v[3] which is demonstrated in my example above that is either of them can come first.

I have a list of variables 

L1:=[d, u[1], u[3], u[5], u[7], v[1], v[3], v[5], v[6], v[7], v[9]]

Idea is to do the same thing what are you doing but

sort(f, order=plex(v[9],u[7],v[7],v[6],v[5],u[5],v[3],u[3],u[1],v[1],d) );

But this list of variables changes every time depending on the polynomial. Basically I am looking for a way to obtain this list from L1


I hope its clear. Thanks

@John Fredsted Thank you John, Later I also realised the same.

@Carl Love Thanks again for your awesome answer. Your code is working perfectly fine with the same proc function_coeffs but mine is still not working. Thats frustating :(. I still couldn't figure out what's going wrong.

@Kitonum Thank you and everyone for this overwhelming respone. I think I can work on my problem now. Thnaks again :)

@Kitonum I have alread tried all those commands but could not come to a slotuion to how to add linearly independent rows. Thanks again!


@Kitonum Thanks for your reply. But this is not what I am asking. I just gave an example. I am looking how to add linearly independednt rows to a matrix.

@ecterrab Thank you so much! Evertyhting is in order now :)

@ecterrab Thanks you so much for your answer. Everything seems to work fine but there is one more thing I need for my program. Indeterminants should include u and v as well, as indicated in my original question. I was trying something else. Please take a look below:

J_gen:=a[1](x) v u + a[2](x) v D(u) - (D(a[2](x)) v + a[2](x) D(v)) u;
a[1](x) v u + a[2](x) v D(u) - (D(a[2](x)) v + a[2](x) D(v)) u


{u, v, x, D(u), D(v), D(a[2](x)), a[1](x), a[2](x)}

X1:=select(has, X, {u, v});

{u, v, D(u), D(v)}

coeffs(J_gen, X1);

Error, (in MTM:-coeffs) invalid arguments to coeffs

Can you please let me know if I can improvise this somehow. Thnaks again :)


@Christian Wolinski Thanks for your reply. I tried your solution it worked in some cases but I think it fails whenever I have derviavtive in coefficients. For example for the below expression


I get this error message: 

Error, (in MTM:-coeffs) invalid arguments to coeffs

Can you please take a look again and help me out. 

Thnaks again :)

@ecterrab Thnaks for your reply but it didn't work. 

@ecterrab Thank you :)

@Markiyan Hirnyk Thanks again!

@Markiyan Hirnyk Could you please tell me how can I extract the order for such a differntial operator. For example, for the operator in above example it should give 2.

@Carl Love Thank you so much for your help.


1 2 Page 1 of 2