smith_alpha

155 Reputation

6 Badges

12 years, 149 days

MaplePrimes Activity


These are replies submitted by smith_alpha

Thank you !!

Thank you !!

Thank you very much!!! This helps me a lot !!

Thank you very much!!! This helps me a lot !!

@Markiyan Hirnyk 

 

Thank you very much! It works now!

@Markiyan Hirnyk 

 

Thank you very much! It works now!

Thank you very much. It works quite well. Excuse me, I have a further question in multivariable case, say

eq1:=4*x^n*y^m+3*x^2+5*y^2;

f1:=map(t -> `if`(match(t = c*y^d, y, 's'), subs(s,c), NULL),
      convert(eq1, list));


f2:=map(t -> `if`(match(t = c*y^d, y, 's'), subs(s,d), NULL),
      convert(eq1, list));

f3:=map(t -> `if`(match(t = c*x^g*y^d, {x,y}, 's'), subs(s,c), NULL),
      convert(eq1, list));

print(f1,f2,f3);
print(f1[1],f2[1],f3[1]);


                  eq1:=   4*x^n*y^m+3*x^2+5*y^2
                     f1:=    [4 x^n, 3 x , 5]
                      f2:=     [m, 0, 2]
                          f3:=     []   
                 [4 x^n, 3 x^2 , 5], [m, 0, 2], []

Error, invalid subscript selector

 

how to simply get the coeffient "4"? Although I may try compicated approach, like op[g][1]/x^n/y^m, n and m are obtained from f2 and another function by

f4:=map(t -> `if`(match(t = c*x^d, x, 's'), subs(s,d), NULL),
      convert(eq1, list));

 

Thank you once more in advance ...

Thank you very much. It works quite well. Excuse me, I have a further question in multivariable case, say

eq1:=4*x^n*y^m+3*x^2+5*y^2;

f1:=map(t -> `if`(match(t = c*y^d, y, 's'), subs(s,c), NULL),
      convert(eq1, list));


f2:=map(t -> `if`(match(t = c*y^d, y, 's'), subs(s,d), NULL),
      convert(eq1, list));

f3:=map(t -> `if`(match(t = c*x^g*y^d, {x,y}, 's'), subs(s,c), NULL),
      convert(eq1, list));

print(f1,f2,f3);
print(f1[1],f2[1],f3[1]);


                  eq1:=   4*x^n*y^m+3*x^2+5*y^2
                     f1:=    [4 x^n, 3 x , 5]
                      f2:=     [m, 0, 2]
                          f3:=     []   
                 [4 x^n, 3 x^2 , 5], [m, 0, 2], []

Error, invalid subscript selector

 

how to simply get the coeffient "4"? Although I may try compicated approach, like op[g][1]/x^n/y^m, n and m are obtained from f2 and another function by

f4:=map(t -> `if`(match(t = c*x^d, x, 's'), subs(s,d), NULL),
      convert(eq1, list));

 

Thank you once more in advance ...

1 2 3 4 5 Page 5 of 5