Discriminant of $x^n-1$ Question is to find discriminant of polynomial $x^n-1$

I consider $f(x)=x^n-1=(x-a_1)(x-a_2)(x-a_3)\cdots(x-a_n)$

Now, $$f'(x)=[(x-a_2)(x-a_3)\cdots(x-a_n)]+\cdots+[(x-a_1)(x-a_2)\cdots(x-a_{n-1})]$$

$f'(a_1)=(a_1-a_2)(a_1-a_3)\cdots(a_1-a_n)$

$f'(a_2)=(a_2-a_1)(a_2-a_3)\cdots(a_2-a_n)$

$f'(a_3)=(a_3-a_1)(a_3-a_2)\cdots (a_3-a_n)$

and so on.. Now i need to know how many sign changes do i need to get something which looks like discriminant

I would write this in a matrix form to get some idea...
$$\begin{bmatrix}12&amp;13&amp;14&amp;15&amp;\cdots&amp;1n\\21&amp;23&amp;24&amp;25&amp;\cdots&amp;2n\\31&amp;32&amp;34&amp;35&amp;\cdots&amp;3n\\\\n1&amp;n2&amp;n3&amp;n4&amp;\cdots&amp;n(n-1) \end{bmatrix}$$ 

See that i first row every element is in correct position i mean of the form $ij$ for $i&lt;j$

In second row only one element is odd of the form $ij$ with $i&gt;j$ but i want $i&lt;j$ in discriminant so i would change this.. So my count starts... change sign 1

In third row there are two elements which are not behaving properly... So, I should change them also.. So, Now another  two changes... On the whole $1+2$ changes...

In fourth row there would be $3$ misbehaving children so my count is $1+2+3$

In last row every body is behaving badly so i have to make $n-1$ changes in that..

On the whole i have to make $1+2+3+\cdots +n-1=\dfrac{n(n-1)}{2}$ changes..

So, $f'(a_1)f'(a_2)\cdots f'(a_n)=(-1)^{\dfrac{n(n-1)}{2}}(a_1-a_2)^2(a_1-a_3)^2\cdots (a_{n-1}-a_n)^2=(-1)^{\dfrac{n(n-1)}{2}} Disc(f)$

But then $f'(x)=nx^{n-1}$

This tells me that $f'(a_i)=n(a_i)^{n-1}$ 

So, $$Disc (f)=(-1)^{\dfrac{n(n-1)}{2}}  n^n(a_1a_2\cdots a_n)^{n-1}=(-1)^{\dfrac{n(n-1)}{2}}  n^n(-1)^{(n-1)^2}=(-1)^{\dfrac{n(n-1)}{2}+(n-1)^2}$$

As $(-1)^{n-1}=(-1)^{(n-1)^2}$ i would replace my $(-1)^{(n-1)^2}$ with $(-1)^{n-1}$

$$Disc (f)=(-1)^{\dfrac{n(n-1)}{2}}  n^n(a_1a_2\cdots a_n)^{n-1}=(-1)^{\dfrac{n(n-1)}{2}}  n^n(-1)^{n-1}=(-1)^{\dfrac{n(n-1)}{2}+n-1}n^n$$

i.e., $$Disc(x^n-1)=(-1)^{\dfrac{(n-1)(n+2)}{2}}n^n$$

As nobody was giving answer to my question i was trying my best and started editing this when ever i thought i find some thing and this is its final stage... This is fully solved now...

Thank you..

Any other ways of approaches would be appreciated.. 

Thank you :)
Your method seems fine, you just have to be careful and count the number of sign changes you need to make in the formulas for $f'(a_i)$ in order to get it on the right form.

We know that

$$\text{disc}(f) = \prod_{i&lt;j}(a_i-a_j)^2$$

Now

$$f'(a_1) = (a_1-a_2)(a_1-a_3)\ldots (a_1-a_n) = (-1)^{0}(a_1-a_2)(a_1-a_3)\ldots (a_1-a_n) $$
$$f'(a_2) = (a_2-a_1)(a_2-a_3)\ldots (a_2-a_n) = (-1)^1(a_1-a_2)(a_2-a_3)\ldots (a_2-a_n) $$
$$f'(a_3) = (a_3-a_1)(a_3-a_2)\ldots (a_3-a_n) = (-1)^2(a_1-a_3)(a_2-a_3)\ldots (a_3-a_n) $$
$$\ldots $$
$$f'(a_{n}) = (a_{n}-a_1)(a_{n}-a_2)\ldots (a_{n}-a_n) = (-1)^{n-1}(a_1-a_{n})(a_2-a_{n})\ldots (a_{n-1}-a_n) $$

Above I have switched the sign of the factors which has the wrong form: $(a_i - a_j)$ with $i&gt;j$. This leads to a $(-1)^k$ factor.

Multiplying togeather the terms above and comparing with the definition of disc$(f)$ we see that:

$$\text{disc}(f) = \prod_{i&lt;j}(a_i-a_j)^2 = \left(\prod_{i=1}^n f'(a_i)\right) \cdot (-1)^{1+2+\ldots + n-1} = (-1)^{n(n-1)/2} \prod_{i=1}^n n a_i^{n-1}$$

the last product is as you know just $\prod_{i=1}^n n a_i^{n-1} = \prod_{i=1}^n n a_i^{n}/a_i = \frac{n^n}{a_1a_2\ldots a_n} = (-1)^{1+n}n^n$ since $f(0) = (-a_1)(-a_2)\ldots (-a_n) = -1$. This gives

$$\text{disc}(f) = n^n(-1)^{n(n-1)/2}(-1)^{1 + n} = n^n(-1)^{n(n+1)/2 + 1}$$
Consider $f(x)=x^n-1$.

You want to find the discriminant. 

One way of doing that is to find what are the roots of the equation. 

The equation is $x^n=1$.

For $n$ odd, only one unique root, which is $x=1$.

For $n=2$, the roots are $1$ and $-1$.

For $n$ even and $n&gt;2$, you can easily come back to the case where $n$ is odd and the case where $n=2$ since $n=2^pq$, with $p$ and $q$ integers, and $q$ odd.

And you can show very easily that except for $n&gt;2$, there are at least 2 identical roots to the equation...

EDIT: I was placing myself in the case of real numbers. The other answer if the one in C. 

EDIT 2: complete answer found here: Calculating $\prod (\omega^j - \omega^k)$ where $\omega^n=1$.