example:
f(x) = x + 4x + x - 6
g(x) = x + 2
solution:
x + 4x + x - 6 = (x + 2)(x +
bx +
c)
Clearly, we need to begin with the x term. The RHS will then expand to give 2x, but we need 4x, so
b = 2.
x + 4x + x - 6 = (x + 2)(x + 2x +
c)
This will now expand to give 4x, but we only want 1x, so in order to lose 3x,
c = -3.
x + 4x + x - 6 = (x + 2)(x + 2x - 3)
You can see that this expands to give a constant term of -6.
The quadratic term is easily factorised.
x + 4x + x - 6 = (x + 2)(x + 3)(x - 1)
Edit: Listen to quartic for polynomials of degree > 3.