0

find the gcd of ($2x^3+x^2+5 $ , $x^3-x+7 $ ) : i have tried to find the gcd using euclid's algorithm multiple times , but i always get a negative fraction in the end , but it says that the gcd is $1$ . $$ 2x^3+x^2+5 = (2)(x^3−x+7)+x^2+2x-9,\\ x^3-x+7=(x-2)(x^2+2x−9) +(12x−11) ,\\ (x^2+2x−9) = \left(\frac1{12}x+\frac{35}{144}\right) (12x−11) +\left(−\frac{911}{144}\right) ,\\ (12x−11) = \left(−\frac{1278}{911}x+\frac{1584}{911}\right) \left(−\frac{911}{144}\right) + 0 $$

Bill Dubuque
  • 272,048
  • 1
    Could youn walk us through one of your attempts with Euclid's algorithm? Tell us how you get the negative fraction in the end? – Arthur Feb 02 '24 at 09:09
  • 1
    $2x^3+x^2+5$ = $ (2) (x^3-x+7) + $x^2+2x-9$ , $x^3-x+7$ = $(x-2)$(x^2+2x-9)$ +$(12x-11) $ , $(x^2+2x-9)$ = $(1/12x + 35/144)$ $(12x-11)$ +$(-911/144)$ , $(12x-11)$ = $(-1278/911x + 1584/911)$ $(-911/144)$ + $0$ – sami younis Feb 02 '24 at 09:19
  • 4
    You got $\gcd(p(x),q(x))$ down to a degree-$0$ polynomial, a non-zero constant $c$. So you know that there are polynomials $a(x)$ and $b(x)$ such that $ap+bq=c$, but you are working in $\mathbb{Q}[x]$ so you can just as well divide $a$ and $b$ by $c$ to get $a'p+b'q=1$. In $\mathbb{Q}$ any non-zero constant is a unit so we usually normalise the $\gcd$ to $1$ or in general to a monic polynomial. If you are calculating $\gcd$s within $\mathbb{Z}[x]$ this does not apply, though you can still change sign by multiplying by $-1$, the only non-trivial unit in $\mathbb{Z}$. – Jaap Scherphuis Feb 02 '24 at 09:34

0 Answers0