A polynomial P is divided by 2×-1, the quotient is x square+x+1 and the remainder is -2 find P?

p(x) = (x^2+x+1)(2x-1) + (-2)

To find the polynomial P, we can use polynomial division. The given information states that when P is divided by 2x - 1, the quotient is x^2 + x + 1, and the remainder is -2.

1. Write down the division equation: P(x) = (2x - 1)(x^2 + x + 1) - 2.
This equation shows that P(x) can be obtained by multiplying the divisor, 2x - 1, by the quotient, x^2 + x + 1, and then subtracting the remainder, -2.

2. Simplify the equation: P(x) = 2x^3 + 2x^2 + 2x - x^2 - x - 1 - 2.
Multiply (2x - 1) by (x^2 + x + 1) using polynomial multiplication: (2x - 1)(x^2 + x + 1) = 2x^3 + 2x^2 + 2x - x^2 - x - 1.
Then subtract the remainder, -2.

3. Combine like terms: P(x) = 2x^3 + (2x^2 - x^2) + (2x - x) - (1 + 2).
Simplify further: P(x) = 2x^3 + x^2 + x - 3.

Therefore, the polynomial P(x) is 2x^3 + x^2 + x - 3.

P * x^2+x+1 + (-2) = divisor.

Is the divisor 2x-1 or 2 into(or) multiplied by -1 ?