6. Let $f(x)=x^{4}+3 x^{3}+x^{2}-1, g(x)=x^{4}-x^{3}+x^{2}+2$, find $(f(x), g(x))$.
6. By the division algorithm, we get $f(x)=q(x) g(x)+r_{1}(x), r_{1}(x)=4 x^{3}-4$.

Again by the division algorithm, we get $g(x)=q_{1}(x) \cdot \frac{1}{4} r_{1}(x)+r_{2}(x), r_{2}(x)=x^{2}+x+1$.
Since $r_{2}(x) \left\lvert\, \frac{1}{4} r_{1}(x)\right.$, we have $\left(\frac{1}{4} r_{1}(x), r_{2}(x)\right)=r_{2}(x)$,
thus $\left(g(x), r_{1}(x)\right)=\left(\frac{1}{4} r_{1}(x), r_{2}(x)\right)=r_{2}(x)$,
therefore $(f(x), g(x))=r_{2}(x)=x^{2}+x+1$.