- Given that \(f(x)=x^3+kx^2-2x+1\) and that when \(f(x)\) is divided by \((x-k)\) the remainder is \(k\), find the possible values of \(k\).

Using the remainder theorem, we know that the remainder when we divide by \((x-k)\) is the same as \(f(k)=2k^3-2k+1\).

So we need to find solutions for \(2k^3-2k+1=k\), that is \(2k^3-3k+1=0\).

It is easy to guess and check that \(k=1\) is a solution, so \((k-1)\) is a factor; taking out a factor of \(k-1\) gives \[2k^3-3k+1=(k-1)(2k^2+2k-1).\] So either \(k=1\) or \(2k^2+2k-1=0\). Solutions for the latter are, using the quadratic formula, \[k=\frac{-2 \pm \sqrt{2^2-4\times 2\times (-1)}}{2\times 2} =\frac{-1 \pm \sqrt{3}}{2}\]

So the solutions are \(k=1\), \(k=\dfrac{-1 \pm \sqrt{3}}{2}\).

- When the polynomial \(p(x)\) is divided by \((x-1)\) the remainder is \(5\) and when \(p(x)\) is divided by \((x-2)\) the remainder is \(7\). Given that \(p(x)\) may be written in the form \[(x-1)(x-2)q(x)+Ax+B,\] where \(q(x)\) is a polynomial and \(A\) and \(B\) are numbers, find the remainder when \(p(x)\) is divided by \((x-1)(x-2)\).

Using the remainder theorem again, the remainder when we divide \(p(x)\) by \((x-1)\) is the same as \(p(1)=A+B\), so \(A+B=5\).

Likewise, the remainder when we divide \(p(x)\) by \((x-2)\) is the same as \(p(2)=2A+B\), so \(2A+B=7\).

These simultaneous equations in \(A\) and \(B\) give as solutions \(A=2\) and \(B=3\).

The remainder when \(p(x)\) is divided by \((x-1)(x-2)\) is \(Ax+B\), since \((x-1)(x-2)\) is a factor of \((x-1)(x-2)q(x)\), and \(Ax+B\) has a smaller degree than \((x-1)(x-2)\). So the remainder is \(2x+3\).