Given that x-1 and x+2 are factors of f(x)= x^3 + px + q where p and q are integers, find p and q.
How do i start in find p and q????
Another method:
$\displaystyle x^3+px+q=(x-1)(x+2)(x-k)$
We know k is real as complex roots come in conjugate pairs.
$\displaystyle x^3+px+q=\left(x^2+x-2\right)(x-k)$
$\displaystyle x^3+px+q=\left(x^3+x^2-2x\right)-\left(kx^2+kx-2k\right)$
$\displaystyle x^3+0\cdot x^2+px+q=x^3+(1-k)x^2-(2+k)x+2k$
Now equate coefficients.