可以因式分解在先:
f(x) = x^3(x+1)-(3x+1)(x+1) = (x+1)(x^3-3x-1)
g(x) = x^2(x+1)-(x+1) = (x+1)(x^2-1)
因为 (x^3-3x-1) 与 (x^2-1)
互质,所以最大公因式为 x+1.
f(x)u(x) + g(x)v(x) = (f(x),g(x)) = x+1
两边消去 x+1, 得:(x^3-3x-1)u(x) + (x^2-1)v(x) = 1
取 u(x) = 1, v(x) = -(x^3-3x-2)/(x^2-1)