I have a list p
of polynomials of k
, and a list of "parameters" x,y,z
which are also polynomials of k
.
I know that p
can be written as a polynomial function of x,y,z
(possibly of only a subset of the three) with integer coefficients. As an example:
p = {-2 (-1 + k - 2 k^2 + k^3), -2 (-8 - 7 k + k^3), 1 + 15 k^2 - 12 k^3};
x = {k, k + 2, 2 k};
y = {k^2 + 1, k^2 - 1, 3 k^2};
z = {1,2,3};
has a solution given by
p == 3 x^2 - 2 y x + y + 1
I need to find the relation for various p
. I've been able to find some by trial and error, but the problem becomes more and more complicated as the degree of p
increases. Since the lists have fixed length 3, I cannot just use Solve
as I'll have an under-determined system.
As I expect the solution to be unique for each p
, I've tried to construct all combinations x^a y^b z^c
with degree smaller than that of p
and doing a giant loop over all possible linear combinations
p == a[0] + a[1] x + a[2] y + ... + a[nmax] x^a y^b z^c
for all coefficients a[i]
in some list until I get True
, but this brute force way is obviously extremely time consuming, and scales very badly with the degree.
Is there an efficient way to solve that kind of problems with Mathematica? Or at least make the trial and error process simpler.