# Find the remainder when $p(x)$ is divided by $x^2 -1$

Polynomial $$p(x)$$ leaves a remainder of $$4$$ when divided by $$x-1$$ and a remainder of $$-2$$ when divided by $$x+1$$.

Find the remainder when $$p(x)$$ is divided by $$x^2 -1$$ .

According to Remainder Theorem, when a polynomial $$p(x)$$ is divided by $$(ax+b)$$, the remainder is $$p\left( -\frac {b}{a}\right)$$ .

So, I did the following:

\begin{align}p(1)&=4\\ p(-1)&= -2\end{align}

\begin{align}p(x)&= (x^2-1)q(x) + Ax+ B\\ p(x)&= (x-1)(x+1)q(x) + Ax+B\end{align}

When \begin{align}p(1) &= A(1) + B\\ A+B&=4\tag{1}\end{align}

When \begin{align}p(-1)&= -A+ B\\ -A+B&= -2\tag{2}\end{align}

Doing $$(1)+(2)$$ gives:

\begin{align}2B&=2\\ B&=1\end{align}

Substitute $$B=1$$ into $$(1)$$ gives $$A=3$$

So, I got the remainder as $$3x+ 1$$

But, the answer in the book is $$x+3$$ , which means my values of $$A$$ and $$B$$ have been mixed up.

Please tell me where I went wrong

• If we divide $x+3$ by $x+1$ , the remainder is clearly $2$. Weird ! Jan 23 '20 at 11:00
• @Peter Why would you divide the remainder by the factor? Jan 23 '20 at 11:05
• Apparently, I mixed the answer (which gives the remainder) with the polyomial, sorry. Jan 23 '20 at 11:13

$$3x+1 = 3(x-1) + 4\\3x+1 = 3(x+1)-2$$
So your answer $$3x+1$$ is correct.
• What is missing : The proof that this is the only polynomial modulo $x^2-1$ that does the job. Otherwise we could not conclude the remainder. Jan 23 '20 at 12:09
• @Peter Remainder is unique because if there are two remainders $r$ and $r'$ then their difference must be divisible by $x^2-1$. But since the degrees of both $r$ and $r'$ are less than the degree of $x^2-1$, we must have $r-r'=0$, so $r=r'$. Jan 23 '20 at 12:41