# Determining polynomial coefficients correctly

I am working with a dot product of 2 unit vectors in R3 that are algebraic.

I am trying to recover their original format in a number field, but I am not sure of how to go about doing this. I do use GP-Pari, but apparently it has come time to learn simple things about number fields.

Let one vector in R[3] be called A, its coefficients[x,y,z] are from roots of integer coefficient polynomials, (using GP-Pari) where poly[root] is the root # of the polynomial roots as listed out by GP-Pari command polroots().

A[1] = polroots(98*x^12 - 2814*x^10 - 9555*x^9 + 25335*x^8 + 133140*x^7 + 146288*x^6 - 278778*x^5 + 3780*x^4 + 64836*x^3 - 6090*x^2 - 2571*x + 59)[2]

A[2] = polroots(9604*x^24 + 436296*x^22 + 7451136*x^20 + 104590437*x^18 + 1010241768*x^16 + 2770851456*x^14 + 38854511616*x^12 - 268919935488*x^10 + 614263209984*x^8 - 702584930304*x^6 + 438328295424*x^4 - 142973337600*x^2 + 19138609152)[11]

A[3] = 0

which is all well and good, since I know what the values are. It is the second vector whose components I wish to recover

B[1] = polroots(98*x^12 - 2814*x^10 - 9555*x^9 + 25335*x^8 + 133140*x^7 + 146288*x^6 - 278778*x^5 + 3780*x^4 + 64836*x^3 - 6090*x^2 - 2571*x + 59)[5]

B[2] = ? (suspected 36th power or 72nd power field? or 144th power? unknown)

B[3] = ? (unknown)

Here is what is known:

A dot B = polroots(14*x^9 + 42*x^8 + 804*x^7 + 935*x^6 + 9318*x^5 - 6627*x^4 - 13488*x^3 + 8217*x^2 + 4536*x - 2727)[3]

A[1] * B[1] = polroots(941192*x^18 + 27025656*x^17 + 137462052*x^16 - 6953962106*x^15 - 84970588458*x^14 + 117612302514*x^13 + 8850508638259*x^12 + 7009827208866*x^11 - 62417542754208*x^10 - 174929280314834*x^9 - 5794674063903*x^8 + 222618099273210*x^7 + 228018482057086*x^6 + 48834186405150*x^5 - 686321579547*x^4 - 399708345506*x^3 - 118507164*x^2 + 57123210*x + 205379)[2]

A[2] * B[2] = A dot B - A[1]*B[1] = ?

A[3] * B[3] = 0 since A[3] = 0

But we also know that B[1]^2 + B[2]^2 + B[3]^2 = 1, since A & B are unit vectors, so recovering B[2] should enable us also to find B[3]. (B[1] is known)

I seek to find B[2] and B[3] from the information above. I have carefully checked these polynomial equations and I believe that they are correct.

How can this be done in a number field? I understand that I am decomposing the dot product A dot B = A[1]*B[1] + A[2]*B[2] + A[3]*B[3] = A[1]*B[1] + A[2]*B[2] + 0 and eventually getting around to finding a quotient (A dot B - A[1]*B[1]) / A[2] = B[2] in some type of number field in order to obtain B[2]. Then I have to find some square root in the number field, since 1 = B[1]^2 + B[2]^2 + B[3]^2 in order to find B[3].

I would appreciate some tips on using the number field functions of GP Pari to determine the answer, as I have other vectors with unknown algebraic components that I wish to determine, and it takes a similar process, as the one given above, in order to obtain their components. (I only know 1 out of 3, the other 2 are unknown)

Thanks for showing how to use the GP-Pari commands to solve this interesting problem.

-
I don't really understand your specific problem. For a given number $a$, GP Pari allows you to guess the polynomial with integer coefficients which has $a$ as zero. The corresponding function is algdep(number,expected degree). –  Wadim Zudilin May 12 '10 at 7:05
You might find that you get a more useful answer if you can remove all the code from your question! Try abstracting it a little. Or if GP-Pari is essential to the answer, try to separate out the number field part from the code part, then someone who knows about the theory doesn't have to wade through the code to help you. –  Andrew Stacey May 12 '10 at 8:26