Find $a$ and $b$ such that $x+1$ and $x+2$ are factors of the polynomials $x^3+ax^2-bx+10$.
Here I am not sure that how can I obtain the value of $a$ and $b$, I tried to multiply $x+1$ and $x+2$ to obtain a quadratic equation by which I divided the obtained quadratic polynomial with the above given cubic polynomial, But it didn't worked. How can I overcome my answer.
Let $x+c$ be the 3rd/last factor as the expression is of degree three.
So, $$(x+c)(x+1)(x+2)=x^3+ax^2-bx+10$$
But, $$(x+c)(x+1)(x+2)=(x+c)(x^2+3x+2)=x^3+x^2(c+3)+x(3c+2)+2c$$
So, $$x^3+x^2(c+3)+x(3c+2)+2c=x^3+ax^2-bx+10$$
Comparing the coefficients of the different powers of $x,$
$2c=10\implies c=5$
$a=c+3=5+3=8$
$-b=3c+2=3\cdot5+2=17,b=-17$