<s>[INST] 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?
 [/INST] 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!
</s>