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.
 A: Your solution doesn't quite work. You need to remember that $a$ and $b$ are constants to be found, while $x$ is a variable. So $a=x$ doesn't solve the problem, and if you have $a=x, b=\frac 1x$ you have the relation between the constants $b=\frac 1a$.
Now this gives $p(x)=x^n-ax^{n-1}+\frac 1a x-1$ and you can find by substitution that $p(a)=0$. In fact this means that $p(x)$ has $x-a$ as a factor. That wasn't quite the question you were asked, but it does help you make progress, because you can now find a polynomial with $x-1$ as a factor (by choosing $a=1$).
The problem is that spotting this particular solution might not give you the most general solution you need. One way of beginning these divisibility problems is to use the division algorithm for polynomials. Here:$$p(x)=x^n-ax^{n-1}+b x-1=q(x)(x-1)^2$$
(we know that $p(x)$ is exactly divisible; we are not hugely interested in $q(x)$ - it is the polynomial we get when we do the division)
We can make the right-hand side equal to zero by putting $x=1$. Since the equation is a polynomial identity it must remain true for each specific value of $x$, so the left-hand side will vanish too. That gives one condition.
The easiest way to work with the double root is then to take the derivative of each side using the rule for a product on the right. This leaves a factor of $x-1$ on the right-hand side and allows us to use the $x=1$ trick a second time. That gives a second condition - you have two unknowns ($a$ and $b$) and two conditions, so this should give you enough to solve the problem.
This is a longer-winded version of Arthur's answer, in case you haven't seen the method before. I've left some calculations for you to do - if you work through them you will probably remember the method better, and you should understand why it works.
A: 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}$
A: A polynomial $p(x)$ is divisible by $(x-1)^2$ if and only if


*

*$p(1) = 0$

*$p'(1) = 0$
are both fulfilled.
