# $f(x)=(x-a)(x-a_2)…(x-a_n)\in F[x]$ where $F$ is a field and $a_j\in$ for $j=1,2,…,n$ has no repeated roots iff gcd$(f(x),f'(x))=1\in F[x]$

This makes sense to me if $$a_j\ne a_k$$ for $$j\ne k$$ as $$(x-a_j)=0 \implies a_j$$ is a root of $$f(x)$$. So if all $$a_j$$ are different, then all the roots will be different. Do I have to somehow show this using the fact that gcd$$(f(x),f'(x))=1$$, because if so, I don't know how to

• You have to show two things: 1) that if all the $a_i$-s are distinct, then $\operatorname{gcd}(f,f')=1$; 2) that if $a_i=a_j$ for some $i\ne j$, then $\operatorname{gcd}(f,f')\ne 1$. – Saucy O'Path May 20 at 20:39
• Hint: can you write an expression for $f'(x)$ given the above representation for $f(x)$? – user293794 May 20 at 20:40

Compute the derivative: $$f'(x)=(x-a_2)\cdots(x-a_n)+(x-a_1)(x-a_3)\cdots(x-a_n)+\ldots+(x-a_1)\cdots(x-a_{n-1})$$ Suppose $$f$$ has a multiple root; wlog assume $$a_1=a_2$$. Then in the sum above, each term is divisible by at least one of $$(x-a_1)$$ and $$(x-a_2)$$. Hence $$f'(a_1)=0$$, and thus $$(x-a_1)\mid\mathrm{gcd}(f,f')$$.
Conversely, suppose $$f$$ has no multiple roots. Then $$f'(a_i)=(a_i-a_1)\cdots(a_i-a_{i-1})(a_i-a_{i+1})\cdots(a_i-a_n)$$ Since $$f$$ has no multiple roots, all these factors $$(a_j-a_i)$$ are nonzero. Hence $$f'(a_i)\ne0$$, thus no factor $$(x-a_i)$$ of $$f$$ divides $$f'$$, which means that the gcd is $$1$$.