# Find $a$ and $b$ in the given cubic polynomial

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$

-

If $P(x)$ is our polynomial, then $P(-1)=0$, and $P(-2)=0$. Substitute. You get two linear equations in two unknowns. Solve.

-

Hint $\ \ x-c\,$ divides $\, f(x) \iff f(c) = 0\$ (Factor Theorem)

-

If $x+1$ is a factor of $p(x) = x^3+ax^2-bx+10$, Then Sub. $x=-1$ in $p(x) = 0$

we Get $p(-1)=0\Leftrightarrow -1+a+b+10=0\Leftrightarrow a+b=-9$

Similarly If $x+2$ is a factor of $p(x) = x^3+ax^2-bx+10$, Then Sub. $x=-2$ in $p(x) = 0$

we Get $P(-2)=0\Leftrightarrow -8+4a+2b+10=0\Leftrightarrow 2a+b=-1$

After Solving these two equations, We Get $a=8$ and $b=-17$

-