Find all $a\in\mathbb{C}$ such that $f=X^4 −(a+4)X^3 +(4a+5)X^2 −(5a+2)X +2a$ has $a$ as a double root. Find all $a\in\mathbb{C}$ such that $f=X^4 −(a+4)X^3 +(4a+5)X^2 −(5a+2)X +2a$ has $a$ as a double root.

Here is what I did:
I know for a fact that all $f\in\mathbb{C}$ of degree $n\geq1$ have exactly $n$ roots. So, I write $f=(X-a)^2(X-b)(X-c)=X^4 - (2a+b+c)X^3 + (bc+2ac+2ab+a^2)X^2 - (2abc+a^2c+a^2b)+a^2bc$. I solved the system of equations ($2a+b+c=a+4$, ...) using Wolfram Alpha and found $\begin{cases} a=1,b=1,c=2 \\ a=1,b=2,c=1 \\ a=2,b=1,c=1\end{cases}$. Hence $a=2$ because when $a=1$, $a$ is a triple root.
I don't reckon this is the solution they were asking for. I mean, I wouldn't try to solve that system of equations without the help of a computer. So what could I do instead?
 A: Since $f(a)=0$ and $f'(a)=(a-2)(a-1)^2$, $a$ is a multiple root if and only if $a=2$ and $a=1$. But $f''(a)=2 \left(3 a^2-8 a+5\right)$, and therefore $f''(1)=0$ and $f''(2)\ne0$. So, it's a double root if and only if $a=2$.
A: I would start with noticing that
\begin{align*}
f(x) & = x^{4} - (a+4)x^{3} + (4a+5)x^{2} - (5a+2)x + 2a\\\\
& = (x^{4} - ax^{3}) - (4x^{3} - 4ax^{2}) + (5x^{2} - 5ax) - (2x - 2a)\\\\
& = x^{3}(x-a) - 4x^{2}(x-a) + 5x(x - a) - 2(x-a)\\\\
& = (x^{3} - 4x^{2} + 5x - 2)(x-a)
\end{align*}
where the first factor from the last expression can be rewritten as
\begin{align*}
x^{3} - 4x^{2} + 5x - 2 & = (x^{3} - x^{2}) - (3x^{2} - 3x) + (2x - 2)\\\\
& = x^{2}(x-1) - 3x(x-1) + 2(x-1)\\\\
& = (x^{2} - 3x + 2)(x-1)\\\\
& = (x-1)^{2}(x-2)
\end{align*}
Consequently, the proposed polynomial has $a$ as a double root iff $a = 2$ (if $a = 1$, then it is a triple root).
Hopefully this helps!
A: I would factor the polynomial in X, dividing that polynomial by $(x-a)^2$. The remainder should then be zero iff $x=a$ is a double root (or higher).
That should be doable by hand, but I'm lazy, so I did indeed use a computer, specifically Mathematica's PolynomialQuotientRemainder. This gives for the remainder something of the form $f(a) + g(a) x$. When you factor $f(a),g(a)$ as polynomials in $a$, you find that they have two common roots, just as you reported.
If I were doing the assignment I'd report the two roots but note that one of them is a triple root, so whether it counts as a double root is a matter of semantics (does double root mean at least a power of two or exactly a power of two?).
