so we were trying to show that the following functions derivative has $n-1$ roots using Rolle's theorem
Let $ a_1 < · · · < a_n \in \mathbb{R}$ and the function $f(x)$ be given by: $$f(x) = (x − a_1)· · ·(x − a_n)$$
So I applied Rolle’s Theorem for f in each interval $[a_1, a_2], . . . , [a_{n−1}, a_n]$ to get that $f' (x) = 0$ has at least one solution in each interval$ (a_i , a_{i+1})$. Since these intervals are disjoint the roots are different. So $f' (x) = 0$ has at least $ n − 1$ different solutions.
I was told that i needed to sdo proof by contradiction to complete the proof and that this is how it was done:
Suppose that $ f ' (x) = 0 $ has $n$ different solutions $x_1 < · · · < x_n$.
We apply Rolle’s Theorem n times for each interval $[x_i , x_{i+1}]$ with $ i = 1, . . . , n$.
Then $f''(x)$ has $n − 1$ different roots. Inductively we get that $f^{(n)}(x) = 0 $ has at least one root. However $f^{(n)}(x)= n!$ which gives a contradiction.
Therefore $f'(x) = 0 $ has exactly $ n − 1$ roots.
What has me confused is this $f^{(n)}(x)= n!$ why is that true?
Just multiply all those terms. Then your function looks like this: $$f(x) = x^n + (a_1+\ldots + a_n)x^{n-1}+\ldots+a_1a_2a_3\cdots a_n$$ Every derivative reduces the exponents by one and kills constant terms. Thus in the $n$-th derivative, only the derivative of $x^n$ survives. For this, we have: $$\frac{\mathrm d^n}{\mathrm dx^n}x^n = \frac{\mathrm d^{n-1}}{\mathrm dx^{n-1}} \frac{\mathrm d}{\mathrm dx}x^n = \frac{\mathrm d^{n-1}}{\mathrm dx^{n-1}} nx^{n-1} = \frac{\mathrm d^{n-2}}{\mathrm dx^{n-2}} n(n-1)x^{n-2} = \ldots = n(n-1)(n-2)\cdots 2\cdot 1 x^0 = n!$$