I get a wrong answer for the gcd of two polynomials

258 Views Asked by At

Hello first post here,

I am trying to get the gcd of the two polynomials using the euclidean algorithm, but as result I get a fraction with huge numbers, instead of 1, which I get as result after giving the two polynomials into sites like WolframAlpha. Here are the two polynomials. What do I do wrong?

$$f(x)= x^7-7x^5+21x^3-2$$

$$g(x)= 7x^6-35x^4+63x^2$$

Edit: I can also show my steps.

1) $$(x^7-7x^5+21x^3-2): (7x^6-35x^4+63x^2) = (x/7)(7x^6-35x^4+63x^2) +(-2x^5+12x^3-2) $$

2) $$(7x^6 - 35x^4 + 63x^2) : (-2x^5 + 12x^3 - 2) = (-7x/2)(-2x^5 + 12x^3 - 2)+(7x^4 + 63x^2 - 7x) $$

3) $$(-2x^5 + 12x^3 - 2) : (7x^4 + 63x^2 - 7x) = (-2x/7)(7x^4 + 63x^2 - 7x)+(30x^3 - 2x^2 - 2) $$

4) $$(7x^4 + 63x^2 - 7x) : (30x^3 - 2x^2 - 2) = (7x/30 + 7/450)(30x^3 - 2x^2 - 2)+(14182x^2/225 - 98x/15 + 7/225) $$

5) $$(30x^3 - 2x^2 - 2) : (14182x^2/225 - 98x/15 + 7/225) = (3375x/7091 + 126450/7183183)(14182x^2/225 - 98x/15 + 7/225)+(102825x/1026169 - 2052900/1026169) $$

6) $$(14182x^2/225 - 98x/15 + 7/225) : (102825x/1026169 - 2052900/1026169) = (14553128758x/23135625 + 37229954669700470000/2979949481041889 + 2606707394434697)(102825x/1026169 - 2052900/1026169)+(128124881851254230000/5126257615369087) $$

7) $$(102825x/1026169 - 2052900/1026169) : (128124881851254230000/5126257615369087) = (2681007076519401/668730580059914600000x - 836348077344195/10448915313436166000)(128124881851254230000/5126257615369087)+ 0 $$

Thanks.

1

There are 1 best solutions below

3
On BEST ANSWER

Yikes!( Big Arithmetic!) :)

You found that no polynomial of positive degree is a common divisor of $f$ and $g$.And no integer greater then $1$ divides all the coefficients of both $f$ and of $g$.Therefore $\gcd(f,g)=1.$

You can do it more easily by observing that $g(x)=7 x^2(x^4-5 x^2+9)$ and that $\gcd (f(x),7 x^2)=1,$ (otherwise either $f(0)=0$ or 7 divides all the coefficients of $f$.) So we have $\gcd (f,g)=\gcd (f(x),x^4-5x^2+9).$