1Function: polresultantext 2Section: polynomials 3C-Name: polresultantext0 4Prototype: GGDn 5Help: polresultantext(A,B,{v}): return [U,V,R] such that 6 R=polresultant(A,B,v) and U*A+V*B = R, where A and B are polynomials. 7Doc: finds polynomials $U$ and $V$ such that $A*U + B*V = R$, where $R$ is 8 the resultant of $U$ and $V$ with respect to the main variables of $A$ and 9 $B$ if $v$ is omitted, and with respect to $v$ otherwise. Returns the row 10 vector $[U,V,R]$. The algorithm used (subresultant) assumes that the base 11 ring is a domain. 12 \bprog 13 ? A = x*y; B = (x+y)^2; 14 ? [U,V,R] = polresultantext(A, B) 15 %2 = [-y*x - 2*y^2, y^2, y^4] 16 ? A*U + B*V 17 %3 = y^4 18 ? [U,V,R] = polresultantext(A, B, y) 19 %4 = [-2*x^2 - y*x, x^2, x^4] 20 ? A*U+B*V 21 %5 = x^4 22 @eprog 23Variant: Also available is 24 \fun{GEN}{polresultantext}{GEN x, GEN y}. 25 26