# Homework Help: Expressing gcd of two polynomials as a linear combination

1. Nov 23, 2013

### bonfire09

1. The problem statement, all variables and given/known data

Find the $gcd(x^3+x^2-x, x^5+x^4+2x^2-x-1)$and write it as a linear combination.

2. Relevant equations

3. The attempt at a solution

I know the $gcd(x^3+x^2-x, x^5+x^4+2x^2-x-1)=1$ What I have so far is $1. x^5+x^4+2x^2-x-1=(x^3+x^2-x)(x^2+1)+(x^2-1)$ $2. x^3+x^2-x=(x^2-1)(x+1)+1$. I tried back substituting but it can't seem to work. The division is correct.

2. Nov 24, 2013

### Student100

You have the gcd as 1? What does that tell you about what factors these polynomials have in common?

3. Nov 24, 2013

### bonfire09

Just 1 but im having trouble writing the gcd as a linear combination of the two given polynomials to equal 1.

4. Nov 24, 2013

### Student100

Yeah, so they're coprime.

You have $$x^5+x^4+2x^2-x-1 =(x^2 + 1)(x^3+x^2-x) +(x^2 -1)$$
$$x^3 + x^2 - x = (x+1)(x^2-1) + 1$$

back subbing you'd get $$x^3 + x^2 -x -(x+1)(x^2-1) = 1$$
$$x^5 + x^4 + 2x^2 -x -1 -(x^2+1)(x^3+x^2-x) = x^2-1$$
$$x^3+x^2-x -(x+1)[x^5+x^4+2x^2 -x -1 -(x^2+1)(x^3+x^2-x)] = 1$$

Does this help? I can't think of a good way to point you in the right direction without giving the soultion.