I've been given 3 polynomials: $x^6-1,\,x^4-1, \, x^3+x^2+x+1 $ and I have been asked to find the gcd and express it as a linear combination of the 3 polynomials. I got the gcd using $$gcd(p_1(x),\,p_2(x),\,p_3(x)) = gcd(p_1(x),\;gcd(p_2(x),\,p_3(x))).$$ The gcd is $x+1$. I'm now having trouble finding a way to express it as linear combination. I have looked at many question that show how to do it for 2 polynomials. However, I haven't seen a generalization of the method for more than 2 polynomials. Any hints are appreciated.