Ratcoeff but without mixed terms?

57 Views Asked by At

When I have a polynomial in many variables, say

p: a*x**2*y**2+b*x^2*y+c*x*y^2+d*x*y+e*x^2+5;

then Maxima's output for

ratcoeff(p,x,2);

is a*y^2+b*y+e.

However, I don't want the mixed terms, so the output should be just e. Is there a build-in function for this?

I found the assume and declare functions, but don't really understand them. declare(x,y) didn't do the trick.

0

There are 0 best solutions below