# If f(x)=x^2+3x+k is divided by x+k, remainder is 0. What is the value of k?

Mar 28, 2017

$k = 0 \mathmr{and} 2$

#### Explanation:

$\frac{{x}^{2} + 3 x + k}{x + k}$

we use long division to solve it.
${x}^{2} + 3 x + k \to x \cdot \left(x + k\right)$
$- \left({x}^{2} + k x\right)$
........................
$3 x - k x + k$
$\left(3 - k\right) x + k \to \left(3 - k\right) \cdot \left(x + k\right)$
$- \left(\left(3 - k\right) x + \left(3 - k\right) k\right)$
.......................
$k - \left(3 - k\right) k = k - 3 k + {k}^{2} = - 2 k + {k}^{2}$

to be a divisible,
$- 2 k + {k}^{2} = 0$
$k \left(- 2 + k\right) = 0$

$k = 0 \mathmr{and} 2$

Mar 28, 2017

$k = 0$ or $k = 2$

#### Explanation:

We can use Remainder Theorem here. According to this theorem, if a polynomial $f \left(x\right)$ is divided by $x - a$, the remainder is $f \left(a\right)$.

In other words, if $f \left(x\right)$ is divisible by $x - a$, $f \left(a\right) = 0$.

Now $f \left(x\right) = {x}^{2} + 3 x + k$ to be divisible by $x + k$ or $x - \left(- k\right)$,

we should have $f \left(- k\right) = {\left(- k\right)}^{2} + 3 \times \left(- k\right) + k = 0$

or ${k}^{2} - 3 k + k = 0$

i.e. $k \left(k - 2\right) = 0$

For this we must have either $k = 0$ or $k - 2 = 0$

i.e. either $k = 0$ or $k = 2$