# On dividing $x^3 - 3x^2 + x + 2$ by a polynomial $g(x)$, the quotient and remainder were $x - 2$ and $-2x + 4$, respectively. Find $g(x)$.

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

Given:

$x^3 - 3x^2 + x + 2$ is divided by $g(x)$.

The quotient and remainder were $x - 2$ and $-2x + 4$, respectively.

To do:

We have to find $g(x)$.

Solution:

Let $p(x) = x^3 – 3x^2 + x + 2$

Quotient $= x – 2$

Remainder $= -2x + 4$

On dividing $p(x)$ by $g(x)$, we have,

$p(x) = g(x) \times$ quotient $+$ remainder

$x^3– 3x^2 + x + 2 = g(x) (x – 2) + (-2x + 4)$

$x^3 – 3x^2 + x + 2 + 2 x- 4 = g(x) \times (x-2)$

$x^3 – 3x^2 + 3x – 2 = g(x) (x – 2)$

Therefore,

$g(x)=\frac{x^3 – 3x^2 + 3x – 2}{(x – 2)}$

$x-2$)$x^3-3x^2+3x-2$($x^2-x+1$

$x^3-2x^2$

------------------------

$-x^2+3x-2$

$-x^2+2x$

-------------------

$x-2$

$x-2$

------------

$0$

Therefore, $g(x)=x^2-x+1$

Updated on 10-Oct-2022 13:19:38