Find the remainder when $x^{100}$ is divided by $x^2-3x+2$ We have to find the remainder when $x^{100}$ is divided by $x^2-3x+2$.I tried to use the remainder theorem but am not just able to solve it.please help.

Let  $p(x) = x^{100}$ and $q(x) = x^2 – 3x + 2
= x^2 – 2x – x + 2 = x(x– 2) – 1(x – 2)
  = (x – 2)(x – 1)$
Let $Q(x)$ and $r(x)$ be the quotient and remainder when $p(x)$ is divided by $q(x)$. Hence by division algorithm, we have
$p(x) = q(x)\cdot Q(x) + r(x)$
That is,  $x^{100} = (x – 2)(x – 1)Q(x) + r(x)$
Let $r(x) = (ax + b)$ where $0 < \deg r(x) < 2$
$x^{100} = (x – 2)(x – 1)Q(x) + (ax + b)\qquad (1)$
Put $x = 1$ in Equation $(1)$, we get $1 = 0 + (a + b)$
Hence $(a + b) = 1\qquad(2)$
Now put x = 2 in equation (1), we get
$2^{100} = 0 + (2a + b)$
$2a + b = 2^{100}\qquad(3)$
Solving $(2)$ and $(3)$, we get
$a = (2^{100} – 1)$ and $b = 2 – 2^{100}$
Therefore the remainder $= (ax + b) = (2^{100} – 1)x + (2 – 2^{100})$
