Re: determining coefficients of a polynomial

*To*: mathgroup at smc.vnet.net*Subject*: [mg124382] Re: determining coefficients of a polynomial*From*: janos <janostothmeister at gmail.com>*Date*: Wed, 18 Jan 2012 05:56:22 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <jf3cda$nj3$1@smc.vnet.net>

On Jan 17, 9:44 am, klw1026 <klw1... at gmail.com> wrote: > Hi, > > Here's my problem: I have two rational polynomials in two variables, say x and y, with one having arbitrary coefficients. I would like to compare these two polys and solve for the arbitrary coefficients. For example, suppose the polys are $f(x,y) = \frac{2}{xy} - xy + \frac{x}{y} + \frac{y}{x}$ and $g(x,y) = \cdot\cdot\cdot + n_1\frac{1}{xy} + n_2 xy + n_3\frac{x}{y}+ n_4\frac{y}{x} +\cdot\cdot\cdot$. Then you can see that $n_1 = 2$, $n_2=-1$, $n_3 = n_4 =1$ and all other $n_i = 0$. Does anyone know how to do this with Mathematica? > > Thanks One solution might be: SolveAlways[f[x, y] - g[x, y] == 0, {x, y}] giving {{n1 -> 2, n2 -> -1, n3 -> 1, n4 -> 1}} I hope this helps. J=E1nos