# Find possible pairs of $p$ and $q$

I'm doing an exercise that's on various topics and I do not know how to do this question (weighted 3 marks): $$\begin{array}{l}\text { The polynomial } P(x)=(x-p)^{3}+q \text { has a zero at } x=1, \text { and when divided by } x, \\ \text { the remainder is }-7 . \\ \text { Find all possible pairs of } p \text { and } q \text { . }\end{array}$$

What I have done so far is set: $$P(1)=(1-p)^3+q=0$$ and I have also divided $$P(x)$$ by $$x$$ resulting in: $$\hspace{11.5mm}x^2-3xp+3p^2\\x\overline{)x^3-3x^2p+3xp^2-p^3+q}\\\hspace{14mm}\qquad\qquad\,-p^3+q\\\therefore-p^3+q=7$$

However, what do I do from here? I tried subbing $$q$$ into my $$P(1)$$ equation but how do I get "all possible pairs of $$p$$ and $$q$$"?

• I realise I wrote my working out wrong, I'll correct this – spuddy Sep 11 '20 at 23:08
• this should be easy if you understand what it means – Onir Sep 11 '20 at 23:09
• You should have $-p^3+q=-7$. The details matter! – lulu Sep 11 '20 at 23:14

$$\because -p^3+q=-7\\\therefore q=p^3-7\\\because P(x)=(x-p)^3+q \quad \&\quad P(1)=0\\\therefore P(1)=(1-p)^3+q=(1-p^3)+p^3-7=0\\\\=1-3p+3p^2-p^3+p^3-7\\=3p^2-3p-6\\=p^2-p-2\\=(p+1)(p-2)\\\therefore p=-1 \,\text{or}\, 2$$ Subbing values of $$p$$ back into $$q=p^3-7$$ $$\therefore \text{pairs of values for}\, p\,\text{and}\,q\, \text{are}\\p=-1\qquad q=-8\\p=2\qquad q=1$$
By the remainder theorem you have $$P(0) = -7\implies (0-p)^3 + q = -7\implies -p^3+q=-7\implies -p^3+(p-1)^3 =-7\implies -p^3+p^3-3p^2+3p-1=-7\implies 3p^2-3p-6=0\implies 3(p^2-p-2)=0 \implies p = -1, 2$$, and $$q = -8,1$$ respectively.