<s>[INST] Find highest common factor of two polynomials Find the highest common factor of the following expressions:
$6-8a-32a^2-18a^3$, $20-35a-95a^2-40a^3$
My attempt:
The polynomial on the left is divisible by $2$, the polynomial on the right is not divisble by $2$. Conversely the polynomial on the right is divisble by $5$ and not the one on the left. Hence simplify the polynomials, then toss out $2$ and $5$ knowing they cannot be in the final answer since we are finding the highest common factor.
\begin{array}{r|ll} 3-4a-16a^2-9a^3 & 4-7a-19a^2-8a^3   \end{array}
The lowest common multiple of $-9a^3$ and $-8a^3$ is $-72a^3$.
\begin{array}{|r|ll}  24-32a-128a^2-72a^3 & 36-63a-171a^2-72a^3 \\ 36-63a-171a^2-72a^3  \end{array}
Subtract the left hand side.
\begin{array}{r|ll} 43a^2+31a-12 & 36-63a-171a^2-72a^3   \end{array}
Now usually the next step is to multiply the polynomial on the left by $a$ and subtract on the right hand side, but the coefficients are a big problem here. $43$ is a prime number. I actually went ahead and found the lowest common multiple of $72$ and $43$ and kept calculating, but naturally the coefficients morphed into four places and I couldn't find the highest common factor. I don't believe the problem would require that kind of tedious calculation (and I still got it wrong anyway), so I feel I must've made a mistake somewhere. Any help would be appreciated thanks.
The answer is $1+a$.
 [/INST] It looks like you're kind of drifting towards applying the Euclidean algorithm. In this case, though, the easiest way is probably to (1) prove that $1+a$ is a factor of both polynomials, (2) find the quotient of each polynomial divided by $1+a$, (3) find the GCD of the quotients.
If you do that here, then first you get that $9a^3+16a^2+4a-3 = (a+1)(9a^2+7a-1)$ and $8a^3+19a^2+7a-4 = (a+1)(8a^2+11a-4)$. Then we note that $(9a^2+7a-1)-(8a^2+11a-4) = a^2-4a+3 = (a-1)(a-3)$. Then it's pretty easy to spot that $a-1$ and $a-3$ are not factors of either polynomial, so only $a+1$ is the GCD.
</s>