When does polynomial equation have a double root? I'm actually solving next task:
We have an polynomial: $x^n-ax^{n-1}+bx-1$.
And we need to find values of $a$ and $b$, such that we can divide polynomial by $(x-1)^2$ without remainder.
I tried equating polinomial to $0$ and got $a=x$ and $b=1/x$. But i'm sure there is at least one more solution. Please help me with it. Pointing to the material that would help would be greate.

Given any polynomial $P(x)$, we have the general principle that 
$(x - c)^2 \mid P(x) \tag 0$
if and only if 
$(x - c) \mid P(x), \; (x - c) \mid P'(x), \tag 1$
for (0) implies
$P(x) = (x - c)^2Q(x) \tag 2$
for some polynomial $Q(x)$; then
$P'(x) = 2(x - c)Q(x) + (x - c)^2Q'(x), \tag 3$
and thus clearly
$(x - c) \mid P'(x), \tag 4$
and (1) binds.  Going the other way, from (1) we may write
$P(x) = (x - c)R(x) \tag 5$
whence
$P'(x) = R(x) + (x - c)R'(x), \tag 6$
or 
$R(x) = P'(x) - (x - c)R'(x); \tag 7$
since $(x - c) \mid P'(x)$ it follows that
$(x - c) \mid R(x), \tag 8$
and so we have
$R(x) = (x - c)S(x) \tag 9$
for some polynomial $S(x)$; now from (5),
$P(x) = (x - c)R(x)$
$= (x - c)(x - c)S(x) = (x - c)^2 S(x), \tag{10}$
and we see that (0) is in fact the case.
We apply this concept to
$P(x) = x^n - ax^{n - 1} + bx - 1, \tag{11}$
observing that
$(x - 1)^2 \mid P(x) \Longrightarrow P(1) = 0$ $\Longrightarrow -a + b = 1 - a + b - 1 = 0 \Longrightarrow a = b; \tag{12}$
thus (11) becomes
$P(x) = x^n - ax^{n - 1} + ax - 1, \tag{13}$
whence
$P'(x) = nx^{n - 1} - a(n - 1)x^{n - 2} + a; \tag{14}$
thus,
$P'(1) = 0 \Longrightarrow n - a(n - 1) + a = 0 \Longrightarrow n - an + a + a = 0$
$\Longrightarrow  n + (2 - n)a = 0 \Longrightarrow a = \dfrac{n}{n - 2}; \tag{15}$
then
$P(x) = x^n - \dfrac{n}{n - 2}x^{n - 1} + \dfrac{n}{n - 2}x - 1, \tag{16}$
$P'(x) = nx^{n - 1} - \dfrac{n(n - 1)}{n - 2}x^{ - 2} + \dfrac{n}{n - 2}. \tag{17}$
We Check:
From (6),
$P(1) = 1 - \dfrac{n}{n - 2} + \dfrac{n}{n - 2} - 1 = 0; \tag{18}$
and from (7),
$P'(1) = n - \dfrac{n(n - 1)}{n - 2} + \dfrac{n}{n - 2} = \dfrac{n(n - 2)}{n - 2} - \dfrac{n(n - 1)}{n - 2} + \dfrac{n}{n - 2} = \dfrac{n^2 - 2n -n^2 + n + n}{n - 2} = 0. \tag{19}$
