If g=f+(x+3)(x+4), write f and g as products of irreducible factors and find their GCD. f=x^3+3x^2+4x+2 g=x^3+4x^2+x+4  The coefficients of f and g are from class of residuals modulo 5.

hala718 | Certified Educator

f=x^3+3x^2+4x+2

==> f = (x+1)(x^2+2x+2)

g=x^3+4x^2+x+4

==> g = (x^3+4x^2) + (x+4)

===> x^2(x+4) + (x+4)

==> (x+4)(x^2 +1)

==> g= (x+4)(x-1)(x+1)

then the GCD = (x+1)

giorgiana1976 | Student

We notice that we can write g as a product of irreducible factors, in this way: we'll group the first 2 terms together and the next 2 terms toghether,also.

After factorization, we'll get:

g=x^2(x+4) + (x+4)

g=(x+4)(x^2+1)

We can write also x^2+1=(x+1)(x+4)=x^2+5x+4, but, in the class of residuals modulo 5, 5=0, so x^2+5x+4=x^2+4.

g=(x+4)(x+4)(x+1)

From enunciation we have g=f+(x+3)(x+4), so:

f = g-(x+3)(x+4)

f=(x+4)(x+4)(x+1)-(x+3)(x+4)

f=(x+4)(x^2+4-x-3)

f=(x^2-x+1)(x+4)

The GCD of f and g is (x+4).

neela | Student

g(x) = x^2(x+1)+1(x+4) = (x+4)(x^2+1)......(1)

g = f +(x+3)(x+4) given. Therefore,

f = g(x) - (x+3)(x+4).Substitute g(x)=(x+4)(x^2+1)from(1):

=(x+4)(x^2+1)-(x+3)(x+4)

=(x+4){x^2+1-x-3}

= (x+4)(x^2-x-2)

=(x+4)(x-2)(x+1)...........(2)

From (1) and (2) the GCF  of g(x) and f(x) is (x+4)