Question: Substract powers in a series

Hi,

 

  I tried to obtain power of a series. I have the following input

 

***

assume(c<-10);
eq1:=2*x^a*y^b*(x+y)^c+3*x^(a+1)*y^(b+1)*(x+y)^(c+1);


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


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


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

print(f1);

 ****

 

The output is

****

a b c (a + 1) (b + 1) (c + 1)
2 x y (x + y) + 3 x y (x + y)
[]
[]
Error, (in unknown) invalid input: match expects its 2nd argument, vv, to be of type {name, set(name)}, but received x+y
[]

***

 

  How to get the correct powers of x, y, and (x+y)? Since the power of x+y is negative, it cannot be absorbed into x and y.

 

Thank you!

Please Wait...