# Revision history [back]

### Equating coefficients of multivariate polynomials

Here is a simple question, and despite looking at answers to other questions I cannot find how to proceed. I would be extremely grateful for any help.

We have a polynomial Pol in several variables (with rational coefficients, if it helps). Its coefficients involve some parameters. And I would like to find values of these parameter so that Pol is the zero polynomial. Here's some code that does not work but capture what I've tried to do.

var('a0,a1') ; R.<x,y> = QQ[] ; Pol = (a1*x+a0)*(1-x*y)-5*y*x ;


ad then I would like to solve (in the variables a0, a1) the system of coefficients equated to 0:

WA = [SR(Pol).coefficient({x:0,y:0})==0,
SR(Pol).coefficient({x:2,y:1})==0,
SR(Pol).coefficient({x:1,y:1})==0,
SR(Pol).coefficient({x:1,y:0})==0
].solve(SR(a0),SR(a1)); WA